iRenderBuffer Struct Reference
[3D]
This is a general buffer. More...
#include <ivideo/rndbuf.h>
Public Member Functions | |
virtual void | CopyInto (const void *data, size_t elementCount, size_t elemOffset=0)=0 |
Copy data to the render buffer. | |
virtual csRenderBufferType | GetBufferType () const =0 |
Get type of buffer (static/dynamic). | |
virtual int | GetComponentCount () const =0 |
Gets the number of components per element. | |
virtual csRenderBufferComponentType | GetComponentType () const =0 |
Gets the component type (float, int, etc). | |
virtual size_t | GetElementCount () const =0 |
Number of elements in a buffer. | |
virtual size_t | GetElementDistance () const =0 |
Get the distance between two elements (in bytes, includes stride). | |
virtual iRenderBuffer * | GetMasterBuffer () const =0 |
Get the master buffer in case this is an interleaved buffer. | |
virtual size_t | GetOffset () const =0 |
Get the offset of the buffer (in bytes). | |
virtual size_t | GetRangeEnd () const =0 |
The highest index contained in this buffer, only valid for index buffers. | |
virtual size_t | GetRangeStart () const =0 |
The lowest index contained in this buffer, only valid for index buffers. | |
virtual size_t | GetSize () const =0 |
Get the size of the buffer (in bytes). | |
virtual size_t | GetStride () const =0 |
Get the stride of the buffer (in bytes). | |
virtual uint | GetVersion ()=0 |
Get version. | |
virtual bool | IsIndexBuffer () const =0 |
Whether the buffer is an index buffer. | |
virtual void * | Lock (csRenderBufferLockType lockType)=0 |
Lock the buffer to allow reading or writing to it directly. | |
virtual void | Release ()=0 |
Releases the buffer. | |
virtual void | SetCallback (iRenderBufferCallback *cb)=0 |
Set callback object to use. | |
virtual void | SetData (const void *data)=0 |
Set the buffer data. |
Detailed Description
This is a general buffer.
Main creators of instances implementing this interface:
- csRenderBuffer::CreateRenderBuffer()
- csRenderBuffer::CreateIndexRenderBuffer()
- csRenderBuffer::CreateInterleavedRenderBuffers()
- See also:
- csRenderBuffer
Definition at line 173 of file rndbuf.h.
Member Function Documentation
virtual void iRenderBuffer::CopyInto | ( | const void * | data, | |
size_t | elementCount, | |||
size_t | elemOffset = 0 | |||
) | [pure virtual] |
Copy data to the render buffer.
- Remarks:
- Do not call on a locked buffer. Does not work with interleaved buffer, copy to master buffer instead.
Implemented in csRenderBuffer, and CS::RenderBufferPersistent.
virtual csRenderBufferType iRenderBuffer::GetBufferType | ( | ) | const [pure virtual] |
Get type of buffer (static/dynamic).
Implemented in csRenderBuffer, and CS::RenderBufferPersistent.
virtual int iRenderBuffer::GetComponentCount | ( | ) | const [pure virtual] |
Gets the number of components per element.
Implemented in csRenderBuffer, and CS::RenderBufferPersistent.
virtual csRenderBufferComponentType iRenderBuffer::GetComponentType | ( | ) | const [pure virtual] |
Gets the component type (float, int, etc).
Implemented in csRenderBuffer, and CS::RenderBufferPersistent.
virtual size_t iRenderBuffer::GetElementCount | ( | ) | const [pure virtual] |
Number of elements in a buffer.
Implemented in csRenderBuffer, and CS::RenderBufferPersistent.
virtual size_t iRenderBuffer::GetElementDistance | ( | ) | const [pure virtual] |
Get the distance between two elements (in bytes, includes stride).
Implemented in csRenderBuffer, and CS::RenderBufferPersistent.
virtual iRenderBuffer* iRenderBuffer::GetMasterBuffer | ( | ) | const [pure virtual] |
Get the master buffer in case this is an interleaved buffer.
The master buffer is the buffer that actually holds the data; while it can be used to retrieve or set data, it must not be used for actual rendering. Use the interleaved buffers instead.
Implemented in csRenderBuffer, and CS::RenderBufferPersistent.
virtual size_t iRenderBuffer::GetOffset | ( | ) | const [pure virtual] |
Get the offset of the buffer (in bytes).
Implemented in csRenderBuffer, and CS::RenderBufferPersistent.
virtual size_t iRenderBuffer::GetRangeEnd | ( | ) | const [pure virtual] |
The highest index contained in this buffer, only valid for index buffers.
Implemented in csRenderBuffer, and CS::RenderBufferPersistent.
virtual size_t iRenderBuffer::GetRangeStart | ( | ) | const [pure virtual] |
The lowest index contained in this buffer, only valid for index buffers.
Implemented in csRenderBuffer, and CS::RenderBufferPersistent.
virtual size_t iRenderBuffer::GetSize | ( | ) | const [pure virtual] |
Get the size of the buffer (in bytes).
Implemented in csRenderBuffer, and CS::RenderBufferPersistent.
virtual size_t iRenderBuffer::GetStride | ( | ) | const [pure virtual] |
Get the stride of the buffer (in bytes).
Implemented in csRenderBuffer, and CS::RenderBufferPersistent.
virtual uint iRenderBuffer::GetVersion | ( | ) | [pure virtual] |
Get version.
Implemented in csRenderBuffer, and CS::RenderBufferPersistent.
virtual bool iRenderBuffer::IsIndexBuffer | ( | ) | const [pure virtual] |
Whether the buffer is an index buffer.
Implemented in csRenderBuffer, and CS::RenderBufferPersistent.
virtual void* iRenderBuffer::Lock | ( | csRenderBufferLockType | lockType | ) | [pure virtual] |
Lock the buffer to allow reading or writing to it directly.
- Parameters:
-
lockType The type of lock desired.
- Returns:
- A pointer to the first element or (void*)-1 if there was some error.
- Remarks:
- After the data was used as desired Release() must be called.
Implemented in csRenderBuffer, and CS::RenderBufferPersistent.
virtual void iRenderBuffer::Release | ( | ) | [pure virtual] |
Releases the buffer.
After this all access to the buffer pointer is illegal.
Implemented in csRenderBuffer, and CS::RenderBufferPersistent.
virtual void iRenderBuffer::SetCallback | ( | iRenderBufferCallback * | cb | ) | [pure virtual] |
Set callback object to use.
Implemented in csRenderBuffer, and CS::RenderBufferPersistent.
virtual void iRenderBuffer::SetData | ( | const void * | data | ) | [pure virtual] |
Set the buffer data.
This changes the internal pointer to the buffer data to buffer instead. It will also be returned by Lock(). It is the responsibility of the caller to ensure that the memory pointed to by data is valid for as long as the render buffer is used.
- Remarks:
- Do not call on a locked buffer. Does not work with interleaved buffer, set data on master buffer instead.
Implemented in csRenderBuffer, and CS::RenderBufferPersistent.
The documentation for this struct was generated from the following file:
- ivideo/rndbuf.h
Generated for Crystal Space 2.0 by doxygen 1.6.1