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 |
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) |
static void | setExtensions (unsigned int contextID, Extensions *extensions) |
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 () |
Protected Attributes | |
unsigned int | _contextID |
GLuint | _glObjectID |
BufferObjectProfile | _profile |
unsigned int | _allocatedSize |
bool | _dirty |
BufferEntries | _bufferEntries |
BufferObject * | _bufferObject |
Classes | |
struct | BufferEntry |
class | Extensions |
typedef std::vector<BufferEntry> osg::GLBufferObject::BufferEntries [protected] |
osg::GLBufferObject::GLBufferObject | ( | unsigned int | contextID, | |
BufferObject * | bufferObject, | |||
unsigned int | glObjectID = 0 | |||
) |
virtual osg::GLBufferObject::~GLBufferObject | ( | ) | [protected, virtual] |
void osg::GLBufferObject::setProfile | ( | const BufferObjectProfile & | profile | ) | [inline] |
const BufferObjectProfile& osg::GLBufferObject::getProfile | ( | ) | const [inline] |
void osg::GLBufferObject::setBufferObject | ( | BufferObject * | bufferObject | ) |
BufferObject* osg::GLBufferObject::getBufferObject | ( | ) | [inline] |
unsigned int osg::GLBufferObject::getContextID | ( | ) | const [inline] |
GLuint& osg::GLBufferObject::getGLObjectID | ( | ) | [inline] |
GLuint osg::GLBufferObject::getGLObjectID | ( | ) | const [inline] |
GLsizeiptrARB osg::GLBufferObject::getOffset | ( | unsigned int | i | ) | const [inline] |
void osg::GLBufferObject::bindBuffer | ( | ) | [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::unbindBuffer | ( | ) | [inline] |
bool osg::GLBufferObject::isDirty | ( | ) | const [inline] |
void osg::GLBufferObject::dirty | ( | ) | [inline] |
void osg::GLBufferObject::clear | ( | ) |
void osg::GLBufferObject::compileBuffer | ( | ) |
void osg::GLBufferObject::deleteGLObject | ( | ) |
void osg::GLBufferObject::assign | ( | BufferObject * | bufferObject | ) |
bool osg::GLBufferObject::isPBOSupported | ( | ) | const [inline] |
static GLBufferObject* osg::GLBufferObject::createGLBufferObject | ( | unsigned int | contextID, | |
const BufferObject * | bufferObject | |||
) | [static] |
Referenced by osg::BufferObject::getOrCreateGLBufferObject().
static void osg::GLBufferObject::deleteAllBufferObjects | ( | unsigned int | contextID | ) | [static] |
static void osg::GLBufferObject::discardAllBufferObjects | ( | unsigned int | contextID | ) | [static] |
static void osg::GLBufferObject::flushAllDeletedBufferObjects | ( | unsigned int | contextID | ) | [static] |
static void osg::GLBufferObject::discardAllDeletedBufferObjects | ( | unsigned int | contextID | ) | [static] |
static void osg::GLBufferObject::flushDeletedBufferObjects | ( | unsigned int | contextID, | |
double | currentTime, | |||
double & | availbleTime | |||
) | [static] |
static void osg::GLBufferObject::releaseGLBufferObject | ( | unsigned int | contextID, | |
GLBufferObject * | to | |||
) | [static] |
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..
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.
unsigned int osg::GLBufferObject::_contextID [protected] |
GLuint osg::GLBufferObject::_glObjectID [protected] |
Referenced by bindBuffer().
BufferObjectProfile osg::GLBufferObject::_profile [protected] |
Referenced by bindBuffer().
unsigned int osg::GLBufferObject::_allocatedSize [protected] |
bool osg::GLBufferObject::_dirty [protected] |
BufferEntries osg::GLBufferObject::_bufferEntries [protected] |
BufferObject* osg::GLBufferObject::_bufferObject [protected] |
Referenced by bindBuffer().
unsigned int osg::GLBufferObject::_frameLastUsed |
Referenced by bindBuffer().