VR-Forces 4.0.4 Class Documentation
Public Types | Public Member Functions | Protected Attributes
makVrv::DtBufferObject Class Reference

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

List of all members.

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

Construct with the usage.

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::myUsage [protected]
unsigned int makVrv::DtBufferObject::mySize [protected]

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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)