33 #include "../api_display.h"
34 #include "storage_buffer.h"
43 template<
typename Type>
71 :
StorageBuffer(gc, data, size * sizeof(Type), sizeof(Type), usage)
76 :
StorageBuffer(gc, data.empty() ? (Type*)0 : &data[0], data.size() * sizeof(Type), sizeof(Type), usage)
108 size = size *
sizeof(Type);
116 size = size *
sizeof(Type);
StorageVector(GraphicContext &gc, int size, BufferUsage usage=usage_static_draw)
Constructs a ElementArrayBuffer.
Definition: storage_vector.h:59
StorageVector()
Constructs a null instance.
Definition: storage_vector.h:50
void copy_from(GraphicContext &gc, TransferVector< Type > &buffer, int dest_pos=0, int src_pos=0, int size=-1)
Copies data from transfer buffer.
Definition: storage_vector.h:105
void upload_data(GraphicContext &gc, const Type *data, int size)
Uploads data to storage buffer.
Definition: storage_vector.h:92
void upload_data(GraphicContext &gc, const void *data, int size)
Uploads data to storage buffer.
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.
Definition: buffer_usage.h:46
BufferUsage
Array Buffer usage enum.
Definition: buffer_usage.h:41
void copy_to(GraphicContext &gc, TransferVector< Type > &buffer, int dest_pos=0, int src_pos=0, int size=-1)
Copies data to transfer buffer.
Definition: storage_vector.h:113
StorageVector(GraphicContext &gc, const std::vector< Type > &data, BufferUsage usage=usage_static_draw)
Definition: storage_vector.h:75
Interface to drawing graphics.
Definition: graphic_context.h:257
Transfer Vector.
Definition: transfer_vector.h:42
Storage Buffer.
Definition: storage_buffer.h:48
StorageVector(GraphicContext &gc, Type *data, int size, BufferUsage usage=usage_static_draw)
Constructs a ElementArrayBuffer.
Definition: storage_vector.h:70
void upload_data(GraphicContext &gc, const std::vector< Type > &data)
Uploads data to storage buffer.
Definition: storage_vector.h:98
Storage Buffer Vector.
Definition: storage_vector.h:44