omegalib  13.1
omega::VertexBuffer Class Reference

A buffer containing per-vertex data. More...

#include <GpuBuffer.h>

Classes

struct  VertexAttribute
 

Public Types

enum  BufferType { VertexData, IndexData }
 
enum  AttributeType {
  Float, Int, Byte, UnsignedByte,
  Double
}
 

Public Member Functions

virtual void dispose ()
 
void setType (BufferType type)
 
BufferType getType ()
 
bool setData (size_t size, void *data)
 
void bind ()
 
void unbind ()
 
void setAttribute (uint index, AttributeType type, uint components=1, bool normalize=false, uint offset=0, uint stride=0)
 
const VertexAttributegetAttribute (uint index)
 
void clearAttributes ()
 
void bindVertexAttribute (uint index, uint location)
 
- Public Member Functions inherited from omega::GpuResource
 GpuResource (GpuContext *ctx)
 
GpuContextgetContext ()
 
- Public Member Functions inherited from omicron::ReferenceType
 ReferenceType ()
 
virtual ~ReferenceType ()
 
void ref ()
 
void unref ()
 
long refCount ()
 

Static Public Attributes

static const int MaxAttributes = 8
 

Protected Member Functions

 VertexBuffer (GpuContext *context)
 

Friends

class GpuContext
 

Additional Inherited Members

- Static Public Member Functions inherited from omicron::ReferenceType
static void printObjCounts ()
 
- Static Protected Attributes inherited from omicron::ReferenceType
static List< ReferenceType * > mysObjList
 

Detailed Description

A buffer containing per-vertex data.

+ Inheritance diagram for omega::VertexBuffer:

Member Enumeration Documentation

Enumerator
Float 
Int 
Byte 
UnsignedByte 
Double 
Enumerator
VertexData 
IndexData 

Constructor & Destructor Documentation

omega::VertexBuffer::VertexBuffer ( GpuContext context)
protected

Member Function Documentation

void omega::VertexBuffer::bind ( )
void omega::VertexBuffer::bindVertexAttribute ( uint  index,
uint  location 
)
void omega::VertexBuffer::clearAttributes ( )
virtual void omega::VertexBuffer::dispose ( )
virtual

Implements omega::GpuResource.

const VertexAttribute& omega::VertexBuffer::getAttribute ( uint  index)
inline
BufferType omega::VertexBuffer::getType ( )
inline
void omega::VertexBuffer::setAttribute ( uint  index,
AttributeType  type,
uint  components = 1,
bool  normalize = false,
uint  offset = 0,
uint  stride = 0 
)
bool omega::VertexBuffer::setData ( size_t  size,
void *  data 
)
void omega::VertexBuffer::setType ( BufferType  type)
void omega::VertexBuffer::unbind ( )

Friends And Related Function Documentation

friend class GpuContext
friend

Member Data Documentation

const int omega::VertexBuffer::MaxAttributes = 8
static

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