31#include "vertex_array_buffer.h"
32#include "transfer_vector.h"
41 template<
typename Type>
77 :
VertexArrayBuffer(gc, data.empty() ? (Type*)0 : &data[0], data.size() * sizeof(Type), usage)
98 size = size *
sizeof(Type);
106 size = size *
sizeof(Type);
Interface to drawing graphics.
Definition: graphic_context.h:257
Transfer Vector.
Definition: transfer_vector.h:42
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.
void upload_data(GraphicContext &gc, int offset, const void *data, int size)
Uploads data to vertex array buffer.
void copy_to(GraphicContext &gc, TransferBuffer &buffer, int dest_pos=0, int src_pos=0, int size=-1)
Copies data to transfer buffer.
Vertex Array Vector.
Definition: vertex_array_vector.h:43
VertexArrayVector(GraphicContext &gc, Type *data, int size, BufferUsage usage=BufferUsage::static_draw)
Constructs a VertexArrayBuffer.
Definition: vertex_array_vector.h:71
void upload_data(GraphicContext &gc, int offset, const Type *data, int size)
Uploads data to vertex array buffer.
Definition: vertex_array_vector.h:82
VertexArrayVector(const VertexArrayBuffer &buffer)
Constructs a VertexArrayBuffer using an existing VertexArrayBuffer.
Definition: vertex_array_vector.h:51
VertexArrayVector()
Constructs a null instance.
Definition: vertex_array_vector.h:46
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:103
VertexArrayVector(GraphicContext &gc, int size, BufferUsage usage=BufferUsage::static_draw)
Constructs a VertexArrayBuffer.
Definition: vertex_array_vector.h:60
void upload_data(GraphicContext &gc, int offset, const std::vector< Type > &data)
Uploads data to vertex array buffer.
Definition: vertex_array_vector.h:88
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:95
VertexArrayVector(GraphicContext &gc, const std::vector< Type > &data, BufferUsage usage=BufferUsage::static_draw)
Definition: vertex_array_vector.h:76
BufferUsage
Array Buffer usage enum.
Definition: buffer_usage.h:39