123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- #ifndef GRAPHICSWINDOWEX_H
- #define GRAPHICSWINDOWEX_H
- #include <osgQOpenGL/Export>
- #include <osgViewer/GraphicsWindow>
- /// Needed for mixing osg rendering with Qt 2D drawing using QPainter...
- /// See http://forum.openscenegraph.org/viewtopic.php?t=15627&view=previous
- class OSGQOPENGL_EXPORT GraphicsWindowEx : public osgViewer::GraphicsWindow
- {
- public:
- GraphicsWindowEx(osg::GraphicsContext::Traits* traits);
- GraphicsWindowEx(int x, int y, int width, int height);
- void init();
- virtual bool isSameKindAs(const osg::Object* object) const
- {
- return dynamic_cast<const GraphicsWindowEx*>(object) != 0;
- }
- virtual const char* libraryName() const
- {
- return "";
- }
- virtual const char* className() const
- {
- return "GraphicsWindowEx";
- }
- // dummy implementations, assume that graphics context is *always* current and valid.
- virtual bool valid() const
- {
- return true;
- }
- virtual bool realizeImplementation()
- {
- return true;
- }
- virtual bool isRealizedImplementation() const
- {
- return true;
- }
- virtual void closeImplementation() {}
- virtual bool makeCurrentImplementation()
- {
- return true;
- }
- virtual bool releaseContextImplementation()
- {
- return true;
- }
- virtual void swapBuffersImplementation() {}
- virtual void grabFocus() {}
- virtual void grabFocusIfPointerInWindow() {}
- virtual void raiseWindow() {}
- };
- #endif // GRAPHICSWINDOWEX_H
|