// 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
{
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