OpenSceneGraph 3.6.5
osg::GLBufferObject Class Reference

#include <BufferObject>

Inheritance diagram for osg::GLBufferObject:

Classes

struct  BufferEntry

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
GLsizeiptr getOffset (unsigned int i) const
void bindBuffer ()
void unbindBuffer ()
void release ()
 release GLBufferObject to the orphan list to be reused or deleted.
bool isDirty () const
void dirty ()
void clear ()
void compileBuffer ()
void deleteGLObject ()
void assign (BufferObject *bufferObject)
bool isPBOSupported () const
bool hasAllBufferDataBeenRead () const
void setBufferDataHasBeenRead (const osg::BufferData *bd)
Public Member Functions inherited from osg::GraphicsObject
 GraphicsObject ()
Public Member Functions inherited from osg::Referenced
 Referenced ()
 Referenced (bool threadSafeRefUnref)
 Deprecated, Referenced is now always uses thread safe ref/unref, use default Referenced() constructor instead.
 Referenced (const Referenced &)
Referencedoperator= (const Referenced &)
virtual void setThreadSafeRefUnref (bool)
 Deprecated, Referenced is always theadsafe so there method now has no effect and does not need to be called.
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 no longer referencing it.
int unref_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is no longer 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.

Public Attributes

GLBufferObjectSet_set
GLBufferObject_previous
GLBufferObject_next
unsigned int _frameLastUsed
GLExtensions_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::GraphicsObject
virtual ~GraphicsObject ()
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

Additional Inherited Members

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 setDeleteHandler (DeleteHandler *handler)
 Set a DeleteHandler to which deletion of all referenced counted objects will be delegated.
static DeleteHandlergetDeleteHandler ()
 Get a DeleteHandler.

Member Typedef Documentation

◆ BufferEntries

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

Constructor & Destructor Documentation

◆ GLBufferObject()

osg::GLBufferObject::GLBufferObject ( unsigned int contextID,
BufferObject * bufferObject,
unsigned int glObjectID = 0 )

◆ ~GLBufferObject()

virtual osg::GLBufferObject::~GLBufferObject ( )
protectedvirtual

Member Function Documentation

◆ assign()

void osg::GLBufferObject::assign ( BufferObject * bufferObject)

◆ bindBuffer()

◆ clear()

void osg::GLBufferObject::clear ( )

◆ compileBuffer()

◆ computeBufferAlignment()

unsigned int osg::GLBufferObject::computeBufferAlignment ( unsigned int pos,
unsigned int bufferAlignment ) const
inlineprotected

◆ deleteGLObject()

void osg::GLBufferObject::deleteGLObject ( )

◆ dirty()

void osg::GLBufferObject::dirty ( )
inline

References _dirty.

◆ getBufferObject()

BufferObject * osg::GLBufferObject::getBufferObject ( )
inline

References _bufferObject.

◆ getContextID()

unsigned int osg::GLBufferObject::getContextID ( ) const
inline

References _contextID.

◆ getGLObjectID() [1/2]

GLuint & osg::GLBufferObject::getGLObjectID ( )
inline

References _glObjectID.

◆ getGLObjectID() [2/2]

GLuint osg::GLBufferObject::getGLObjectID ( ) const
inline

References _glObjectID.

◆ getOffset()

GLsizeiptr osg::GLBufferObject::getOffset ( unsigned int i) const
inline

References _bufferEntries.

◆ getProfile()

const BufferObjectProfile & osg::GLBufferObject::getProfile ( ) const
inline

References _profile.

◆ hasAllBufferDataBeenRead()

bool osg::GLBufferObject::hasAllBufferDataBeenRead ( ) const

◆ isDirty()

◆ isPBOSupported()

bool osg::GLBufferObject::isPBOSupported ( ) const
inline

References _extensions.

◆ release()

void osg::GLBufferObject::release ( )

release GLBufferObject to the orphan list to be reused or deleted.

◆ setBufferDataHasBeenRead()

void osg::GLBufferObject::setBufferDataHasBeenRead ( const osg::BufferData * bd)

◆ setBufferObject()

void osg::GLBufferObject::setBufferObject ( BufferObject * bufferObject)

◆ setProfile()

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

References _profile.

◆ unbindBuffer()

void osg::GLBufferObject::unbindBuffer ( )
inline

References _extensions, and _profile.

Member Data Documentation

◆ _allocatedSize

unsigned int osg::GLBufferObject::_allocatedSize
protected

◆ _bufferEntries

BufferEntries osg::GLBufferObject::_bufferEntries
protected

Referenced by getOffset().

◆ _bufferObject

BufferObject* osg::GLBufferObject::_bufferObject
protected

Referenced by getBufferObject().

◆ _contextID

unsigned int osg::GLBufferObject::_contextID
protected

Referenced by getContextID().

◆ _dirty

bool osg::GLBufferObject::_dirty
protected

Referenced by dirty(), and isDirty().

◆ _extensions

GLExtensions* osg::GLBufferObject::_extensions

◆ _frameLastUsed

unsigned int osg::GLBufferObject::_frameLastUsed

◆ _glObjectID

GLuint osg::GLBufferObject::_glObjectID
protected

◆ _next

GLBufferObject* osg::GLBufferObject::_next

◆ _previous

GLBufferObject* osg::GLBufferObject::_previous

◆ _profile

BufferObjectProfile osg::GLBufferObject::_profile
protected

◆ _set

GLBufferObjectSet* osg::GLBufferObject::_set

Referenced by bindBuffer().


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

osg logo
Generated at Sun Jul 27 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.