Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# osg::BufferObject Class Reference

Inheritance diagram for osg::BufferObject:

[legend]
List of all members.

## Public Member Functions
| BufferObject ()
| BufferObject (const BufferObject &bo, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
| Copy constructor using CopyOp to manage deep vs shallow copy.
virtual bool | isSameKindAs (const Object *obj) const
virtual const char * | libraryName () const
| return the name of the object's library.
virtual const char * | className () const
| return the name of the object's class type.
bool | isBufferObjectSupported (unsigned int contextID) const
GLuint & | buffer (unsigned int contextID) const
void | bindBuffer (unsigned int contextID) const
void | unbindBuffer (unsigned int contextID) const
virtual bool | needsCompile (unsigned int contextID) const=0
virtual void | compileBuffer (State &state) const=0
void | releaseBuffer (State *state) const
void | flushDeletedBufferObjects (unsigned int contextID, double, double &availableTime)
| flush all the cached display list which need to be deleted in the OpenGL context related to contextID.
## Static Public Member Functions
void | deleteBufferObject (unsigned int contextID, GLuint globj)
| Use deleteVertexBufferObject instead of glDeleteBuffers to allow OpenGL buffer objects to be cached until they can be deleted by the OpenGL context in which they were created, specified by contextID.
Extensions * | getExtensions (unsigned int contextID, bool createIfNotInitalized)
| Function to call to get the extension of a specified context.
void | setExtensions (unsigned int contextID, Extensions *extensions)
| setExtensions allows users to override the extensions across graphics contexts.
## Protected Types
typedef osg::buffered_value< GLuint > | GLObjectList
typedef std::pair< BufferEntry, ref_ptr< Array > > | BufferEntryArrayPair
typedef std::pair< BufferEntry, ref_ptr< PrimitiveSet > > | BufferEntryPrimitiveSetPair
## Protected Member Functions
virtual | ~BufferObject ()
## Protected Attributes
GLObjectList | _bufferObjectList
GLenum | _target
GLenum | _usage
unsigned int | _totalSize

## Member Typedef Documentation

typedef std::pair< BufferEntry, ref_ptr<Array> > osg::BufferObject::BufferEntryArrayPair`[protected]`

typedef std::pair< BufferEntry, ref_ptr<PrimitiveSet> > osg::BufferObject::BufferEntryPrimitiveSetPair`[protected]`

typedef osg::buffered_value<GLuint> osg::BufferObject::GLObjectList`[protected]`

## Constructor & Destructor Documentation

osg::BufferObject::BufferObject | ( |  | ) |

osg::BufferObject::BufferObject | ( | const BufferObject & | bo,
|  | const CopyOp & | copyop = CopyOp::SHALLOW_COPY
| ) |

| Copy constructor using CopyOp to manage deep vs shallow copy.

virtual osg::BufferObject::~BufferObject | ( |  | ) | `[protected, virtual]`

## Member Function Documentation

void osg::BufferObject::bindBuffer | ( | unsigned int | contextID | ) | const`[inline]`

GLuint& osg::BufferObject::buffer | ( | unsigned int | contextID | ) | const`[inline]`

virtual const char* osg::BufferObject::className | ( |  | ) | const`[inline, virtual]`

| return the name of the object's class type. Must be defined by derived classes. Implements osg::Object.

virtual void osg::BufferObject::compileBuffer | ( | State & | state | ) | const`[pure virtual]`

| Implemented in osg::PixelBufferObject.

void osg::BufferObject::deleteBufferObject | ( | unsigned int | contextID,
|  | GLuint | globj
| ) | `[static]`

| Use deleteVertexBufferObject instead of glDeleteBuffers to allow OpenGL buffer objects to be cached until they can be deleted by the OpenGL context in which they were created, specified by contextID.

void osg::BufferObject::flushDeletedBufferObjects | ( | unsigned int | contextID,
|  | double | ,
|  | double & | availableTime
| ) |

| flush all the cached display list which need to be deleted in the OpenGL context related to contextID.

Extensions* osg::BufferObject::getExtensions | ( | unsigned int | contextID,
|  | bool | createIfNotInitalized
| ) | `[static]`

| Function to call to get the extension of a specified context. If the Exentsion 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..

bool osg::BufferObject::isBufferObjectSupported | ( | unsigned int | contextID | ) | const`[inline]`

virtual bool osg::BufferObject::isSameKindAs | ( | const Object * | obj | ) | const`[inline, virtual]`

| Reimplemented from osg::Object.

virtual const char* osg::BufferObject::libraryName | ( |  | ) | const`[inline, virtual]`

| return the name of the object's library. Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name. Implements osg::Object.

virtual bool osg::BufferObject::needsCompile | ( | unsigned int | contextID | ) | const`[pure virtual]`

| Implemented in osg::PixelBufferObject.

void osg::BufferObject::releaseBuffer | ( | State * | state | ) | const

void osg::BufferObject::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::BufferObject::unbindBuffer | ( | unsigned int | contextID | ) | const`[inline]`

## Member Data Documentation

GLObjectList osg::BufferObject::_bufferObjectList`[mutable, protected]`

GLenum osg::BufferObject::_target`[protected]`

unsigned int osg::BufferObject::_totalSize`[mutable, protected]`

GLenum osg::BufferObject::_usage`[protected]`

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

- BufferObject