32 #include "vertex_array_buffer.h"
33 #include "transfer_vector.h"
42 template<
typename Type>
80 :
VertexArrayBuffer(gc, data.empty() ? (Type*)0 : &data[0], data.size() * sizeof(Type), usage)
110 size = size *
sizeof(Type);
118 size = size *
sizeof(Type);
void upload_data(GraphicContext &gc, int offset, const void *data, int size)
Uploads data to vertex array buffer.
VertexArrayVector()
Constructs a null instance.
Definition: vertex_array_vector.h:49
Vertex Array Buffer.
Definition: vertex_array_buffer.h:46
void copy_from(GraphicContext &gc, TransferBuffer &buffer, int dest_pos=0, int src_pos=0, int size=-1)
Copies data from transfer buffer.
VertexArrayVector(GraphicContext &gc, int size, BufferUsage usage=usage_static_draw)
Constructs a VertexArrayBuffer.
Definition: vertex_array_vector.h:63
void upload_data(GraphicContext &gc, int offset, const Type *data, int size)
Uploads data to vertex array buffer.
Definition: vertex_array_vector.h:94
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: vertex_array_vector.h:115
VertexArrayVector(const VertexArrayBuffer &buffer)
Constructs a VertexArrayBuffer using an existing VertexArrayBuffer.
Definition: vertex_array_vector.h:54
Definition: buffer_usage.h:45
BufferUsage
Array Buffer usage enum.
Definition: buffer_usage.h:40
Interface to drawing graphics.
Definition: graphic_context.h:257
Transfer Vector.
Definition: transfer_vector.h:42
VertexArrayVector(GraphicContext &gc, Type *data, int size, BufferUsage usage=usage_static_draw)
Constructs a VertexArrayBuffer.
Definition: vertex_array_vector.h:74
void upload_data(GraphicContext &gc, int offset, const std::vector< Type > &data)
Uploads data to vertex array buffer.
Definition: vertex_array_vector.h:100
void copy_to(GraphicContext &gc, TransferBuffer &buffer, int dest_pos=0, int src_pos=0, int size=-1)
Copies data to transfer buffer.
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: vertex_array_vector.h:107
VertexArrayVector(GraphicContext &gc, const std::vector< Type > &data, BufferUsage usage=usage_static_draw)
Definition: vertex_array_vector.h:79
Vertex Array Vector.
Definition: vertex_array_vector.h:43