clan::ElementArrayBuffer Class Reference

Element Array Buffer. More...

#include <element_array_buffer.h>

+ Inheritance diagram for clan::ElementArrayBuffer:

Public Member Functions

 ElementArrayBuffer ()
 Constructs a null instance. More...
 
 ElementArrayBuffer (GraphicContext &gc, int size, BufferUsage usage=usage_static_draw)
 Constructs a ElementArrayBuffer. More...
 
 ElementArrayBuffer (GraphicContext &gc, const void *data, int size, BufferUsage usage=usage_static_draw)
 Constructs a ElementArrayBuffer. More...
 
virtual ~ElementArrayBuffer ()
 
void copy_from (GraphicContext &gc, TransferBuffer &buffer, int dest_pos=0, int src_pos=0, int size=-1)
 Copies data from transfer buffer. More...
 
void copy_to (GraphicContext &gc, TransferBuffer &buffer, int dest_pos=0, int src_pos=0, int size=-1)
 Copies data to transfer buffer. More...
 
ElementArrayBufferProviderget_provider () const
 Get Provider. More...
 
bool is_null () const
 Returns true if this object is invalid. More...
 
 operator bool () const
 
bool operator== (const ElementArrayBuffer &other) const
 Handle comparison operator. More...
 
void throw_if_null () const
 Throw an exception if this object is invalid. More...
 
void upload_data (GraphicContext &gc, const void *data, int size)
 Uploads data to element array buffer. More...
 

Detailed Description

Element Array Buffer.

Constructor & Destructor Documentation

clan::ElementArrayBuffer::ElementArrayBuffer ( )

Constructs a null instance.

clan::ElementArrayBuffer::ElementArrayBuffer ( GraphicContext gc,
int  size,
BufferUsage  usage = usage_static_draw 
)

Constructs a ElementArrayBuffer.

Parameters
gc= Graphic Context
size= value
usage= Buffer Usage
clan::ElementArrayBuffer::ElementArrayBuffer ( GraphicContext gc,
const void *  data,
int  size,
BufferUsage  usage = usage_static_draw 
)

Constructs a ElementArrayBuffer.

Parameters
gc= Graphic Context
data= void
size= value
usage= Buffer Usage
virtual clan::ElementArrayBuffer::~ElementArrayBuffer ( )
virtual

Member Function Documentation

void clan::ElementArrayBuffer::copy_from ( GraphicContext gc,
TransferBuffer buffer,
int  dest_pos = 0,
int  src_pos = 0,
int  size = -1 
)

Copies data from transfer buffer.

Referenced by clan::ElementArrayVector< Type >::copy_from().

void clan::ElementArrayBuffer::copy_to ( GraphicContext gc,
TransferBuffer buffer,
int  dest_pos = 0,
int  src_pos = 0,
int  size = -1 
)

Copies data to transfer buffer.

Referenced by clan::ElementArrayVector< Type >::copy_to().

ElementArrayBufferProvider* clan::ElementArrayBuffer::get_provider ( ) const

Get Provider.

Returns
provider
bool clan::ElementArrayBuffer::is_null ( ) const
inline

Returns true if this object is invalid.

clan::ElementArrayBuffer::operator bool ( ) const
inlineexplicit
bool clan::ElementArrayBuffer::operator== ( const ElementArrayBuffer other) const

Handle comparison operator.

void clan::ElementArrayBuffer::throw_if_null ( ) const

Throw an exception if this object is invalid.

void clan::ElementArrayBuffer::upload_data ( GraphicContext gc,
const void *  data,
int  size 
)

Uploads data to element array buffer.

The size specified must match the size of the buffer and is only included to help guard against buffer overruns.

Referenced by clan::ElementArrayVector< Type >::upload_data().


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