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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user