[osg-users] Graphic pipeline latency question

Paul Melis paul at science.uva.nl
Mon Jul 23 01:11:23 PDT 2007


Hi,

Claudio Arduino wrote:

> thank you for help, we have tried with Quadro board and the orange bar 
> is now ok but we are still measuring two frame of latency, the 
> distance marked with green color in the image screen.jpg attached at 
> this message. The first orange bar is within the frame 1 time slot (we 
> expected it within the frame 0 instead, somewhere within the red 
> marked time interval): does this mean that the graphical istructions 
> of the frame 0 are processed by the GPU during the frame 1? If so, it 
> is clear why the color change in the screen appears only in the frame 
> 2, at two frame of distance from the "rotate model" istruction and 
> from signal sent to serial port (sent at the begin of green bar)
>
> We think that this problem of latency is coming from OpenGL drivers 
> directly, but we don't know how we can solve it...
> if you have some suggestions....
>
I haven't really read this thread in detail, so this might be a dumb 
suggestion. You might try putting a glFinish() call at an appropriate 
point in your code. This should force the driver to process all the 
queued opengl commands and only return when that's done. Perhaps this 
will make your image update with less latency.
The question of where to place such a call is a bit tricky. I'm not 
really familiar with the new osgViewer classes yet (I used the 
glFinish() trick with an OSG 1.2 application). The class 
BarrierOperation (in <osg/GraphicsThread>) seems to know about 
glFinish(), though...

Once again, all this might not be appropriate in your situation,
Paul


More information about the osg-users mailing list