Derm.Render.RenderBufferObject< T > Class Template Reference

Generic buffer object. More...

Inheritance diagram for Derm.Render.RenderBufferObject< T >:
Derm.Render.BufferObject Derm.Render.RenderObject Derm.Render.IRenderObject Derm.Render.IReferenced Derm.Render.ArrayBufferObject< T > Derm.Render.ElementBufferObject< T > Derm.Render.UniformBufferObject< T >

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.


this [int idx] [get, set]
 RenderBufferObject data indexer.

Detailed Description

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.
Type Constraints
T :struct 

Constructor & Destructor Documentation

template<T >
Derm.Render.RenderBufferObject< T >.RenderBufferObject ( int  type,
UsageMode  dUsage,
XferMode  dMode 
) [protected]

RenderBufferObject constructor.

type The RenderBufferObject type could assume one of the values:

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.

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.

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.

idx A System.Int32

Services powered by Get Deus Ex Render Machina at Fast, secure and Free Open Source software downloads