]> git.mxchange.org Git - simgear.git/blobdiff - simgear/canvas/VGInitOperation.hxx
Canvas: clip region rounding and catch negative size.
[simgear.git] / simgear / canvas / VGInitOperation.hxx
index b18ace17e3be14db4f136bb2f75c503dc659976b..3b9c6436ae866bfd09d1e73ac2d36aaa7149a1c6 100644 (file)
@@ -19,7 +19,6 @@
 #ifndef CANVAS_VG_INITOPERATION_HXX_
 #define CANVAS_VG_INITOPERATION_HXX_
 
-#include <vg/openvg.h>
 #include <osg/GraphicsThread>
 
 namespace simgear
@@ -37,20 +36,8 @@ namespace canvas
   {
     public:
 
-      VGInitOperation():
-        GraphicsOperation("canvas::VGInit", false)
-      {}
-
-      virtual void operator()(osg::GraphicsContext* context)
-      {
-        GLint vp[4];
-        glGetIntegerv(GL_VIEWPORT, vp);
-
-        // ATTENTION: If using another OpenVG implementation ensure it doesn't
-        //            change any OpenGL state!
-        vgCreateContextSH(vp[2], vp[3]);
-      }
-
+      VGInitOperation();
+      virtual void operator()(osg::GraphicsContext* context);
   };
 
 } // namespace canvas