typedef std::vector<ScreenSettings> osg::GraphicsContext::ScreenSettingsList |
typedef std::vector<GraphicsContext*> osg::GraphicsContext::GraphicsContexts |
typedef std::list< ref_ptr<Operation> > osg::GraphicsContext::GraphicsOperationQueue |
typedef std::list< osg::Camera* > osg::GraphicsContext::Cameras |
osg::GraphicsContext::GraphicsContext | ( | ) | [protected] |
osg::GraphicsContext::GraphicsContext | ( | const GraphicsContext & | , | |
const osg::CopyOp & | ||||
) | [protected] |
virtual osg::GraphicsContext::~GraphicsContext | ( | ) | [protected, virtual] |
static void osg::GraphicsContext::setWindowingSystemInterface | ( | WindowingSystemInterface * | wsInterface | ) | [static] |
Set the query the windowing system for screens and create graphics context - this functor should be supplied by the windows toolkit.
static WindowingSystemInterface* osg::GraphicsContext::getWindowingSystemInterface | ( | ) | [static] |
Get the WindowingSystemInterface
static GraphicsContext* osg::GraphicsContext::createGraphicsContext | ( | Traits * | traits | ) | [static] |
Create a graphics context for a specified set of traits.
static unsigned int osg::GraphicsContext::createNewContextID | ( | ) | [static] |
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.
Referenced by osgViewer::GraphicsWindowX11::GraphicsWindowX11(), and osgViewer::GraphicsWindowEmbedded::init().
static unsigned int osg::GraphicsContext::getMaxContextID | ( | ) | [static] |
Get the current max ContextID.
static void osg::GraphicsContext::incrementContextIDUsageCount | ( | unsigned int | contextID | ) | [static] |
Increment the usage count associate with a contextID. The usage count specifies how many graphics contexts a specific contextID is shared between.
Referenced by osgViewer::GraphicsWindowEmbedded::init().
static void osg::GraphicsContext::decrementContextIDUsageCount | ( | unsigned int | contextID | ) | [static] |
Decrement the usage count associate with a contextID. Once the contextID goes to 0 the contextID is then free to be reused.
static GraphicsContexts osg::GraphicsContext::getAllRegisteredGraphicsContexts | ( | ) | [static] |
Get all the registered graphics contexts.
static GraphicsContexts osg::GraphicsContext::getRegisteredGraphicsContexts | ( | unsigned int | contextID | ) | [static] |
Get all the registered graphics contexts associated with a specific contextID.
static void osg::GraphicsContext::setCompileContext | ( | unsigned int | contextID, | |
GraphicsContext * | gc | |||
) | [static] |
Get the GraphicsContext for doing background compilation for GraphicsContexts associated with specified contextID.
static GraphicsContext* osg::GraphicsContext::getOrCreateCompileContext | ( | unsigned int | contextID | ) | [static] |
Get existing or create a new GraphicsContext to do background compilation for GraphicsContexts associated with specified contextID.
static GraphicsContext* osg::GraphicsContext::getCompileContext | ( | unsigned int | contextID | ) | [static] |
Get the GraphicsContext for doing background compilation for GraphicsContexts associated with specified contextID.
void osg::GraphicsContext::add | ( | Operation * | operation | ) |
Add operation to end of OperationQueue.
void osg::GraphicsContext::remove | ( | Operation * | operation | ) |
Remove operation from OperationQueue.
void osg::GraphicsContext::remove | ( | const std::string & | name | ) |
Remove named operation from OperationQueue.
void osg::GraphicsContext::removeAllOperations | ( | ) |
Remove all operations from OperationQueue.
void osg::GraphicsContext::runOperations | ( | ) |
Run the operations.
GraphicsOperationQueue& osg::GraphicsContext::getOperationsQueue | ( | ) | [inline] |
Get the operations queue, not you must use the OperationsMutex when accessing the queue.
OpenThreads::Mutex* osg::GraphicsContext::getOperationsMutex | ( | ) | [inline] |
Get the operations queue mutex.
osg::RefBlock* osg::GraphicsContext::getOperationsBlock | ( | ) | [inline] |
Get the operations queue block used to mark an empty queue, if you end items into the empty queue you must release this block.
Operation* osg::GraphicsContext::getCurrentOperation | ( | ) | [inline] |
Get the current operations that is being run.
const Traits* osg::GraphicsContext::getTraits | ( | ) | const [inline] |
Get the traits of the GraphicsContext.
virtual bool osg::GraphicsContext::valid | ( | ) | const [pure virtual] |
Return whether a valid and usable GraphicsContext has been created.
Implemented in osgViewer::GraphicsWindowWin32, osgViewer::PixelBufferWin32, osgViewer::GraphicsWindowX11, osgViewer::PixelBufferX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded.
Referenced by osgViewer::ViewerBase::makeCurrent().
void osg::GraphicsContext::setState | ( | State * | state | ) | [inline] |
Set the State object which tracks the current OpenGL state for this graphics context.
Referenced by osgViewer::GraphicsWindowEmbedded::init().
State* osg::GraphicsContext::getState | ( | ) | [inline] |
Get the State object which tracks the current OpenGL state for this graphics context.
Referenced by osgViewer::GraphicsWindowEmbedded::init().
const State* osg::GraphicsContext::getState | ( | ) | const [inline] |
Get the const State object which tracks the current OpenGL state for this graphics context.
void osg::GraphicsContext::setClearColor | ( | const Vec4 & | color | ) | [inline] |
Sets the clear color.
const Vec4& osg::GraphicsContext::getClearColor | ( | ) | const [inline] |
Returns the clear color.
void osg::GraphicsContext::setClearMask | ( | GLbitfield | mask | ) | [inline] |
Set the clear mask used in glClear(..). Defaults to 0 - so no clear is done by default by the GraphicsContext, instead the Camera's attached the GraphicsContext will do the clear. GraphicsContext::setClearMask() is useful for when the Camera's Viewports don't conver the whole context, so the context will fill in the gaps.
GLbitfield osg::GraphicsContext::getClearMask | ( | ) | const [inline] |
Get the clear mask.
virtual void osg::GraphicsContext::clear | ( | ) | [virtual] |
Do an OpenGL clear of the full graphics context/window. Note, must only be called from a thread with this context current.
double osg::GraphicsContext::getTimeSinceLastClear | ( | ) | const [inline] |
References osg::Timer::delta_s(), and osg::Timer::instance().
bool osg::GraphicsContext::realize | ( | ) |
Realize the GraphicsContext.
void osg::GraphicsContext::close | ( | bool | callCloseImplementation = true |
) |
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 osg::GraphicsContext::swapBuffers | ( | ) |
swap the front and back buffers.
bool osg::GraphicsContext::isRealized | ( | ) | const [inline] |
Return true if the graphics context has been realized and is ready to use.
bool osg::GraphicsContext::makeCurrent | ( | ) |
Make this graphics context current. Implemented by calling makeCurrentImplementation(). Returns true on success.
Referenced by osgViewer::ViewerBase::makeCurrent().
bool osg::GraphicsContext::makeContextCurrent | ( | GraphicsContext * | readContext | ) |
Make this graphics context current with specified read context. Implemented by calling makeContextCurrentImplementation(). Returns true on success.
bool osg::GraphicsContext::releaseContext | ( | ) |
Release the graphics context. Returns true on success.
Referenced by osgViewer::ViewerBase::releaseContext().
bool osg::GraphicsContext::isCurrent | ( | ) | const [inline] |
Return true if the current thread has this OpenGL graphics context.
References OpenThreads::Thread::CurrentThread().
void osg::GraphicsContext::bindPBufferToTexture | ( | GLenum | buffer | ) | [inline] |
Bind the graphics context to associated texture.
void osg::GraphicsContext::createGraphicsThread | ( | ) |
Create a graphics thread to the graphics context, so that the thread handles all OpenGL operations.
void osg::GraphicsContext::setGraphicsThread | ( | GraphicsThread * | gt | ) |
Assign a graphics thread to the graphics context, so that the thread handles all OpenGL operations.
GraphicsThread* osg::GraphicsContext::getGraphicsThread | ( | ) | [inline] |
Get the graphics thread assigned the graphics context.
const GraphicsThread* osg::GraphicsContext::getGraphicsThread | ( | ) | const [inline] |
Get the const graphics thread assigned the graphics context.
virtual bool osg::GraphicsContext::realizeImplementation | ( | ) | [pure virtual] |
Realize the GraphicsContext implementation, Pure virtual - must be implemented by concrete implementations of GraphicsContext.
Implemented in osgViewer::GraphicsWindowWin32, osgViewer::PixelBufferWin32, osgViewer::GraphicsWindowX11, osgViewer::PixelBufferX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded.
virtual bool osg::GraphicsContext::isRealizedImplementation | ( | ) | const [pure virtual] |
Return true if the graphics context has been realized, and is ready to use, implementation. Pure virtual - must be implemented by concrete implementations of GraphicsContext.
Implemented in osgViewer::GraphicsWindowWin32, osgViewer::PixelBufferWin32, osgViewer::GraphicsWindowX11, osgViewer::PixelBufferX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded.
virtual void osg::GraphicsContext::closeImplementation | ( | ) | [pure virtual] |
Close the graphics context implementation. Pure virtual - must be implemented by concrete implementations of GraphicsContext.
Implemented in osgViewer::GraphicsWindowWin32, osgViewer::PixelBufferWin32, osgViewer::GraphicsWindowX11, osgViewer::PixelBufferX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded.
virtual bool osg::GraphicsContext::makeCurrentImplementation | ( | ) | [pure virtual] |
Make this graphics context current implementation. Pure virtual - must be implemented by concrete implementations of GraphicsContext.
Implemented in osgViewer::GraphicsWindowWin32, osgViewer::PixelBufferWin32, osgViewer::GraphicsWindowX11, osgViewer::PixelBufferX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded.
virtual bool osg::GraphicsContext::makeContextCurrentImplementation | ( | GraphicsContext * | readContext | ) | [pure virtual] |
Make this graphics context current with specified read context implementation. Pure virtual - must be implemented by concrete implementations of GraphicsContext.
Implemented in osgViewer::PixelBufferX11.
virtual bool osg::GraphicsContext::releaseContextImplementation | ( | ) | [pure virtual] |
Release the graphics context implementation.
Implemented in osgViewer::GraphicsWindowWin32, osgViewer::PixelBufferWin32, osgViewer::GraphicsWindowX11, osgViewer::PixelBufferX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded.
virtual void osg::GraphicsContext::bindPBufferToTextureImplementation | ( | GLenum | buffer | ) | [pure virtual] |
Pure virtual, Bind the graphics context to associated texture implementation. Pure virtual - must be implemented by concrete implementations of GraphicsContext.
Implemented in osgViewer::PixelBufferWin32, osgViewer::PixelBufferX11, and osgViewer::GraphicsWindow.
virtual void osg::GraphicsContext::swapBuffersImplementation | ( | ) | [pure virtual] |
Swap the front and back buffers implementation. Pure virtual - must be implemented by concrete implementations of GraphicsContext.
Implemented in osgViewer::GraphicsWindowWin32, osgViewer::PixelBufferWin32, osgViewer::GraphicsWindowX11, osgViewer::PixelBufferX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded.
void osg::GraphicsContext::resized | ( | int | x, | |
int | y, | |||
int | width, | |||
int | height | |||
) | [inline] |
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 osg::GraphicsContext::setResizedCallback | ( | ResizedCallback * | rc | ) | [inline] |
Set the resized callback which overrides the GraphicsConext::realizedImplementation(), allow developers to provide custom behavior in response to a window being resized.
ResizedCallback* osg::GraphicsContext::getResizedCallback | ( | ) | [inline] |
Get the resized callback which overrides the GraphicsConext::realizedImplementation().
const ResizedCallback* osg::GraphicsContext::getResizedCallback | ( | ) | const [inline] |
Get the const resized callback which overrides the GraphicsConext::realizedImplementation().
virtual void osg::GraphicsContext::resizedImplementation | ( | int | x, | |
int | y, | |||
int | width, | |||
int | height | |||
) | [virtual] |
resized implementation, by default resizes the viewports and aspect ratios the cameras associated with the graphics Window.
Cameras& osg::GraphicsContext::getCameras | ( | ) | [inline] |
Get the the list of cameras associated with this graphics context.
const Cameras& osg::GraphicsContext::getCameras | ( | ) | const [inline] |
Get the the const list of cameras associated with this graphics context.
virtual bool osg::GraphicsContext::isSameKindAs | ( | const Object * | object | ) | const [inline, virtual] |
Reimplemented from osg::Object.
virtual const char* osg::GraphicsContext::libraryName | ( | ) | const [inline, virtual] |
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::PixelBufferWin32, osgViewer::GraphicsWindowX11, osgViewer::PixelBufferX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded.
virtual const char* osg::GraphicsContext::className | ( | ) | const [inline, virtual] |
return the name of the object's class type. Must be defined by derived classes.
Implements osg::Object.
Reimplemented in osgViewer::GraphicsWindowWin32, osgViewer::PixelBufferWin32, osgViewer::GraphicsWindowX11, osgViewer::PixelBufferX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded.
virtual Object* osg::GraphicsContext::cloneType | ( | ) | const [inline, protected, virtual] |
Clone the type of an object, with Object* return type. Must be defined by derived classes.
Implements osg::Object.
Clone an object, with Object* return type. Must be defined by derived classes.
Implements osg::Object.
static void osg::GraphicsContext::registerGraphicsContext | ( | GraphicsContext * | gc | ) | [static, protected] |
Register a GraphicsContext.
static void osg::GraphicsContext::unregisterGraphicsContext | ( | GraphicsContext * | gc | ) | [static, protected] |
Unregister a GraphicsContext.
void osg::GraphicsContext::addCamera | ( | osg::Camera * | camera | ) | [protected] |
void osg::GraphicsContext::removeCamera | ( | osg::Camera * | camera | ) | [protected] |
friend class osg::Camera [friend] |
Cameras osg::GraphicsContext::_cameras [protected] |
ref_ptr<Traits> osg::GraphicsContext::_traits [protected] |
ref_ptr<State> osg::GraphicsContext::_state [protected] |
Vec4 osg::GraphicsContext::_clearColor [protected] |
GLbitfield osg::GraphicsContext::_clearMask [protected] |
osg::ref_ptr<Operation> osg::GraphicsContext::_currentOperation [protected] |
ref_ptr<GraphicsThread> osg::GraphicsContext::_graphicsThread [protected] |
ref_ptr<ResizedCallback> osg::GraphicsContext::_resizedCallback [protected] |
Timer_t osg::GraphicsContext::_lastClearTick [protected] |