Added realize() and isRealized() methods to osg::GraphicsContext.

Added osgcamera example that uses osg::GraphicsContext to create the required
window for rendering too, will eventually use osg::CameraNode to replace usage
of osgUtil::SceneView.
This commit is contained in:
Robert Osfield
2005-08-16 13:29:07 +00:00
parent 75987a045d
commit e8fc5248fa
8 changed files with 182 additions and 10 deletions

View File

@@ -36,7 +36,6 @@ class OSGPRODUCER_EXPORT GraphicsContextImplementation : public osg::GraphicsCon
GraphicsContextImplementation(Producer::RenderSurface* rs);
/** Return true of graphics context is realized.*/
bool isRealized() { return _rs.valid() && _rs->isRealized(); }
/** Return the RenderSurface that implements the graphics context.*/
Producer::RenderSurface* getRenderSurface() { return _rs.get(); }
@@ -45,6 +44,12 @@ class OSGPRODUCER_EXPORT GraphicsContextImplementation : public osg::GraphicsCon
const Producer::RenderSurface* getRenderSurface() const { return _rs.get(); }
/** Realise the GraphicsContext.*/
virtual bool realize();
/** Return true if the graphics context has been realised and is ready to use.*/
virtual bool isRealized() const { return _rs.valid() && _rs->isRealized(); }
/** Release the graphics context.*/
virtual void release();