32#include "../Image/buffer_usage.h"
40 class TransferBufferProvider;
41 class TransferBuffer_Impl;
69 explicit operator bool()
const {
return bool(impl); }
95 std::shared_ptr<TransferBuffer_Impl> impl;
Interface to drawing graphics.
Definition: graphic_context.h:257
Transfer Buffer provider.
Definition: transfer_buffer_provider.h:42
Transfer Buffer.
Definition: transfer_buffer.h:45
void * get_data()
Retrieves a pointer to the mapped buffer.
TransferBufferProvider * get_provider() const
Get Provider.
void upload_data(GraphicContext &gc, int offset, const void *data, int size)
Uploads data to transfer buffer.
bool is_null() const
Returns true if this object is invalid.
Definition: transfer_buffer.h:68
virtual ~TransferBuffer()
bool operator==(const TransferBuffer &other) const
Handle comparison operator.
TransferBuffer(GraphicContext &gc, const void *data, int size, BufferUsage usage=BufferUsage::dynamic_copy)
Constructs a transfer buffer.
void unlock()
Unmaps buffer.
void lock(GraphicContext &gc, BufferAccess access)
Maps buffer into system memory.
TransferBuffer(GraphicContext &gc, int size, BufferUsage usage=BufferUsage::dynamic_copy)
Constructs a transfer buffer.
void throw_if_null() const
Throw an exception if this object is invalid.
TransferBuffer()
Constructs a null instance.
BufferAccess
Array Buffer access enum.
Definition: buffer_usage.h:53
BufferUsage
Array Buffer usage enum.
Definition: buffer_usage.h:39