15 #ifndef OSG_OCCLUSION_QUERY_NODE
16 #define OSG_OCCLUSION_QUERY_NODE 1
21 #include <osg/Geometry>
75 unsigned int getNumPixels(
const osg::Camera* cam );
77 virtual void releaseGLObjects(
osg::State* state = 0 )
const;
79 static void deleteQueryObject(
unsigned int contextID, GLuint handle );
80 static void flushDeletedQueryObjects(
unsigned int contextID,
double currentTime,
double& availableTime );
81 static void discardDeletedQueryObjects(
unsigned int contextID );
84 typedef std::map< const osg::Camera*, TestResult >
ResultMap;
109 virtual void releaseGLObjects(
osg::State* state = 0 )
const;
114 void setQueriesEnabled(
bool enable=
true );
131 void setDebugDisplay(
bool enable );
132 bool getDebugDisplay()
const;
155 bool getPassed()
const;
166 static void flushDeletedQueryObjects(
unsigned int contextID,
double currentTime,
double& availableTime );
172 static void discardDeletedQueryObjects(
unsigned int contextID );
177 virtual void createSupportNodes();
OpenThreads::Mutex _mapMutex
std::map< const osg::Camera *, TestResult > ResultMap
osg::ref_ptr< osg::Geode > _debugGeode
osg::StateSet * initOQDebugState()
This class provides an object-oriented thread mutex interface.
std::map< const osg::Camera *, unsigned int > FrameCountMap
OpenThreads::Mutex _frameCountMutex
osg::StateSet * initOQState()
#define META_Node(library, name)
void setVisibilityThreshold(unsigned int pixels)
unsigned int _queryFrameCount
void setQueryFrameCount(unsigned int frames)
FrameCountMap _frameCountMap
osg::ref_ptr< osg::Geode > _queryGeode
OpenThreads::Mutex _computeBoundMutex
unsigned int getVisibilityThreshold() const
unsigned int getQueryFrameCount() const
bool getQueriesEnabled() const
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
unsigned int _visThreshold