StateEx 552 B

12345678910111213141516171819202122232425262728
  1. #ifndef STATEEX_H
  2. #define STATEEX_H
  3. #include <osgQOpenGL/Export>
  4. #include <osg/State>
  5. /// Needed for mixing osg rendering with Qt 2D drawing using QPainter...
  6. /// See http://forum.openscenegraph.org/viewtopic.php?t=15627&view=previous
  7. class OSGQOPENGL_EXPORT StateEx : public osg::State
  8. {
  9. public:
  10. StateEx() : defaultFbo(0) {}
  11. inline void setDefaultFbo(GLuint fbo)
  12. {
  13. defaultFbo = fbo;
  14. }
  15. inline GLuint getDefaultFbo() const
  16. {
  17. return defaultFbo;
  18. }
  19. protected:
  20. GLuint defaultFbo;
  21. };
  22. #endif // STATEEX_H