#ifndef CANVAS_VG_INITOPERATION_HXX_
#define CANVAS_VG_INITOPERATION_HXX_
-#include <vg/openvg.h>
#include <osg/GraphicsThread>
namespace simgear
{
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