clan::TransferBuffer Class Reference

Transfer Buffer. More...

#include <transfer_buffer.h>

+ Inheritance diagram for clan::TransferBuffer:

Public Member Functions

 TransferBuffer ()
 Constructs a null instance. More...
 
 TransferBuffer (GraphicContext &gc, int size, BufferUsage usage=usage_dynamic_copy)
 Constructs a transfer buffer. More...
 
 TransferBuffer (GraphicContext &gc, const void *data, int size, BufferUsage usage=usage_dynamic_copy)
 Constructs a transfer buffer. More...
 
virtual ~TransferBuffer ()
 
void * get_data ()
 Retrieves a pointer to the mapped buffer. More...
 
TransferBufferProviderget_provider () const
 Get Provider. More...
 
bool is_null () const
 Returns true if this object is invalid. More...
 
void lock (GraphicContext &gc, BufferAccess access)
 Maps buffer into system memory. More...
 
 operator bool () const
 
bool operator== (const TransferBuffer &other) const
 Handle comparison operator. More...
 
void throw_if_null () const
 Throw an exception if this object is invalid. More...
 
void unlock ()
 Unmaps buffer. More...
 
void upload_data (GraphicContext &gc, int offset, const void *data, int size)
 Uploads data to transfer buffer. More...
 

Detailed Description

Transfer Buffer.

Constructor & Destructor Documentation

clan::TransferBuffer::TransferBuffer ( )

Constructs a null instance.

clan::TransferBuffer::TransferBuffer ( GraphicContext gc,
int  size,
BufferUsage  usage = usage_dynamic_copy 
)

Constructs a transfer buffer.

Parameters
gc= Graphic Context
size= value
usage= Buffer Usage
clan::TransferBuffer::TransferBuffer ( GraphicContext gc,
const void *  data,
int  size,
BufferUsage  usage = usage_dynamic_copy 
)

Constructs a transfer buffer.

Parameters
gc= Graphic Context
data= void
size= value
usage= Buffer Usage
virtual clan::TransferBuffer::~TransferBuffer ( )
virtual

Member Function Documentation

void* clan::TransferBuffer::get_data ( )

Retrieves a pointer to the mapped buffer.

Referenced by clan::TransferVector< Type >::get_data().

TransferBufferProvider* clan::TransferBuffer::get_provider ( ) const

Get Provider.

Returns
provider
bool clan::TransferBuffer::is_null ( ) const
inline

Returns true if this object is invalid.

void clan::TransferBuffer::lock ( GraphicContext gc,
BufferAccess  access 
)

Maps buffer into system memory.

clan::TransferBuffer::operator bool ( ) const
inlineexplicit
bool clan::TransferBuffer::operator== ( const TransferBuffer other) const

Handle comparison operator.

void clan::TransferBuffer::throw_if_null ( ) const

Throw an exception if this object is invalid.

void clan::TransferBuffer::unlock ( )

Unmaps buffer.

void clan::TransferBuffer::upload_data ( GraphicContext gc,
int  offset,
const void *  data,
int  size 
)

Uploads data to transfer buffer.

Referenced by clan::TransferVector< Type >::upload_data().


The documentation for this class was generated from the following file: