Osiris Framework  0.3
OMeshBuffer< BType > Class Template Reference

Template class designed to handle OpenGL mesh buffers. More...

#include <OsirisSDK/OMeshBuffer.hpp>

Public Member Functions

 OMeshBuffer ()
 Class constructor.
 
virtual ~OMeshBuffer ()
 Class destructor.
 
void setSize (unsigned int size)
 Set buffer size. More...
 
void addData (BType x)
 Add a buffer data value.
 
void addData (BType x, BType y)
 Add two-dimensional buffer data.
 
void addData (BType x, BType y, BType z)
 Add three-dimensional buffer data.
 
void addData (BType x, BType y, BType z, BType w)
 Add four-dimensional buffer data.
 
const BType * buffer () const
 Returns the mesh buffer. More...
 
int count () const
 Number of data items added to the buffer.
 
GLuint generateGLBufferObject (GLenum bufferType)
 Generate and bind the buffer as an OpenGL object. More...
 
GLuint glReference () const
 Retuns the buffer's OpenGL reference ID.
 

Detailed Description

template<class BType>
class OMeshBuffer< BType >

Template class designed to handle OpenGL mesh buffers.

Member Function Documentation

template<class BType>
const BType* OMeshBuffer< BType >::buffer ( ) const

Returns the mesh buffer.

Returns
Pointer to the memory area containing the buffer.
template<class BType>
GLuint OMeshBuffer< BType >::generateGLBufferObject ( GLenum  bufferType)

Generate and bind the buffer as an OpenGL object.

Returns
Buffer's OpenGL reference ID.
template<class BType>
void OMeshBuffer< BType >::setSize ( unsigned int  size)

Set buffer size.

Parameters
sizeNew buffer size in bytes.

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