32#include "../Image/buffer_usage.h"
42 class VertexArrayBuffer_Impl;
70 explicit operator bool()
const {
return bool(impl); }
93 std::shared_ptr<VertexArrayBuffer_Impl> impl;
Interface to drawing graphics.
Definition graphic_context.h:257
Transfer Buffer.
Definition transfer_buffer.h:45
Vertex Array Buffer provider.
Definition vertex_array_buffer_provider.h:42
bool operator==(const VertexArrayBuffer &other) const
Handle comparison operator.
void copy_from(GraphicContext &gc, TransferBuffer &buffer, int dest_pos=0, int src_pos=0, int size=-1)
Copies data from transfer buffer.
VertexArrayBuffer(GraphicContext &gc, int size, BufferUsage usage=BufferUsage::static_draw)
Constructs a VertexArrayBuffer.
virtual ~VertexArrayBuffer()
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.
void throw_if_null() const
Throw an exception if this object is invalid.
VertexArrayBufferProvider * get_provider() const
Get Provider.
VertexArrayBuffer(GraphicContext &gc, const void *data, int size, BufferUsage usage=BufferUsage::static_draw)
Constructs a VertexArrayBuffer.
bool is_null() const
Returns true if this object is invalid.
Definition vertex_array_buffer.h:69
VertexArrayBuffer()
Constructs a null instance.
BufferUsage
Array Buffer usage enum.
Definition buffer_usage.h:39
@ static_draw
Definition buffer_usage.h:43