OpenSceneGraph
3.0.1
|
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 BufferObjectProfile & | getProfile () const |
void | setBufferObject (BufferObject *bufferObject) |
BufferObject * | getBufferObject () |
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 |
![]() | |
Referenced () | |
Referenced (bool threadSafeRefUnref) | |
Referenced (const Referenced &) | |
Referenced & | operator= (const Referenced &) |
virtual void | setThreadSafeRefUnref (bool threadSafe) |
Set whether to use a mutex to ensure ref() and unref() are thread safe. More... | |
bool | getThreadSafeRefUnref () const |
Get whether a mutex is used to ensure ref() and unref() are thread safe. More... | |
OpenThreads::Mutex * | getRefMutex () const |
Get the mutex used to ensure thread safety of ref()/unref(). More... | |
int | ref () const |
Increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
int | unref () const |
Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
int | unref_nodelete () const |
Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
int | referenceCount () const |
Return the number of pointers currently referencing this object. More... | |
ObserverSet * | getObserverSet () const |
Get the ObserverSet if one is attached, otherwise return NULL. More... | |
ObserverSet * | getOrCreateObserverSet () const |
Get the ObserverSet if one is attached, otherwise create an ObserverSet, attach it, then return this newly created ObserverSet. More... | |
void | addObserver (Observer *observer) const |
Add a Observer that is observing this object, notify the Observer when this object gets deleted. More... | |
void | removeObserver (Observer *observer) const |
Remove Observer that is observing this object. More... | |
Static Public Member Functions | |
static GLBufferObject * | createGLBufferObject (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 Extensions * | getExtensions (unsigned int contextID, bool createIfNotInitalized) |
Function to call to get the extension of a specified context. More... | |
static void | setExtensions (unsigned int contextID, Extensions *extensions) |
setExtensions allows users to override the extensions across graphics contexts. More... | |
![]() | |
static OpenThreads::Mutex * | getGlobalReferencedMutex () |
Get the optional global Referenced mutex, this can be shared between all osg::Referenced. More... | |
static void | setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting) |
Set whether reference counting should use a mutex for thread safe reference counting. More... | |
static bool | getThreadSafeReferenceCounting () |
Get whether reference counting is active. More... | |
static void | setDeleteHandler (DeleteHandler *handler) |
Set a DeleteHandler to which deletion of all referenced counted objects will be delegated. More... | |
static DeleteHandler * | getDeleteHandler () |
Get a DeleteHandler. More... | |
Public Attributes | |
GLBufferObjectSet * | _set |
GLBufferObject * | _previous |
GLBufferObject * | _next |
unsigned int | _frameLastUsed |
Extensions * | _extensions |
Protected Types | |
typedef std::vector< BufferEntry > | BufferEntries |
Protected Member Functions | |
virtual | ~GLBufferObject () |
unsigned int | computeBufferAlignment (unsigned int pos, unsigned int bufferAlignment) const |
![]() | |
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 |
![]() | |
OpenThreads::AtomicPtr | _observerSet |
OpenThreads::Atomic | _refCount |
|
protected |
osg::GLBufferObject::GLBufferObject | ( | unsigned int | contextID, |
BufferObject * | bufferObject, | ||
unsigned int | glObjectID = 0 |
||
) |
|
protectedvirtual |
void osg::GLBufferObject::assign | ( | BufferObject * | bufferObject | ) |
|
inline |
References _extensions, _glObjectID, _profile, _set, osg::BufferObjectProfile::_target, osg::GLBufferObject::Extensions::glBindBuffer(), and osg::GLBufferObjectSet::moveToBack().
Referenced by osg::State::bindElementBufferObject(), osg::State::bindPixelBufferObject(), and osg::State::bindVertexBufferObject().
void osg::GLBufferObject::clear | ( | ) |
void osg::GLBufferObject::compileBuffer | ( | ) |
|
inlineprotected |
|
static |
Referenced by osg::BufferObject::getOrCreateGLBufferObject().
|
static |
void osg::GLBufferObject::deleteGLObject | ( | ) |
|
inline |
|
static |
|
static |
|
static |
|
static |
|
inline |
|
inline |
|
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..
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
void osg::GLBufferObject::setBufferObject | ( | BufferObject * | bufferObject | ) |
|
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.
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Extensions* osg::GLBufferObject::_extensions |
Referenced by bindBuffer().
unsigned int osg::GLBufferObject::_frameLastUsed |
|
protected |
Referenced by bindBuffer().
GLBufferObject* osg::GLBufferObject::_next |
GLBufferObject* osg::GLBufferObject::_previous |
|
protected |
Referenced by bindBuffer().
GLBufferObjectSet* osg::GLBufferObject::_set |
Referenced by bindBuffer().
![]() | Generated at Thu Feb 28 2013 21:37:17 for the OpenSceneGraph by doxygen 1.8.3.1. |