clan::ElementArrayVector< Type > Class Template Reference

Element Array Vector. More...

#include <element_array_vector.h>

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

Public Member Functions

 ElementArrayVector ()
 Constructs a null instance.
 
 ElementArrayVector (GraphicContext &gc, const std::vector< Type > &data, BufferUsage usage=BufferUsage::static_draw)
 
 ElementArrayVector (GraphicContext &gc, int size, BufferUsage usage=BufferUsage::static_draw)
 Constructs a ElementArrayBuffer.
 
 ElementArrayVector (GraphicContext &gc, Type *data, int size, BufferUsage usage=BufferUsage::static_draw)
 Constructs a ElementArrayBuffer.
 
void copy_from (GraphicContext &gc, TransferVector< Type > &buffer, int dest_pos=0, int src_pos=0, int size=-1)
 Copies data from transfer buffer.
 
void copy_to (GraphicContext &gc, TransferVector< Type > &buffer, int dest_pos=0, int src_pos=0, int size=-1)
 Copies data to transfer buffer.
 
void upload_data (GraphicContext &gc, const std::vector< Type > &data)
 Uploads data to element array buffer.
 
void upload_data (GraphicContext &gc, const Type *data, int size)
 Uploads data to element array buffer.
 
- Public Member Functions inherited from clan::ElementArrayBuffer
 ElementArrayBuffer ()
 Constructs a null instance.
 
 ElementArrayBuffer (GraphicContext &gc, const void *data, int size, BufferUsage usage=BufferUsage::static_draw)
 Constructs a ElementArrayBuffer.
 
 ElementArrayBuffer (GraphicContext &gc, int size, BufferUsage usage=BufferUsage::static_draw)
 Constructs a ElementArrayBuffer.
 
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.
 
void copy_to (GraphicContext &gc, TransferBuffer &buffer, int dest_pos=0, int src_pos=0, int size=-1)
 Copies data to transfer buffer.
 
ElementArrayBufferProviderget_provider () const
 Get Provider.
 
bool is_null () const
 Returns true if this object is invalid.
 
 operator bool () const
 
bool operator== (const ElementArrayBuffer &other) const
 Handle comparison operator.
 
void throw_if_null () const
 Throw an exception if this object is invalid.
 
void upload_data (GraphicContext &gc, const void *data, int size)
 Uploads data to element array buffer.
 

Detailed Description

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

Element Array Vector.

Constructor & Destructor Documentation

◆ ElementArrayVector() [1/4]

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

Constructs a null instance.

◆ ElementArrayVector() [2/4]

template<typename Type >
clan::ElementArrayVector< Type >::ElementArrayVector ( GraphicContext & gc,
int size,
BufferUsage usage = BufferUsage::static_draw )
inline

Constructs a ElementArrayBuffer.

Parameters
gc= Graphic Context
size= value
usage= Buffer Usage

◆ ElementArrayVector() [3/4]

template<typename Type >
clan::ElementArrayVector< Type >::ElementArrayVector ( GraphicContext & gc,
Type * data,
int size,
BufferUsage usage = BufferUsage::static_draw )
inline

Constructs a ElementArrayBuffer.

Parameters
gc= Graphic Context
data= void
size= value
usage= Buffer Usage

◆ ElementArrayVector() [4/4]

template<typename Type >
clan::ElementArrayVector< Type >::ElementArrayVector ( GraphicContext & gc,
const std::vector< Type > & data,
BufferUsage usage = BufferUsage::static_draw )
inline

Member Function Documentation

◆ copy_from()

template<typename Type >
void clan::ElementArrayVector< 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::ElementArrayBuffer::copy_from().

◆ copy_to()

template<typename Type >
void clan::ElementArrayVector< 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::ElementArrayBuffer::copy_to().

◆ upload_data() [1/2]

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

Uploads data to element array buffer.

References clan::ElementArrayBuffer::upload_data().

◆ upload_data() [2/2]

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

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.

References clan::ElementArrayBuffer::upload_data().


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