Inheritance diagram for osg::GraphicsContext:

Public Types | |
| typedef std::list< ref_ptr< Operation > > | OperationQueue |
| typedef std::list< osg::Camera * > | Cameras |
Public Member Functions | |
| void | add (Operation *operation) |
| Add operation to end of OperationQueue. | |
| void | remove (Operation *operation) |
| Remove operation from OperationQueue. | |
| void | remove (const std::string &name) |
| Remove named operation from OperationQueue. | |
| void | removeAllOperations () |
| Remove all operations from OperationQueue. | |
| void | runOperations () |
| Run the operations. | |
| OperationQueue & | getOperationsQueue () |
| Get the operations queue, not you must use the OperationsMutex when accessing the queue. | |
| OpenThreads::Mutex * | getOperationsMutex () |
| Get the operations queue mutex. | |
| osg::RefBlock * | getOperationsBlock () |
| Get the operations queue block used to mark an empty queue, if you end items into the empty queu you must release this block. | |
| Operation * | getCurrentOperation () |
| Get the current operations that is being run. | |
| const Traits * | getTraits () const |
| Get the traits of the GraphicsContext. | |
| virtual bool | valid () const =0 |
| Return whether a valid and usable GraphicsContext has been created. | |
| 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. | |
| void | setClearColor (const Vec4 &color) |
| Sets the clear color. | |
| const Vec4 & | getClearColor () const |
| Returns the clear color. | |
| void | setClearMask (GLbitfield mask) |
| Set the clear mask used in glClear(. | |
| GLbitfield | getClearMask () const |
| Get the clear mask. | |
| virtual void | clear () |
| Do an OpenGL clear of the full graphics context/window. | |
| 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. | |
| bool | makeCurrent () |
| Make this graphics context current. | |
| bool | makeContextCurrent (GraphicsContext *readContext) |
| Make this graphics context current with specified read context. | |
| bool | releaseContext () |
| Release the graphics context. | |
| 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 (OperationsThread *gt) |
| Assign a graphics thread to the graphics context, so that the thread handles all OpenGL operations. | |
| OperationsThread * | getGraphicsThread () |
| Get the graphics thread assigned the graphics context. | |
| const OperationsThread * | 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 bool | makeCurrentImplementation ()=0 |
| Make this graphics context current implementation. | |
| virtual bool | makeContextCurrentImplementation (GraphicsContext *readContext)=0 |
| Make this graphics context current with specified read context implementation. | |
| virtual bool | releaseContextImplementation ()=0 |
| Release the graphics 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. | |
| void | resized (int x, int y, int width, int height) |
| resized method should be called when the underlying window has been resized and the GraphicsWindow and associated Cameras must be updated to keep in sync with the new size. | |
| void | setResizedCallback (ResizedCallback *rc) |
| Set the resized callback which overrides the GraphicsConext::realizedImplementation(), allow developers to provide custom behavior in response to a window being resized. | |
| ResizedCallback * | getResizedCallback () |
| Get the resized callback which overrides the GraphicsConext::realizedImplementation(). | |
| const ResizedCallback * | getResizedCallback () const |
| Get the const resized callback which overrides the GraphicsConext::realizedImplementation(). | |
| virtual void | resizedImplementation (int x, int y, int width, int height) |
| resized implementation, by default resizes the viewports and aspect ratios the cameras associated with the graphics Window. | |
| Cameras & | getCameras () |
| Get the the list of cameras associated with this graphics context. | |
| const Cameras & | getCameras () const |
| Get the the const list of cameras associated with this graphics context. | |
| virtual bool | isSameKindAs (const Object *object) const |
| virtual const char * | libraryName () const |
| return the name of the object's library. | |
| virtual const char * | className () const |
| return the name of the object's class type. | |
Static Public Member Functions | |
| static void | setWindowingSystemInterface (WindowingSystemInterface *wsInterface) |
| Set the querry the windowing system for screens and create graphics context - this functor should be supplied by the windows toolkit. | |
| static WindowingSystemInterface * | getWindowingSystemInterface () |
| Get the WindowingSystemInterface. | |
| static GraphicsContext * | createGraphicsContext (Traits *traits) |
| Create a graphics context for a specified set of traits. | |
| static unsigned int | createNewContextID () |
| Create a contextID for a new graphics context, this contextID is used to set up the osg::State associate with context. | |
| static void | incrementContextIDUsageCount (unsigned int contextID) |
| Increment the usage count associate with a contextID. | |
| static void | decrementContextIDUsageCount (unsigned int contextID) |
| Decrement the usage count associate with a contextID. | |
Protected Member Functions | |
| GraphicsContext () | |
| GraphicsContext (const GraphicsContext &, const osg::CopyOp &) | |
| virtual | ~GraphicsContext () |
| virtual Object * | cloneType () const |
| Clone the type of an object, with Object* return type. | |
| virtual Object * | clone (const CopyOp &) const |
| Clone an object, with Object* return type. | |
| void | addCamera (osg::Camera *camera) |
| void | removeCamera (osg::Camera *camera) |
Protected Attributes | |
| Cameras | _cameras |
| ref_ptr< Traits > | _traits |
| ref_ptr< State > | _state |
| Vec4 | _clearColor |
| GLbitfield | _clearMask |
| OpenThreads::Thread * | _threadOfLastMakeCurrent |
| OpenThreads::Mutex | _operationsMutex |
| osg::ref_ptr< osg::RefBlock > | _operationsBlock |
| OperationQueue | _operations |
| osg::ref_ptr< Operation > | _currentOperation |
| ref_ptr< OperationsThread > | _graphicsThread |
| ref_ptr< ResizedCallback > | _resizedCallback |
Friends | |
| class | osg::Camera |
Classes | |
| struct | ResizedCallback |
| struct | ScreenIdentifier |
| struct | Traits |
| GraphicsContext Traits object provides the specification of what type of graphics context is required. More... | |
| struct | WindowingSystemInterface |
| Callback to be implemented to provide access to Windowing API's ability to create Windows/pbuffers. More... | |
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
Add operation to end of OperationQueue.
|
|
|
|
|
|
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 osgViewer::GraphicsWindow. |
|
|
return the name of the object's class type. Must be defined by derived classes. Implements osg::Object. Reimplemented in osgViewer::GraphicsWindowWin32, osgViewer::GraphicsWindowX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded. |
|
|
Do an OpenGL clear of the full graphics context/window. Note, must only be called from a thread with this context current. |
|
|
Clone an object, with Object* return type. Must be defined by derived classes. Implements osg::Object. |
|
|
Clone the type of an object, with Object* return type. Must be defined by derived classes. Implements osg::Object. |
|
|
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 osgViewer::GraphicsWindowWin32, osgViewer::GraphicsWindowX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded. |
|
|
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 the const list of cameras associated with this graphics context.
|
|
|
Get the the list of cameras associated with this graphics context.
|
|
|
Returns the clear color.
|
|
|
Get the clear mask.
|
|
|
Get the current operations that is being run.
|
|
|
Get the const graphics thread assigned the graphics context.
|
|
|
Get the graphics thread assigned the graphics context.
|
|
|
Get the operations queue block used to mark an empty queue, if you end items into the empty queu you must release this block.
|
|
|
Get the operations queue mutex.
|
|
|
Get the operations queue, not you must use the OperationsMutex when accessing the queue.
|
|
|
Get the const resized callback which overrides the GraphicsConext::realizedImplementation().
|
|
|
Get the resized callback which overrides the GraphicsConext::realizedImplementation().
|
|
|
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.
|
|
|
Get the WindowingSystemInterface.
|
|
|
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 osgViewer::GraphicsWindowWin32, osgViewer::GraphicsWindowX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded. |
|
|
Reimplemented from osg::Object. |
|
|
return the name of the object's library. Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name. Implements osg::Object. Reimplemented in osgViewer::GraphicsWindowWin32, osgViewer::GraphicsWindowX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded. |
|
|
Make this graphics context current with specified read context. Implementated by calling makeContextCurrentImplementation(). Returns true on success. |
|
|
Make this graphics context current with specified read context implementation. Pure virtual - must be implemented by concrate implementations of GraphicsContext. |
|
|
Make this graphics context current. Implementated by calling makeCurrentImplementation(). Returns true on success. |
|
|
Make this graphics context current implementation. Pure virtual - must be implemented by concrate implementations of GraphicsContext. Implemented in osgViewer::GraphicsWindowWin32, osgViewer::GraphicsWindowX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded. |
|
|
Realise the GraphicsContext.
|
|
|
Realise the GraphicsContext implementation, Pure virtual - must be implemented by concrate implementations of GraphicsContext.
Implemented in osgViewer::GraphicsWindowWin32, osgViewer::GraphicsWindowX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded. |
|
|
Release the graphics context. Returns true on success. |
|
|
Release the graphics context implementation.
Implemented in osgViewer::GraphicsWindowWin32, osgViewer::GraphicsWindowX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded. |
|
|
Remove named operation from OperationQueue.
|
|
|
Remove operation from OperationQueue.
|
|
|
Remove all operations from OperationQueue.
|
|
|
|
|
||||||||||||||||||||
|
resized method should be called when the underlying window has been resized and the GraphicsWindow and associated Cameras must be updated to keep in sync with the new size.
|
|
||||||||||||||||||||
|
resized implementation, by default resizes the viewports and aspect ratios the cameras associated with the graphics Window.
|
|
|
Run the operations.
|
|
|
Sets the clear color.
|
|
|
Set the clear mask used in glClear(. .). Defaults to GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT. |
|
|
Assign a graphics thread to the graphics context, so that the thread handles all OpenGL operations.
|
|
|
Set the resized callback which overrides the GraphicsConext::realizedImplementation(), allow developers to provide custom behavior in response to a window being resized.
|
|
|
Set the State object which tracks the current OpenGL state for this graphics context.
|
|
|
Set the querry the windowing system for screens and create graphics context - this functor should be supplied by the windows toolkit.
|
|
|
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 osgViewer::GraphicsWindowWin32, osgViewer::GraphicsWindowX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded. |
|
|
Return whether a valid and usable GraphicsContext has been created.
Implemented in osgViewer::GraphicsWindowWin32, osgViewer::GraphicsWindowX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|