openscenegraph
osg::GLObjectManager Class Referenceabstract

#include <GLObjects>

Inheritance diagram for osg::GLObjectManager:
osg::GraphicsObjectManager osg::Referenced osg::GLFrameBufferObjectManager osg::GLRenderBufferManager

Public Member Functions

 GLObjectManager (const std::string &name, unsigned int contextID)
virtual void flushDeletedGLObjects (double currentTime, double &availableTime)
virtual void flushAllDeletedGLObjects ()
virtual void deleteAllGLObjects ()
virtual void discardAllGLObjects ()
virtual void scheduleGLObjectForDeletion (GLuint globj)
virtual GLuint createGLObject ()
virtual void deleteGLObject (GLuint globj)=0
Public Member Functions inherited from osg::GraphicsObjectManager
 GraphicsObjectManager (const std::string &name, unsigned int contextID)
unsigned int getContextID () const
virtual void newFrame (osg::FrameStamp *)
virtual void resetStats ()
virtual void reportStats (std::ostream &)
virtual void recomputeStats (std::ostream &) const
Public Member Functions inherited from osg::Referenced
 Referenced ()
 Referenced (bool threadSafeRefUnref)
 Referenced (const Referenced &)
Referencedoperator= (const Referenced &)
virtual void setThreadSafeRefUnref (bool)
bool getThreadSafeRefUnref () const
OpenThreads::MutexgetRefMutex () const
int ref () const
int unref () const
int unref_nodelete () const
int referenceCount () const
ObserverSetgetObserverSet () const
ObserverSetgetOrCreateObserverSet () const
void addObserver (Observer *observer) const
void removeObserver (Observer *observer) const

Protected Types

typedef std::list< GLuint > GLObjectHandleList

Protected Member Functions

virtual ~GLObjectManager ()
Protected Member Functions inherited from osg::GraphicsObjectManager
virtual ~GraphicsObjectManager ()
Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
void deleteUsingDeleteHandler () const

Protected Attributes

OpenThreads::Mutex _mutex
GLObjectHandleList _deleteGLObjectHandles
Protected Attributes inherited from osg::GraphicsObjectManager
std::string _name
unsigned int _contextID
Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
OpenThreads::Atomic _refCount

Additional Inherited Members

Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
static void setDeleteHandler (DeleteHandler *handler)
static DeleteHandlergetDeleteHandler ()

Member Typedef Documentation

◆ GLObjectHandleList

typedef std::list<GLuint> osg::GLObjectManager::GLObjectHandleList
protected

Constructor & Destructor Documentation

◆ GLObjectManager()

osg::GLObjectManager::GLObjectManager ( const std::string & name,
unsigned int contextID )

◆ ~GLObjectManager()

virtual osg::GLObjectManager::~GLObjectManager ( )
protectedvirtual

Member Function Documentation

◆ createGLObject()

virtual GLuint osg::GLObjectManager::createGLObject ( )
virtual

implementation of the actual creation of an GL object - subclasses from GLObjectManager must implement the appropriate GL calls.

◆ deleteAllGLObjects()

virtual void osg::GLObjectManager::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.

◆ deleteGLObject()

virtual void osg::GLObjectManager::deleteGLObject ( GLuint globj)
pure virtual

implementation of the actual deletion of an GL object - subclasses from GLObjectManager must implement the appropriate GL calls.

Implemented in osg::GLFrameBufferObjectManager, and osg::GLRenderBufferManager.

◆ discardAllGLObjects()

virtual void osg::GLObjectManager::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::GLObjectManager::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::GLObjectManager::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.

◆ scheduleGLObjectForDeletion()

virtual void osg::GLObjectManager::scheduleGLObjectForDeletion ( GLuint globj)
virtual

schedule a GL object for deletion by the graphics thread.

Member Data Documentation

◆ _deleteGLObjectHandles

GLObjectHandleList osg::GLObjectManager::_deleteGLObjectHandles
protected

◆ _mutex

OpenThreads::Mutex osg::GLObjectManager::_mutex
protected

The documentation for this class was generated from the following file: