Hi all,
I’ll try to be synthetic as I can about the few related topics ;D
First I would say that it could be great to have a jogl interface allowing Cross-Plateform Application Vertical Synchronization control interface, and eventually multi-Synchronized Canvas. Does anyOne know if it’s expected or not, and with wich priority ? It would really be a pretty usefull & very valuable tool for jogl users :
What I want to do is :
Using VSync to have smooth & quality rendering, without using all my CPU power to generate lot of frames that I will never be able to draw fully at right time, that causing dirty flickering :o.
But (here is the but lol) I want it for multiple canvas (possibly in multiple JFrame or other Container) at same time, with all my GLDrawable Buffers swap synchronized with Monitor frame refresh start.
I’d eventually accept solution of one “primary” Canvas getting (the best possible allowed by Application & GPU) monitor synchronized refresh rate, clearly: 60/(n==1 if possible) fps, and “secondaries” getting the 60/(n+1) fps
Asuming we can control VSYNC by GPU Driver Panel, or WGL_EXT_swap_control interface (i use WindowsXP, there are other func for GLX, and dont know behavior for MAC), how can I get my 60 fps for each GLDrawable ?
For note My PC config is : AMD XP2000+/Radeon 9700 with lattest drivers/Java 1.5/last Jogl so no power matter
I use a dedicated Animator for each GLDrawable (GLCanvas) and only display an empty scene (so there s only the lightest computationnal effort from my Scene Graph manager, display gl order dispatcher and GPU consumer).
The default behavior is this one (for 60Hz monitor refresh rate) :
- with one Canvas : i get my 60 fps correctly
- with 2 Canvas : i get a varying 30 fps depending wich Canvas get the dispatch gl display event from
Animator (a bit randomness) - with n Canvas : same varying about 60/n fps
- it bounds all my CPU Power (100% used), so navigation beetween application is laggy
For note: i only Use varying 5-10% CPU consuming if i introduce a wait( t < 15 ms) on current display Thread at end of each display, and still get 60fps. I anderstood Java time granularity system dependant matter with reading many papers but I need some explanation about Animator and jogl gl management to anderstand the real GL background behavior, so to fully measure and control CPU/GPU display process, latencies,etc.
I can’t fully optimize & control my application without it.
Do I need to write my own Animator to swap manually and synchronize my pool of Canvas or something else, or is it impossible with jogl or even openGL ?
For note I didnt try and even preciselly know how to do it with C|C++ as I’m learning openGL with jogl API ;D
If there is a solution (even complex),then will I be able to not consume all my CPU power ?
I’ve just got the Jdk 1.5 & I saw there was Scheduling tools in java.util.concurent package. Some1 gave an Animator class using it on an other thread of this forum. How can it help to manage CPU power ? Would this be suited to cooperate with VSYNC ?
If Some1 could share his valueable knowlegde about it it would be great ;D
All will be welcome to discuss about one of related topics here, and specialists to explain one point at a time as there’s a lot to talk about i guess. (I don’t want to consume all their precious time, but if they want :-*)
Thanks for your help :