OpenSceneGraph  3.0.1
Public Member Functions | Protected Member Functions | Protected Attributes
osg::BufferIndexBinding Class Reference

Encapsulate binding buffer objects to index targets. More...

Inheritance diagram for osg::BufferIndexBinding:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual unsigned getMember () const
 Return the member identifier within the attribute's class type.
GLenum getTarget () const
GLuint getIndex () const
 Get the index target.
void setBufferObject (BufferObject *bo)
 Set the buffer object that will be bound to the index target.
BufferObjectgetBufferObject () const
 Get the buffer object to be bound.
void setOffset (GLintptr offset)
 Set the starting offset into the buffer object for data for the indexed target.
GLintptr getOffset () const
void setSize (GLsizeiptr size)
 Set the size of data for the indexed target.
GLsizeiptr getSize () const
virtual void apply (State &state) const
 apply the OpenGL state attributes.

Protected Member Functions

 BufferIndexBinding (GLenum target, GLuint index)
 BufferIndexBinding (GLenum target, GLuint index, BufferObject *bo, GLintptr offset, GLsizeiptr size)
 BufferIndexBinding (const BufferIndexBinding &rhs, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
virtual ~BufferIndexBinding ()

Protected Attributes

const GLenum _target
const GLuint _index
ref_ptr< BufferObject_bufferObject
GLintptr _offset
GLsizeiptr _size

Detailed Description

Encapsulate binding buffer objects to index targets.

This specifically supports the uniform buffer and transform feedback targets.


Constructor & Destructor Documentation

osg::BufferIndexBinding::BufferIndexBinding ( GLenum  target,
GLuint  index 
) [protected]
osg::BufferIndexBinding::BufferIndexBinding ( GLenum  target,
GLuint  index,
BufferObject bo,
GLintptr  offset,
GLsizeiptr  size 
) [protected]
osg::BufferIndexBinding::BufferIndexBinding ( const BufferIndexBinding rhs,
const CopyOp copyop = CopyOp::SHALLOW_COPY 
) [protected]
virtual osg::BufferIndexBinding::~BufferIndexBinding ( ) [protected, virtual]

Member Function Documentation

virtual void osg::BufferIndexBinding::apply ( State ) const [virtual]

apply the OpenGL state attributes.

The render info for the current OpenGL context is passed in to allow the StateAttribute to obtain details on the the current context and state.

Reimplemented from osg::StateAttribute.

BufferObject* osg::BufferIndexBinding::getBufferObject ( ) const [inline]

Get the buffer object to be bound.

GLuint osg::BufferIndexBinding::getIndex ( ) const [inline]

Get the index target.

virtual unsigned osg::BufferIndexBinding::getMember ( ) const [inline, virtual]

Return the member identifier within the attribute's class type.

Used for light number/clip plane number etc.

Reimplemented from osg::StateAttribute.

GLintptr osg::BufferIndexBinding::getOffset ( ) const [inline]
GLsizeiptr osg::BufferIndexBinding::getSize ( ) const [inline]
GLenum osg::BufferIndexBinding::getTarget ( ) const [inline]
void osg::BufferIndexBinding::setBufferObject ( BufferObject bo) [inline]

Set the buffer object that will be bound to the index target.

void osg::BufferIndexBinding::setOffset ( GLintptr  offset) [inline]

Set the starting offset into the buffer object for data for the indexed target.

Note: the required alignment on the offset may be quite large (e.g., 256 bytes on NVidia 8600M). This should be checked with glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT...).

void osg::BufferIndexBinding::setSize ( GLsizeiptr  size) [inline]

Set the size of data for the indexed target.


Member Data Documentation

const GLuint osg::BufferIndexBinding::_index [protected]
const GLenum osg::BufferIndexBinding::_target [protected]

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

osg logo
Generated at Mon Oct 3 2011 12:39:41 for the OpenSceneGraph by doxygen 1.7.5.