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