clan::StorageVector< Type > Class Template Reference

Storage Buffer Vector. More...

#include <storage_vector.h>

+ Inheritance diagram for clan::StorageVector< Type >:

Public Member Functions

 StorageVector ()
 Constructs a null instance. More...
 
 StorageVector (GraphicContext &gc, int size, BufferUsage usage=usage_static_draw)
 Constructs a ElementArrayBuffer. More...
 
 StorageVector (GraphicContext &gc, Type *data, int size, BufferUsage usage=usage_static_draw)
 Constructs a ElementArrayBuffer. More...
 
 StorageVector (GraphicContext &gc, const std::vector< Type > &data, BufferUsage usage=usage_static_draw)
 
void copy_from (GraphicContext &gc, TransferVector< Type > &buffer, int dest_pos=0, int src_pos=0, int size=-1)
 Copies data from transfer buffer. More...
 
void copy_to (GraphicContext &gc, TransferVector< Type > &buffer, int dest_pos=0, int src_pos=0, int size=-1)
 Copies data to transfer buffer. More...
 
void upload_data (GraphicContext &gc, const Type *data, int size)
 Uploads data to storage buffer. More...
 
void upload_data (GraphicContext &gc, const std::vector< Type > &data)
 Uploads data to storage buffer. More...
 
- Public Member Functions inherited from clan::StorageBuffer
 StorageBuffer ()
 Constructs a null instance. More...
 
 StorageBuffer (GraphicContext &gc, int size, int stride, BufferUsage usage=usage_dynamic_draw)
 Constructs a buffer. More...
 
 StorageBuffer (GraphicContext &gc, const void *data, int size, int stride, BufferUsage usage=usage_dynamic_draw)
 Constructs a buffer. More...
 
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...
 
StorageBufferProviderget_provider () const
 Get Provider. More...
 
bool is_null () const
 Returns true if this object is invalid. More...
 
 operator bool () const
 
bool operator== (const StorageBuffer &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 storage buffer. More...
 

Detailed Description

template<typename Type>
class clan::StorageVector< Type >

Storage Buffer Vector.

Constructor & Destructor Documentation

template<typename Type >
clan::StorageVector< Type >::StorageVector ( )
inline

Constructs a null instance.

template<typename Type >
clan::StorageVector< Type >::StorageVector ( GraphicContext gc,
int  size,
BufferUsage  usage = usage_static_draw 
)
inline

Constructs a ElementArrayBuffer.

Parameters
gc= Graphic Context
size= value
usage= Buffer Usage
template<typename Type >
clan::StorageVector< Type >::StorageVector ( GraphicContext gc,
Type *  data,
int  size,
BufferUsage  usage = usage_static_draw 
)
inline

Constructs a ElementArrayBuffer.

Parameters
gc= Graphic Context
data= void
size= value
usage= Buffer Usage
template<typename Type >
clan::StorageVector< Type >::StorageVector ( GraphicContext gc,
const std::vector< Type > &  data,
BufferUsage  usage = usage_static_draw 
)
inline

Member Function Documentation

template<typename Type >
void clan::StorageVector< Type >::copy_from ( GraphicContext gc,
TransferVector< Type > &  buffer,
int  dest_pos = 0,
int  src_pos = 0,
int  size = -1 
)
inline

Copies data from transfer buffer.

References clan::StorageBuffer::copy_from().

template<typename Type >
void clan::StorageVector< Type >::copy_to ( GraphicContext gc,
TransferVector< Type > &  buffer,
int  dest_pos = 0,
int  src_pos = 0,
int  size = -1 
)
inline

Copies data to transfer buffer.

References clan::StorageBuffer::copy_to().

template<typename Type >
void clan::StorageVector< Type >::upload_data ( GraphicContext gc,
const Type *  data,
int  size 
)
inline

Uploads data to storage buffer.

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

References clan::StorageBuffer::upload_data().

template<typename Type >
void clan::StorageVector< Type >::upload_data ( GraphicContext gc,
const std::vector< Type > &  data 
)
inline

Uploads data to storage buffer.

References clan::StorageBuffer::upload_data().


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