OpenSceneGraph  3.0.1
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
osg::GLBufferObject Class Reference
Inheritance diagram for osg::GLBufferObject:
Inheritance graph
[legend]

Classes

struct  BufferEntry
class  Extensions
 Extensions class which encapsulates the querying of extensions and associated function pointers, and provide convenience wrappers to check for the extensions or use the associated functions. More...

Public Member Functions

 GLBufferObject (unsigned int contextID, BufferObject *bufferObject, unsigned int glObjectID=0)
void setProfile (const BufferObjectProfile &profile)
const BufferObjectProfilegetProfile () const
void setBufferObject (BufferObject *bufferObject)
BufferObjectgetBufferObject ()
unsigned int getContextID () const
GLuint & getGLObjectID ()
GLuint getGLObjectID () const
GLsizeiptrARB getOffset (unsigned int i) const
void bindBuffer ()
void unbindBuffer ()
bool isDirty () const
void dirty ()
void clear ()
void compileBuffer ()
void deleteGLObject ()
void assign (BufferObject *bufferObject)
bool isPBOSupported () const
- Public Member Functions inherited from osg::Referenced
 Referenced ()
 Referenced (bool threadSafeRefUnref)
 Referenced (const Referenced &)
Referencedoperator= (const Referenced &)
virtual void setThreadSafeRefUnref (bool threadSafe)
 Set whether to use a mutex to ensure ref() and unref() are thread safe.
bool getThreadSafeRefUnref () const
 Get whether a mutex is used to ensure ref() and unref() are thread safe.
OpenThreads::Mutex * getRefMutex () const
 Get the mutex used to ensure thread safety of ref()/unref().
int ref () const
 Increment the reference count by one, indicating that this object has another pointer which is referencing it.
int unref () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
int unref_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
int referenceCount () const
 Return the number of pointers currently referencing this object.
ObserverSetgetObserverSet () const
 Get the ObserverSet if one is attached, otherwise return NULL.
ObserverSetgetOrCreateObserverSet () const
 Get the ObserverSet if one is attached, otherwise create an ObserverSet, attach it, then return this newly created ObserverSet.
void addObserver (Observer *observer) const
 Add a Observer that is observing this object, notify the Observer when this object gets deleted.
void removeObserver (Observer *observer) const
 Remove Observer that is observing this object.

Static Public Member Functions

static GLBufferObjectcreateGLBufferObject (unsigned int contextID, const BufferObject *bufferObject)
static void deleteAllBufferObjects (unsigned int contextID)
static void discardAllBufferObjects (unsigned int contextID)
static void flushAllDeletedBufferObjects (unsigned int contextID)
static void discardAllDeletedBufferObjects (unsigned int contextID)
static void flushDeletedBufferObjects (unsigned int contextID, double currentTime, double &availbleTime)
static void releaseGLBufferObject (unsigned int contextID, GLBufferObject *to)
static ExtensionsgetExtensions (unsigned int contextID, bool createIfNotInitalized)
 Function to call to get the extension of a specified context.
static void setExtensions (unsigned int contextID, Extensions *extensions)
 setExtensions allows users to override the extensions across graphics contexts.
- Static Public Member Functions inherited from osg::Referenced
static OpenThreads::Mutex * getGlobalReferencedMutex ()
 Get the optional global Referenced mutex, this can be shared between all osg::Referenced.
static void setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting)
 Set whether reference counting should use a mutex for thread safe reference counting.
static bool getThreadSafeReferenceCounting ()
 Get whether reference counting is active.
static void setDeleteHandler (DeleteHandler *handler)
 Set a DeleteHandler to which deletion of all referenced counted objects will be delegated.
static DeleteHandlergetDeleteHandler ()
 Get a DeleteHandler.

Public Attributes

GLBufferObjectSet_set
GLBufferObject_previous
GLBufferObject_next
unsigned int _frameLastUsed
Extensions_extensions

Protected Types

typedef std::vector< BufferEntryBufferEntries

Protected Member Functions

virtual ~GLBufferObject ()
unsigned int computeBufferAlignment (unsigned int pos, unsigned int bufferAlignment) const
- Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
void deleteUsingDeleteHandler () const

Protected Attributes

unsigned int _contextID
GLuint _glObjectID
BufferObjectProfile _profile
unsigned int _allocatedSize
bool _dirty
BufferEntries _bufferEntries
BufferObject_bufferObject
- Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
OpenThreads::Atomic _refCount

Member Typedef Documentation

typedef std::vector<BufferEntry> osg::GLBufferObject::BufferEntries
protected

Constructor & Destructor Documentation

osg::GLBufferObject::GLBufferObject ( unsigned int  contextID,
BufferObject bufferObject,
unsigned int  glObjectID = 0 
)
virtual osg::GLBufferObject::~GLBufferObject ( )
protectedvirtual

Member Function Documentation

void osg::GLBufferObject::assign ( BufferObject bufferObject)
void osg::GLBufferObject::bindBuffer ( )
inline
void osg::GLBufferObject::clear ( )
void osg::GLBufferObject::compileBuffer ( )
unsigned int osg::GLBufferObject::computeBufferAlignment ( unsigned int  pos,
unsigned int  bufferAlignment 
) const
inlineprotected
static GLBufferObject* osg::GLBufferObject::createGLBufferObject ( unsigned int  contextID,
const BufferObject bufferObject 
)
static
static void osg::GLBufferObject::deleteAllBufferObjects ( unsigned int  contextID)
static
void osg::GLBufferObject::deleteGLObject ( )
void osg::GLBufferObject::dirty ( )
inline
static void osg::GLBufferObject::discardAllBufferObjects ( unsigned int  contextID)
static
static void osg::GLBufferObject::discardAllDeletedBufferObjects ( unsigned int  contextID)
static
static void osg::GLBufferObject::flushAllDeletedBufferObjects ( unsigned int  contextID)
static
static void osg::GLBufferObject::flushDeletedBufferObjects ( unsigned int  contextID,
double  currentTime,
double &  availbleTime 
)
static
BufferObject* osg::GLBufferObject::getBufferObject ( )
inline
unsigned int osg::GLBufferObject::getContextID ( ) const
inline
static Extensions* osg::GLBufferObject::getExtensions ( unsigned int  contextID,
bool  createIfNotInitalized 
)
static

Function to call to get the extension of a specified context.

If the Extension object for that context has not yet been created and the 'createIfNotInitalized' flag been set to false then returns NULL. If 'createIfNotInitalized' is true then the Extensions object is automatically created. However, in this case the extension object is only created with the graphics context associated with ContextID..

GLuint& osg::GLBufferObject::getGLObjectID ( )
inline
GLuint osg::GLBufferObject::getGLObjectID ( ) const
inline
GLsizeiptrARB osg::GLBufferObject::getOffset ( unsigned int  i) const
inline
const BufferObjectProfile& osg::GLBufferObject::getProfile ( ) const
inline
bool osg::GLBufferObject::isDirty ( ) const
inline
bool osg::GLBufferObject::isPBOSupported ( ) const
inline
static void osg::GLBufferObject::releaseGLBufferObject ( unsigned int  contextID,
GLBufferObject to 
)
static
void osg::GLBufferObject::setBufferObject ( BufferObject bufferObject)
static void osg::GLBufferObject::setExtensions ( unsigned int  contextID,
Extensions extensions 
)
static

setExtensions allows users to override the extensions across graphics contexts.

typically used when you have different extensions supported across graphics pipes but need to ensure that they all use the same low common denominator extensions.

void osg::GLBufferObject::setProfile ( const BufferObjectProfile profile)
inline
void osg::GLBufferObject::unbindBuffer ( )
inline

Member Data Documentation

unsigned int osg::GLBufferObject::_allocatedSize
protected
BufferEntries osg::GLBufferObject::_bufferEntries
protected
BufferObject* osg::GLBufferObject::_bufferObject
protected
unsigned int osg::GLBufferObject::_contextID
protected
bool osg::GLBufferObject::_dirty
protected
Extensions* osg::GLBufferObject::_extensions

Referenced by bindBuffer().

unsigned int osg::GLBufferObject::_frameLastUsed
GLuint osg::GLBufferObject::_glObjectID
protected

Referenced by bindBuffer().

GLBufferObject* osg::GLBufferObject::_next
GLBufferObject* osg::GLBufferObject::_previous
BufferObjectProfile osg::GLBufferObject::_profile
protected

Referenced by bindBuffer().

GLBufferObjectSet* osg::GLBufferObject::_set

Referenced by bindBuffer().


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

osg logo
Generated at Tue Sep 4 2012 16:18:31 for the OpenSceneGraph by doxygen 1.8.1.2.