#include <Canvas/MouseEvent.hxx>
#include <Canvas/property_helper.hxx>
+#include <Main/fg_props.hxx>
#include <Main/globals.hxx>
#include <Viewer/CameraGroup.hxx>
#include <Viewer/renderer.hxx>
virtual void operator()(osg::RenderInfo& renderInfo) const
{
- _canvas->_render_dirty = false;
+ const std::string VG_SIGNAL = "/sim/signals/vg-initialized";
+
+ if( fgGetBool(VG_SIGNAL) )
+ {
+ fgSetBool(VG_SIGNAL, false);
+ // If OpenVG has been initialized we need to redraw the frame, because
+ // initializing has happened instead of rendering
+ _canvas->_render_dirty = true;
+ }
+ else
+ _canvas->_render_dirty = false;
}
protected:
#include "path.hxx"
#include <Canvas/property_helper.hxx>
+#include <Main/fg_props.hxx>
#include <vg/openvg.h>
typedef std::vector<VGubyte> CmdList;
typedef std::vector<VGfloat> CoordList;
- class Path;
- class PathDrawable:
+ class Path::PathDrawable:
public osg::Drawable
{
public:
vgCreateContextSH(vp[2], vp[3]);
_vg_initialized = true;
+ fgSetBool("/sim/signals/vg-initialized", true);
return;
}
};
};
- bool PathDrawable::_vg_initialized = false;
+ bool Path::PathDrawable::_vg_initialized = false;
//----------------------------------------------------------------------------
Path::Path(SGPropertyNode_ptr node, const Style& parent_style):