VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Attributes
makVrv::DtBufferObject Class Reference

A class the wraps a OpenGL Array Buffer object. More...

Public Types

enum  ArrayType {
  Vertex3, Vertex4, Color3, Color4,
  Normal, TextureCoordinate
}
enum  Usage { Static, Dynamic, Stream }

Public Member Functions

 DtBufferObject (Usage usage)
 Construct with the usage.
 ~DtBufferObject ()
 Destroys the buffers.
void resize (unsigned int sizeBytes)
unsigned int size () const
unsigned int objectId () const
 Get the object id.
void setData (const float *data, unsigned int sizeBytes)
void uploadData (unsigned int offsetBytes, unsigned int sizeBytes, const float *data)
void bind (ArrayType type, unsigned int stride=0, unsigned int offset=0, unsigned int textureUnit=0)
void unbind (ArrayType type, unsigned int textureUnit=0)

Protected Attributes

unsigned int myVertexBufferObjectId
unsigned int myUsage
unsigned int mySize

Detailed Description

A class the wraps a OpenGL Array Buffer object.

Member Enumeration Documentation

Enumerator:
Vertex3 
Vertex4 
Color3 
Color4 
Normal 
TextureCoordinate 
Enumerator:
Static 
Dynamic 
Stream 

Constructor & Destructor Documentation

makVrv::DtBufferObject::DtBufferObject ( Usage  usage)

Construct with the usage.

makVrv::DtBufferObject::~DtBufferObject ( )

Destroys the buffers.

Member Function Documentation

void makVrv::DtBufferObject::resize ( unsigned int  sizeBytes)
unsigned int makVrv::DtBufferObject::size ( ) const
unsigned int makVrv::DtBufferObject::objectId ( ) const
inline

Get the object id.

void makVrv::DtBufferObject::setData ( const float *  data,
unsigned int  sizeBytes 
)
void makVrv::DtBufferObject::uploadData ( unsigned int  offsetBytes,
unsigned int  sizeBytes,
const float *  data 
)
void makVrv::DtBufferObject::bind ( ArrayType  type,
unsigned int  stride = 0,
unsigned int  offset = 0,
unsigned int  textureUnit = 0 
)
void makVrv::DtBufferObject::unbind ( ArrayType  type,
unsigned int  textureUnit = 0 
)

Member Data Documentation

unsigned int makVrv::DtBufferObject::myVertexBufferObjectId
protected
unsigned int makVrv::DtBufferObject::myUsage
protected
unsigned int makVrv::DtBufferObject::mySize
protected

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

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)