Any idea why glXWaitVideoSyncSGI() doesn't seem to work (see 1st paragraph below) or whyc glXQueryFrameCountNV() seems to take a long time to execute (i.e. upwards of 12ms just to do this call). Are others having trouble with either of these. I updated my NVIDIA driver to 190.42 and that didn't help any.
Paul P. ----- Original Message ---- From: "[email protected]" <[email protected]> To: [email protected] Sent: Wed, November 4, 2009 9:20:40 AM Subject: [osg-users] Frame Count/Threading Models I was using glXWaitVideoSyncSGI() in a Pre Draw Callback (the place I need it to be) to get the current Frame Count from the video card. I've recently found out that this Frame Count number from this function can be incorrect when I'm reading textures from the GPU to the CPU or writing textures from the CPU to the GPU. In particular, I would see about 100ms between calls to glXWaitVideoSyncSGI but the frame counter returned would either be consecutive (i.e. no missed frames) or skipping one number (i.e. one missed frame). I'm running at 60 Hz (16ms frames). Therefore, I'm now trying to use glXQueryFrameCountNV() (I have G-SYNC II card and have enabled Frame Lock). It would appear I need to call this when I have a valid Graphics Context. I assume this isn't normally the case in a PreDrawCallback. I've had to do this in the PreDrawCallback: if (camera.getGraphicsContext() && camera.getGraphicsContext()->valid() && camera.getGraphicsContext()->isRealized()) { osg::GraphicsContext* gc = const_cast<osg::GraphicsContext*>(camera.getGraphicsContext()); gc->makeCurrent(); } followed by my call to glXQueryFrameCountNV(). However, to make this work, I've had to set my osgViewer's threading model to SingleThreaded. If I don't do this I usually see a "Xlib: unexpected async reply (sequence 0x6a)!" message followed by a segmentation fault. What am I doing wrong? Is there some better way to do something in a valid graphics context when not in a draw callback? Paul P. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

