#include <ContextData>
◆ GraphicsContexts
◆ ManagerMap
◆ ContextData()
osg::ContextData::ContextData |
( |
unsigned int |
contextID | ) |
|
◆ ~ContextData()
virtual osg::ContextData::~ContextData |
( |
| ) |
|
|
protectedvirtual |
◆ createNewContextID()
static unsigned int osg::ContextData::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.
◆ decrementContextIDUsageCount()
static void osg::ContextData::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.
◆ decrementUsageCount()
void osg::ContextData::decrementUsageCount |
( |
| ) |
|
|
inline |
◆ deleteAllGLObjects()
virtual void osg::ContextData::deleteAllGLObjects |
( |
| ) |
|
|
virtual |
Do a GL delete all OpenGL objects. Note, must be called from a thread which has current the graphics context associated with contextID.
Implements osg::GraphicsObjectManager.
◆ discardAllGLObjects()
virtual void osg::ContextData::discardAllGLObjects |
( |
| ) |
|
|
virtual |
Discard all OpenGL objects. Note, unlike deleteAllGLjects discard does not do any OpenGL calls so can be called from any thread, but as a consequence it also doesn't remove the associated OpenGL resource so discard should only be called when the associated graphics context is being/has been closed.
Implements osg::GraphicsObjectManager.
◆ flushAllDeletedGLObjects()
virtual void osg::ContextData::flushAllDeletedGLObjects |
( |
| ) |
|
|
virtual |
Flush all deleted OpenGL objects. Note, must be called from a thread which has current the graphics context associated with contextID.
Implements osg::GraphicsObjectManager.
◆ flushDeletedGLObjects()
virtual void osg::ContextData::flushDeletedGLObjects |
( |
double |
currentTime, |
|
|
double & |
availableTime |
|
) |
| |
|
virtual |
Flush all deleted OpenGL objects within the specified availableTime. Note, must be called from a thread which has current the graphics context associated with contextID.
Implements osg::GraphicsObjectManager.
◆ get() [1/2]
template<typename T >
T * osg::ContextData::get |
( |
| ) |
|
|
inline |
Get a specific GL extensions object or GraphicsObjectManager, initialize if not already present. Note, must only be called from a the graphics context thread associated with this osg::State.
◆ get() [2/2]
template<typename T >
const T * osg::ContextData::get |
( |
| ) |
const |
|
inline |
Get a specific GL extensions object or GraphicsObjectManager if it already exists in the extension map. Note, safe to call outwith a the graphics context thread associated with this osg::State. Returns NULL if the desired extension object has not been created yet.
◆ getAllRegisteredGraphicsContexts()
Get all the registered graphics contexts.
◆ getCompileContext() [1/2]
◆ getCompileContext() [2/2]
static GraphicsContext * osg::ContextData::getCompileContext |
( |
unsigned int |
contextID | ) |
|
|
static |
Get the GraphicsContext for doing background compilation for GraphicsContexts associated with specified contextID.
◆ getMaxContextID()
static unsigned int osg::ContextData::getMaxContextID |
( |
| ) |
|
|
static |
Get the current max ContextID.
◆ getNumContexts()
unsigned int osg::ContextData::getNumContexts |
( |
| ) |
const |
|
inline |
◆ getOrCreateCompileContext()
static GraphicsContext * osg::ContextData::getOrCreateCompileContext |
( |
unsigned int |
contextID | ) |
|
|
static |
Get existing or create a new GraphicsContext to do background compilation for GraphicsContexts associated with specified contextID.
◆ getRegisteredGraphicsContexts()
static GraphicsContexts osg::ContextData::getRegisteredGraphicsContexts |
( |
unsigned int |
contextID | ) |
|
|
static |
Get all the registered graphics contexts associated with a specific contextID.
◆ incrementContextIDUsageCount()
static void osg::ContextData::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.
◆ incrementUsageCount()
void osg::ContextData::incrementUsageCount |
( |
| ) |
|
|
inline |
◆ newFrame()
◆ recomputeStats()
virtual void osg::ContextData::recomputeStats |
( |
std::ostream & |
out | ) |
const |
|
virtual |
◆ registerGraphicsContext()
static void osg::ContextData::registerGraphicsContext |
( |
GraphicsContext * |
gc | ) |
|
|
static |
◆ reportStats()
virtual void osg::ContextData::reportStats |
( |
std::ostream & |
out | ) |
|
|
virtual |
◆ resetStats()
virtual void osg::ContextData::resetStats |
( |
| ) |
|
|
virtual |
◆ set()
template<typename T >
void osg::ContextData::set |
( |
T * |
ptr | ) |
|
|
inline |
◆ setCompileContext() [1/2]
◆ setCompileContext() [2/2]
static void osg::ContextData::setCompileContext |
( |
unsigned int |
contextID, |
|
|
GraphicsContext * |
gc |
|
) |
| |
|
static |
Get the GraphicsContext for doing background compilation for GraphicsContexts associated with specified contextID.
◆ setNumContexts()
void osg::ContextData::setNumContexts |
( |
unsigned int |
numContexts | ) |
|
|
inline |
◆ unregisterGraphicsContext()
static void osg::ContextData::unregisterGraphicsContext |
( |
GraphicsContext * |
gc | ) |
|
|
static |
◆ _compileContext
◆ _managerMap
◆ _numContexts
unsigned int osg::ContextData::_numContexts |
|
protected |
The documentation for this class was generated from the following file: