Inheritance diagram for osg::GraphicsContext:
Public Member Functions | |
const Traits * | getTraits () const |
Get the traits of the GraphicsContext. | |
void | setState (State *state) |
Set the State object which tracks the current OpenGL state for this graphics context. | |
State * | getState () |
Get the State object which tracks the current OpenGL state for this graphics context. | |
const State * | getState () const |
Get the const State object which tracks the current OpenGL state for this graphics context. | |
bool | realize () |
Realise the GraphicsContext. | |
void | close (bool callCloseImplementation=true) |
close the graphics context. | |
void | swapBuffers () |
swap the front and back buffers. | |
bool | isRealized () const |
Return true if the graphics context has been realised and is ready to use. | |
void | makeCurrent () |
Make this graphics context current. | |
void | makeContextCurrent (GraphicsContext *readContext) |
Make this graphics context current with specified read context. | |
void | releaseContext () |
Release the graphics context by unlocking the GraphicsContext mutex. | |
bool | isCurrent () const |
Return true if the current thread has this OpenGL graphics context. | |
void | bindPBufferToTexture (GLenum buffer) |
Bind the graphics context to associated texture. | |
void | createGraphicsThread () |
Create a graphics thread to the graphics context, so that the thread handles all OpenGL operations. | |
void | setGraphicsThread (GraphicsThread *gt) |
Assign a graphics thread to the graphics context, so that the thread handles all OpenGL operations. | |
GraphicsThread * | getGraphicsThread () |
Get the graphics thread assigned the graphics context. | |
const GraphicsThread * | getGraphicsThread () const |
Get the const graphics thread assigned the graphics context. | |
virtual bool | realizeImplementation ()=0 |
Realise the GraphicsContext implementation, Pure virtual - must be implemented by concrate implementations of GraphicsContext. | |
virtual bool | isRealizedImplementation () const=0 |
Return true if the graphics context has been realised, and is ready to use, implementation. | |
virtual void | closeImplementation ()=0 |
Close the graphics context implementation. | |
virtual void | makeCurrentImplementation ()=0 |
Make this graphics context current implementation. | |
virtual void | makeContextCurrentImplementation (GraphicsContext *readContext)=0 |
Make this graphics context current with specified read context implementation. | |
virtual void | bindPBufferToTextureImplementation (GLenum buffer)=0 |
Pure virtual, Bind the graphics context to associated texture implementation. | |
virtual void | swapBuffersImplementation ()=0 |
Swap the front and back buffers implementation. | |
Static Public Member Functions | |
void | setCreateGraphicsContextCallback (CreateGraphicContextCallback *callback) |
Set the create graphics context callback - this callback should be supplied by the windows toolkit. | |
CreateGraphicContextCallback * | getCreateGraphicsContextCallback () |
Get the create graphics context callback. | |
GraphicsContext * | createGraphicsContext (Traits *traits) |
Create a graphics context for a specified set of traits. | |
unsigned int | createNewContextID () |
Create a contextID for a new graphics context, this contextID is used to set up the osg::State associate with context. | |
void | incrementContextIDUsageCount (unsigned int contextID) |
Increment the usage count associate with a contextID. | |
void | decrementContextIDUsageCount (unsigned int contextID) |
Decrement the usage count associate with a contextID. | |
Protected Member Functions | |
GraphicsContext () | |
virtual | ~GraphicsContext () |
Protected Attributes | |
ref_ptr< Traits > | _traits |
ref_ptr< State > | _state |
OpenThreads::Mutex | _mutex |
OpenThreads::Thread * | _threadOfLastMakeCurrent |
ref_ptr< GraphicsThread > | _graphicsThread |
|
|
|
|
|
Bind the graphics context to associated texture.
|
|
Pure virtual, Bind the graphics context to associated texture implementation. Pure virtual - must be implemented by concrate implementations of GraphicsContext. Implemented in osgProducer::GraphicsContextImplementation. |
|
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. |
|
Close the graphics context implementation. Pure virtual - must be implemented by concrate implementations of GraphicsContext. Implemented in osgProducer::GraphicsContextImplementation. |
|
Create a graphics context for a specified set of traits.
|
|
Create a graphics thread to the graphics context, so that the thread handles all OpenGL operations.
|
|
Create a contextID for a new graphics context, this contextID is used to set up the osg::State associate with context. Automatically increments the usage count of the contextID to 1. |
|
Decrement the usage count associate with a contextID. Once the contextID goes to 0 the contextID is then free to be reused. |
|
Get the create graphics context callback.
|
|
Get the const graphics thread assigned the graphics context.
|
|
Get the graphics thread assigned the graphics context.
|
|
Get the const State object which tracks the current OpenGL state for this graphics context.
|
|
Get the State object which tracks the current OpenGL state for this graphics context.
|
|
Get the traits of the GraphicsContext.
|
|
Increment the usage count associate with a contextID. The usage count speficies how many graphics contexts a specific contextID is shared between. |
|
Return true if the current thread has this OpenGL graphics context.
|
|
Return true if the graphics context has been realised and is ready to use.
|
|
Return true if the graphics context has been realised, and is ready to use, implementation. Pure virtual - must be implemented by concrate implementations of GraphicsContext. Implemented in osgProducer::GraphicsContextImplementation. |
|
Make this graphics context current with specified read context. Implementated by first aquiring a lock of the GraphicsContext mutex, and then doing a call to makeContextCurrentImplementation(). |
|
Make this graphics context current with specified read context implementation. Pure virtual - must be implemented by concrate implementations of GraphicsContext. Implemented in osgProducer::GraphicsContextImplementation. |
|
Make this graphics context current. Implementated by first aquiring a lock of the GraphicsContext mutex, and then doing a call to makeCurrentImplementation(). |
|
Make this graphics context current implementation. Pure virtual - must be implemented by concrate implementations of GraphicsContext. Implemented in osgProducer::GraphicsContextImplementation. |
|
Realise the GraphicsContext.
|
|
Realise the GraphicsContext implementation, Pure virtual - must be implemented by concrate implementations of GraphicsContext.
Implemented in osgProducer::GraphicsContextImplementation. |
|
Release the graphics context by unlocking the GraphicsContext mutex.
|
|
Set the create graphics context callback - this callback should be supplied by the windows toolkit.
|
|
Assign a graphics thread to the graphics context, so that the thread handles all OpenGL operations.
|
|
Set the State object which tracks the current OpenGL state for this graphics context.
|
|
swap the front and back buffers.
|
|
Swap the front and back buffers implementation. Pure virtual - must be implemented by Concrate implementations of GraphicsContext. Implemented in osgProducer::GraphicsContextImplementation. |
|
|
|
|
|
|
|
|
|
|