Derm.Render.RenderBufferObject< T > Class Template Reference
Generic buffer object.
More...
List of all members.
Public Member Functions |
override void | AllocateOnClient (int items) |
| Allocates RenderBufferObject data on client.
|
void | AllocateOnClient (T[] data, bool copy) |
| Allocates/Set RenderBufferObject data on client.
|
Protected Member Functions |
| RenderBufferObject (int type, UsageMode dUsage, XferMode dMode) |
| RenderBufferObject constructor.
|
Protected Attributes |
T[] | mDataBuffer = null |
| RenderBufferObject data buffer.
|
Properties |
T | this [int idx] [get, set] |
| RenderBufferObject data indexer.
|
Detailed Description
template<T>
class Derm::Render::RenderBufferObject< T >
Generic buffer object.
- Template Parameters:
-
| T | This type shall be one the base type of each element stored in the RenderBufferObject. This type shall be a structured type, but there are some limitation (they are dictated from the OpenGL Shading Language specification). In the current implementation the type T shall be:
Additionally T can be any structure which each member is typed with one of the previously mentioned types; keep in mind that the structure shall be declared with the [StructLayout(LayoutKind.Sequential, Pack = 1)] attribute. Specifying a kind of structure like described above allow to pack different data types into an unique RenderBufferObject, enhancing the data access since per-vertex data is localized better than using different RenderBufferObject instances. |
Constructor & Destructor Documentation
template<T >
Derm.Render.RenderBufferObject< T >.RenderBufferObject |
( |
int |
type, |
|
|
UsageMode |
dUsage, |
|
|
XferMode |
dMode | |
|
) |
| | [protected] |
RenderBufferObject constructor.
- Parameters:
-
| type | The RenderBufferObject type could assume one of the values:
- Derm.Gl.ARRAY_BUFFER
- Derm.Gl.ELEMENT_ARRAY_BUFFER
- Derm.Gl.PIXEL_PACK_BUFFER
- Derm.Gl.PIXEL_UNPACK_BUFFER
- Derm.Gl.UNIFORM_BUFFER
|
| dUsage | An UsageMode specifying the data buffer usage. |
| dMode | A XferMode specifying the data buffer transfer mode. |
Construct a generic RenderBufferObject.
Member Function Documentation
template<T >
override void Derm.Render.RenderBufferObject< T >.AllocateOnClient |
( |
int |
items |
) |
[virtual] |
Allocates RenderBufferObject data on client.
- Parameters:
-
| items | Number of items to allocate. A System.Int32 |
It simply allocates buffer data. The initial value of the data is determined by the type parameter T.
Implements Derm.Render.BufferObject.
template<T >
void Derm.Render.RenderBufferObject< T >.AllocateOnClient |
( |
T[] |
data, |
|
|
bool |
copy | |
|
) |
| | |
Allocates/Set RenderBufferObject data on client.
- Parameters:
-
| data | Buffer source data array. A T |
| copy | Flag indicating whether caller wants to make a copy of data or simply take the reference or array. A System.Boolean |
It defines this RenderBufferObject data. The data is reallocated in the case the parameter copy is false; in this case later modifications to the refence data
Member Data Documentation
template<T >
T [] Derm.Render.RenderBufferObject< T >.mDataBuffer = null [protected] |
RenderBufferObject data buffer.
Property Documentation
template<T >
T Derm.Render.RenderBufferObject< T >.this[int idx] [get, set] |
RenderBufferObject data indexer.
- Parameters:
-