CS::RenderBufferPersistent Class Reference
[Graphics]
Render buffer wrapper with additional persistence information. More...
#include <csgfx/renderbuffer.h>

Public Member Functions | |
| const char * | GetFileName () |
| Query the filename into which the render buffer should preferably be saved. | |
iRenderBuffer implementation | |
| void | CopyInto (const void *data, size_t elementCount, size_t elemOffset=0) |
| Copy data to the render buffer. | |
| csRenderBufferType | GetBufferType () const |
| Get type of buffer (static/dynamic). | |
| int | GetComponentCount () const |
| Gets the number of components per element. | |
| csRenderBufferComponentType | GetComponentType () const |
| Gets the component type (float, int, etc). | |
| size_t | GetElementCount () const |
| Number of elements in a buffer. | |
| size_t | GetElementDistance () const |
| Get the distance between two elements (in bytes, includes stride). | |
| iRenderBuffer * | GetMasterBuffer () const |
| Get the master buffer in case this is an interleaved buffer. | |
| size_t | GetOffset () const |
| Get the offset of the buffer (in bytes). | |
| size_t | GetRangeEnd () const |
| The highest index contained in this buffer, only valid for index buffers. | |
| size_t | GetRangeStart () const |
| The lowest index contained in this buffer, only valid for index buffers. | |
| size_t | GetSize () const |
| Get the size of the buffer (in bytes). | |
| size_t | GetStride () const |
| Get the stride of the buffer (in bytes). | |
| uint | GetVersion () |
| Get version. | |
| bool | IsIndexBuffer () const |
| Whether the buffer is an index buffer. | |
| void * | Lock (csRenderBufferLockType lockType) |
| Lock the buffer to allow reading or writing to it directly. | |
| void | Release () |
| Releases the buffer. | |
| void | SetCallback (iRenderBufferCallback *cb) |
| Set callback object to use. | |
| void | SetData (const void *data) |
| Set the buffer data. | |
Detailed Description
Render buffer wrapper with additional persistence information.
Definition at line 344 of file renderbuffer.h.
Member Function Documentation
| void CS::RenderBufferPersistent::CopyInto | ( | const void * | data, | |
| size_t | elementCount, | |||
| size_t | elemOffset = 0 | |||
| ) | [inline, 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.
Implements iRenderBuffer.
Definition at line 362 of file renderbuffer.h.
| csRenderBufferType CS::RenderBufferPersistent::GetBufferType | ( | ) | const [inline, virtual] |
Get type of buffer (static/dynamic).
Implements iRenderBuffer.
Definition at line 369 of file renderbuffer.h.
| int CS::RenderBufferPersistent::GetComponentCount | ( | ) | const [inline, virtual] |
Gets the number of components per element.
Implements iRenderBuffer.
Definition at line 365 of file renderbuffer.h.
| csRenderBufferComponentType CS::RenderBufferPersistent::GetComponentType | ( | ) | const [inline, virtual] |
Gets the component type (float, int, etc).
Implements iRenderBuffer.
Definition at line 367 of file renderbuffer.h.
| size_t CS::RenderBufferPersistent::GetElementCount | ( | ) | const [inline, virtual] |
Number of elements in a buffer.
Implements iRenderBuffer.
Definition at line 389 of file renderbuffer.h.
| size_t CS::RenderBufferPersistent::GetElementDistance | ( | ) | const [inline, virtual] |
Get the distance between two elements (in bytes, includes stride).
Implements iRenderBuffer.
Definition at line 375 of file renderbuffer.h.
| const char* CS::RenderBufferPersistent::GetFileName | ( | ) | [inline, virtual] |
Query the filename into which the render buffer should preferably be saved.
Implements iRenderBufferPersistence.
Definition at line 355 of file renderbuffer.h.
| iRenderBuffer* CS::RenderBufferPersistent::GetMasterBuffer | ( | ) | const [inline, 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.
Implements iRenderBuffer.
Definition at line 381 of file renderbuffer.h.
| size_t CS::RenderBufferPersistent::GetOffset | ( | ) | const [inline, virtual] |
Get the offset of the buffer (in bytes).
Implements iRenderBuffer.
Definition at line 377 of file renderbuffer.h.
| size_t CS::RenderBufferPersistent::GetRangeEnd | ( | ) | const [inline, virtual] |
The highest index contained in this buffer, only valid for index buffers.
Implements iRenderBuffer.
Definition at line 387 of file renderbuffer.h.
| size_t CS::RenderBufferPersistent::GetRangeStart | ( | ) | const [inline, virtual] |
The lowest index contained in this buffer, only valid for index buffers.
Implements iRenderBuffer.
Definition at line 385 of file renderbuffer.h.
| size_t CS::RenderBufferPersistent::GetSize | ( | ) | const [inline, virtual] |
Get the size of the buffer (in bytes).
Implements iRenderBuffer.
Definition at line 371 of file renderbuffer.h.
| size_t CS::RenderBufferPersistent::GetStride | ( | ) | const [inline, virtual] |
Get the stride of the buffer (in bytes).
Implements iRenderBuffer.
Definition at line 373 of file renderbuffer.h.
| uint CS::RenderBufferPersistent::GetVersion | ( | ) | [inline, virtual] |
| bool CS::RenderBufferPersistent::IsIndexBuffer | ( | ) | const [inline, virtual] |
Whether the buffer is an index buffer.
Implements iRenderBuffer.
Definition at line 383 of file renderbuffer.h.
| void* CS::RenderBufferPersistent::Lock | ( | csRenderBufferLockType | lockType | ) | [inline, 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.
Implements iRenderBuffer.
Definition at line 359 of file renderbuffer.h.
| void CS::RenderBufferPersistent::Release | ( | ) | [inline, virtual] |
Releases the buffer.
After this all access to the buffer pointer is illegal.
Implements iRenderBuffer.
Definition at line 361 of file renderbuffer.h.
| void CS::RenderBufferPersistent::SetCallback | ( | iRenderBufferCallback * | cb | ) | [inline, virtual] |
Set callback object to use.
Implements iRenderBuffer.
Definition at line 391 of file renderbuffer.h.
| void CS::RenderBufferPersistent::SetData | ( | const void * | data | ) | [inline, 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.
Implements iRenderBuffer.
Definition at line 393 of file renderbuffer.h.
The documentation for this class was generated from the following file:
- csgfx/renderbuffer.h
Generated for Crystal Space 2.1 by doxygen 1.6.1
