openscenegraph
Public Member Functions | Protected Member Functions | Protected Attributes
osg::BufferIndexBinding Class Reference
Inheritance diagram for osg::BufferIndexBinding:
osg::StateAttribute osg::Object osg::Referenced osg::TransformFeedbackBufferBinding osg::UniformBufferBinding

List of all members.

Public Member Functions

virtual unsigned getMember () const
GLenum getTarget () const
GLuint getIndex () const
void setBufferObject (BufferObject *bo)
BufferObjectgetBufferObject () const
void setOffset (GLintptr offset)
GLintptr getOffset () const
void setSize (GLsizeiptr size)
GLsizeiptr getSize () const
virtual void apply (State &state) const

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]
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.

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.

GLenum osg::BufferIndexBinding::getTarget ( ) const [inline]

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

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...).

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: