Clean up and fixes to GraphicThread class, and osgcamera example.

This commit is contained in:
Robert Osfield
2005-08-30 14:41:08 +00:00
parent 3810d3b850
commit aba3b4fa67
7 changed files with 73 additions and 67 deletions

View File

@@ -138,8 +138,12 @@ class OSG_EXPORT GraphicsContext : public Referenced
/** Realise the GraphicsContext.*/
bool realize();
/** close the graphics context.*/
void close();
/** close the graphics context.
* close(bool) stops any associated graphics threads, releases the contextID for the GraphicsContext then
* optional calls closeImplementation() to do the actual deletion of the graphics. This call is made optional
* as there are times when the graphics context has already been deleted externally and only the OSG side
* of the its data need to be closed down. */
void close(bool callCloseImplementation=true);
/** swap the front and back buffers.*/
void swapBuffers();
@@ -216,8 +220,6 @@ class OSG_EXPORT GraphicsContext : public Referenced
virtual ~GraphicsContext();
bool _closeOnDestruction;
ref_ptr<Traits> _traits;
ref_ptr<State> _state;
OpenThreads::Mutex _mutex;

View File

@@ -70,6 +70,7 @@ class OSGPRODUCER_EXPORT GraphicsContextImplementation : public osg::GraphicsCon
virtual ~GraphicsContextImplementation();
bool _closeOnDestruction;
osg::ref_ptr<Producer::RenderSurface> _rs;
};