uicore::StorageVector< Type > Class Template Reference

Typed access to a storage buffer. More...

#include <storage_vector.h>

Public Member Functions

 StorageVector ()
 
 StorageVector (const GraphicContextPtr &gc, int size, BufferUsage usage=usage_static_draw)
 
 StorageVector (const GraphicContextPtr &gc, Type *data, int size, BufferUsage usage=usage_static_draw)
 
 StorageVector (const GraphicContextPtr &gc, const std::vector< Type > &data, BufferUsage usage=usage_static_draw)
 
const StorageBufferPtrbuffer () const
 Returns the storage buffer used by the vector. More...
 
void copy_from (const GraphicContextPtr &gc, StagingVector< Type > &buffer, int dest_pos=0, int src_pos=0, int size=-1)
 Copies data from transfer buffer. More...
 
void copy_to (const GraphicContextPtr &gc, StagingVector< Type > &buffer, int dest_pos=0, int src_pos=0, int size=-1)
 Copies data to transfer buffer. More...
 
 operator const StorageBufferPtr & () const
 
void upload_data (const GraphicContextPtr &gc, const Type *data, int size)
 Uploads data to storage buffer. More...
 
void upload_data (const GraphicContextPtr &gc, const std::vector< Type > &data)
 Uploads data to storage buffer. More...
 

Detailed Description

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

Typed access to a storage buffer.

Constructor & Destructor Documentation

template<typename Type >
uicore::StorageVector< Type >::StorageVector ( )
inline
template<typename Type >
uicore::StorageVector< Type >::StorageVector ( const GraphicContextPtr gc,
int  size,
BufferUsage  usage = usage_static_draw 
)
inline
template<typename Type >
uicore::StorageVector< Type >::StorageVector ( const GraphicContextPtr gc,
Type *  data,
int  size,
BufferUsage  usage = usage_static_draw 
)
inline
template<typename Type >
uicore::StorageVector< Type >::StorageVector ( const GraphicContextPtr gc,
const std::vector< Type > &  data,
BufferUsage  usage = usage_static_draw 
)
inline

Member Function Documentation

template<typename Type >
const StorageBufferPtr& uicore::StorageVector< Type >::buffer ( ) const
inline

Returns the storage buffer used by the vector.

Referenced by uicore::StorageVector< Type >::operator const StorageBufferPtr &().

template<typename Type >
void uicore::StorageVector< Type >::copy_from ( const GraphicContextPtr gc,
StagingVector< Type > &  buffer,
int  dest_pos = 0,
int  src_pos = 0,
int  size = -1 
)
inline

Copies data from transfer buffer.

template<typename Type >
void uicore::StorageVector< Type >::copy_to ( const GraphicContextPtr gc,
StagingVector< Type > &  buffer,
int  dest_pos = 0,
int  src_pos = 0,
int  size = -1 
)
inline

Copies data to transfer buffer.

template<typename Type >
uicore::StorageVector< Type >::operator const StorageBufferPtr & ( ) const
inline
template<typename Type >
void uicore::StorageVector< Type >::upload_data ( const GraphicContextPtr 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.

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

Uploads data to storage buffer.


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