33 #include "../Image/buffer_usage.h"
41 class TransferBufferProvider;
42 class TransferBuffer_Impl;
108 std::shared_ptr<TransferBuffer_Impl> impl;
@ usage_dynamic_copy
Definition: buffer_usage.h:50
void unlock()
Unmaps buffer.
void upload_data(GraphicContext &gc, int offset, const void *data, int size)
Uploads data to transfer buffer.
bool operator==(const TransferBuffer &other) const
Handle comparison operator.
void lock(GraphicContext &gc, BufferAccess access)
Maps buffer into system memory.
Transfer Buffer.
Definition: transfer_buffer.h:46
Transfer Buffer provider.
Definition: transfer_buffer_provider.h:43
TransferBufferProvider * get_provider() const
Get Provider.
TransferBuffer(GraphicContext &gc, int size, BufferUsage usage=usage_dynamic_copy)
Constructs a transfer buffer.
BufferUsage
Array Buffer usage enum.
Definition: buffer_usage.h:41
Interface to drawing graphics.
Definition: graphic_context.h:258
TransferBuffer()
Constructs a null instance.
virtual ~TransferBuffer()
void * get_data()
Retrieves a pointer to the mapped buffer.
BufferAccess
Array Buffer access enum.
Definition: buffer_usage.h:55
void throw_if_null() const
Throw an exception if this object is invalid.
TransferBuffer(GraphicContext &gc, const void *data, int size, BufferUsage usage=usage_dynamic_copy)
Constructs a transfer buffer.
bool is_null() const
Returns true if this object is invalid.
Definition: transfer_buffer.h:75