From 9f0592cac73ff1412beeddc4af62d2282a613177 Mon Sep 17 00:00:00 2001 From: Paul MARTZ Date: Mon, 29 Sep 2008 21:02:02 +0000 Subject: [PATCH] Modification to r8795 to sleep inside the loop that checks for availability of the occlusion query result. --- ChangeLog | 1 + src/osg/OcclusionQueryNode.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 12b936afc..c9bf6f4ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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. diff --git a/src/osg/OcclusionQueryNode.cpp b/src/osg/OcclusionQueryNode.cpp index c99ebdfd1..8fb2275c8 100644 --- a/src/osg/OcclusionQueryNode.cpp +++ b/src/osg/OcclusionQueryNode.cpp @@ -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) );