Hi,

i'm developing an application that need vsync to avoid tearing but i'm having 
some problems.
Here is the (really simplified) code structure of my application: 


Code:

...
while ( !mViewer->done() ) {
  mGraph->Update(...);
  mViewer->frame();
}





I've noticed frame() function is blocking when vsync is enabled.
This means that i call the frame function, i stay blocked for something like 
20ms (50hz PAL), and then i must terminate the Update call in the vsync period 
otherwise i won't be able to draw a new frame ( the graphic card draw the old 
content of frame buffer without changes performed in the update function. 
Changes will be performed in the next frame ).

As you can immagine this is a big problem for real-time applications cause i'm 
introducing 20ms of retard.

Is there a way to syncronize frame call without using vsync ? or can i scompose 
the frame function to be able to separate functions that operate on the graph 
from those that perform the rendering ? 
The second solution could help me cause i would be able to operate on the graph 
with mGraph->Update(...) even if the frame "part" that write the frameBuffer is 
blocked.

I hope i've explained my problem clearly.

Thank you!

Cheers,
Giovanni

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=29295#29295





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to