]> 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 9fb650cbb4538504a4ca4866be612fc429ae074e..3b9c6436ae866bfd09d1e73ac2d36aaa7149a1c6 100644 (file)
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // Library General Public License for more details.
 //
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
 
 #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