Castor3D
..
|
Base class for renderer dependant buffers. More...
Public Member Functions | |
GpuBuffer (RenderSystem &p_renderSystem) | |
Constructor. More... | |
virtual | ~GpuBuffer () |
Destructor. More... | |
virtual bool | Create () |
Creation function. More... | |
virtual void | Destroy () |
Destruction function. More... | |
virtual bool | Initialise (eBUFFER_ACCESS_TYPE p_type, eBUFFER_ACCESS_NATURE p_nature)=0 |
Initialisation function, used by VBOs. More... | |
virtual void | Cleanup () |
Cleanup function. More... | |
virtual T * | Lock (uint32_t p_offset, uint32_t p_count, uint32_t p_flags)=0 |
Locks the buffer, id est maps it into memory so we can modify it. More... | |
virtual void | Unlock ()=0 |
Unlocks the buffer, id est unmaps it from memory so no modification can be made after that. More... | |
virtual bool | Bind ()=0 |
Activation function, to tell the GPU it is active. More... | |
virtual bool | Bind (bool p_instantiated) |
Activation function, to tell the GPU it is active. More... | |
virtual void | Unbind ()=0 |
Deactivation function, to tell the GPU it is inactive. More... | |
virtual bool | Fill (T const *p_buffer, ptrdiff_t p_size, Castor3D::eBUFFER_ACCESS_TYPE p_type, Castor3D::eBUFFER_ACCESS_NATURE p_nature)=0 |
Transmits data to the GPU buffer from RAM. More... | |
Protected Types | |
typedef Castor3D::CpuBuffer< T > * | HardwareBufferPtr |
Base class for renderer dependant buffers.
|
protected |
|
inline |
Constructor.
|
inlinevirtual |
Destructor.
|
pure virtual |
Activation function, to tell the GPU it is active.
true
if successful
|
inlinevirtual |
Activation function, to tell the GPU it is active.
[in] | p_instantiated | Tells if the buffer is instantiated |
true
if successful
|
inlinevirtual |
Cleanup function.
|
inlinevirtual |
Creation function.
true
if OK
|
inlinevirtual |
Destruction function.
|
pure virtual |
Transmits data to the GPU buffer from RAM.
[in] | p_buffer | The data |
[in] | p_size | Data buffer size |
[in] | p_type | Transfer type |
[in] | p_nature | Transfer nature |
true
if successful
|
pure virtual |
Initialisation function, used by VBOs.
[in] | p_type | Buffer access type |
[in] | p_nature | Buffer access nature |
true
if OK
|
pure virtual |
Locks the buffer, id est maps it into memory so we can modify it.
[in] | p_offset | The start offset in the buffer |
[in] | p_count | The mapped elements count |
[in] | p_flags | The lock flags |
|
pure virtual |
Deactivation function, to tell the GPU it is inactive.
|
pure virtual |
Unlocks the buffer, id est unmaps it from memory so no modification can be made after that.