vizkit3d
EnableGLDebugOperation.hpp
Go to the documentation of this file.
1 #ifndef VIZKIT3D_ENABLE_OSGDEBUG_OPERATION_HPP
2 #define VIZKIT3D_ENABLE_OSGDEBUG_OPERATION_HPP
3 
10 #include <osgViewer/ViewerEventHandlers>
11 
12 namespace vizkit3d
13 {
14  void enableGLDebugExtension(int contextid);
15 
16  class EnableGLDebugOperation : public osg::GraphicsOperation
17  {
18  public:
20  : osg::GraphicsOperation("EnableGLDebugOperation", false) {
21  }
22  virtual void operator ()(osg::GraphicsContext* gc) {
23  OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
24  int context_id = gc->getState()->getContextID();
25  enableGLDebugExtension(context_id);
26  }
27  OpenThreads::Mutex _mutex;
28  };
29 }
30 
31 #endif
EnableGLDebugOperation()
Definition: EnableGLDebugOperation.hpp:19
void enableGLDebugExtension(int contextid)
Definition: EnableGLDebugOperation.cpp:90
Definition: EnableGLDebugOperation.hpp:16
virtual void operator()(osg::GraphicsContext *gc)
Definition: EnableGLDebugOperation.hpp:22
OpenThreads::Mutex _mutex
Definition: EnableGLDebugOperation.hpp:27