Modification to r8795 to sleep inside the loop that checks for availability of the occlusion query result.

This commit is contained in:
Paul MARTZ
2008-09-29 21:02:02 +00:00
parent 2167f34d50
commit 9f0592cac7
2 changed files with 4 additions and 1 deletions

View File

@@ -10,6 +10,7 @@ The following changes (and svn revision numbers) were included in the 2.6.1 rele
8853 - Fix to osgUtil::Simplifier to handle shared vertex arrays correctly. Changes the Geometry interface, so forces a recompile.
8888 - Fix for uninitialized "strip texture path" option in OpenFlight exporter.
8900 - Fix for FLT plugin user data handling.
Modification to r8795 to sleep inside the loop that checks for availability of the occlusion query result.
Bump OSG version number from 2.6.0 to 2.6.1.
Update wrappers.

View File

@@ -239,10 +239,12 @@ struct RetrieveQueriesCallback : public osg::Camera::DrawCallback
// code, we've seen crashes on 64-bit Mac/Linux NVIDIA systems doing
// multithreaded, multipipe rendering (as in a CAVE).
GLint ready( 0 );
ext->glGetQueryObjectiv( tr->_id, GL_QUERY_RESULT_AVAILABLE, &ready );
while( !ready )
{
OpenThreads::Thread::microSleep( 5 );
ext->glGetQueryObjectiv( tr->_id, GL_QUERY_RESULT_AVAILABLE, &ready );
};
}
#endif
ext->glGetQueryObjectiv( tr->_id, GL_QUERY_RESULT, &(tr->_numPixels) );