VisimBox 1.0 VisimBox 3d simulation and visualisation ToolBox

- Main Page
- Packages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties
VisimRenderGL.GLVertexBuffer Class Reference
Inheritance diagram for VisimRenderGL.GLVertexBuffer:

List of all members.

## Public Member Functions
| GLVertexBuffer (Type vertexType, int count, ResourceUsage usage=ResourceUsage.Static)
| Initializes empty buffer with specified number of basic elements without cache.
| GLVertexBuffer (Type vertexType, int count, bool usecache=false, ResourceUsage usage=ResourceUsage.Static)
| Initializes empty buffer with specified number of basic elements.
| GLVertexBuffer (IVertex[] values, bool cache=false, bool useArrayAsCache=false, ResourceUsage usage=ResourceUsage.Static)
| Initialized vertex buffer from array of values.
| GLVertexBuffer (ICollection< IVertex > values, bool cache=false, ResourceUsage usage=ResourceUsage.Static)
| Constructs buffer from collection of values.
| GLVertexBuffer (IVertexArray varray, bool cache=false, ResourceUsage usage=ResourceUsage.Static)
override void | Dispose ()
override void | WriteCache ()
| Writes content of the cache to index buffer.
override void | ReadCache (int start, int count)
| Reads part of the buffer to cache.
override void | WriteCache (int start, int count)
| Writes content of the cache to the buffer.
override IVertex | ReadElement (int position)
| Directly reads one element from the buffer (might be very slow)
override void | WriteElement (int position, ref IVertex value)
override void | BindBuffer ()
| Binds buffer to the renderer on default position (depending on the vertex format)
## Static Public Member Functions
static BufferUsageHint | GetHint (ResourceUsage usage)
## Protected Member Functions
void | CreateBuffer (IVertexArray varray)
void | SetBuffer (IVertexArray varray)
| Sets content of the buffer to varray.
override void | ConstructBuffer (int count, bool justPrepare=false)
| Will construct buffer with specified number of elements. If HWbuffer already has some buffer assigned, it will be deleted.
void | ReleaseBuffer ()
## Properties
override uint | InternalID`[get]`
| Internal ID for the buffer.
override string | FileName`[get, set]`
| File used to create the resource (if it was loaded from the disk)

## Constructor & Destructor Documentation

VisimRenderGL.GLVertexBuffer.GLVertexBuffer | ( | Type | vertexType,
|  | int | count,
|  | ResourceUsage | usage = `ResourceUsage.Static`
| ) |  |

Initializes empty buffer with specified number of basic elements without cache.

Parameters:

  count | Count of elements
  usage | Usage of the buffer, default is static (create once)

VisimRenderGL.GLVertexBuffer.GLVertexBuffer | ( | Type | vertexType,
|  | int | count,
|  | bool | usecache = `false`,
|  | ResourceUsage | usage = `ResourceUsage.Static`
| ) |  |

Initializes empty buffer with specified number of basic elements.

Parameters:

  count | Count of elements
  cache | If true, cache is constructed and used
  usage | Usage of the buffer, default is static (create once)

VisimRenderGL.GLVertexBuffer.GLVertexBuffer | ( | IVertex[] | values,
|  | bool | cache = `false`,
|  | bool | useArrayAsCache = `false`,
|  | ResourceUsage | usage = `ResourceUsage.Static`
| ) |  |

Initialized vertex buffer from array of values.

Parameters:

  values | Source values
  cache | If true, cache is constructed and used
  useArrayAsCache | If true, vertex buffer will store reference to the source array as cache (so any direct read/write from/to array will be reflected in cache. Note, automatically sets cache using to true!
  usage | Usage of the buffer, default is static (create once)

VisimRenderGL.GLVertexBuffer.GLVertexBuffer | ( | ICollection< IVertex > | values,
|  | bool | cache = `false`,
|  | ResourceUsage | usage = `ResourceUsage.Static`
| ) |  |

Constructs buffer from collection of values.

Parameters:

  values | Source values
  cache | If true, cache is constructed and used
  usage | Usage of the buffer, default is static (create once)

VisimRenderGL.GLVertexBuffer.GLVertexBuffer | ( | IVertexArray | varray,
|  | bool | cache = `false`,
|  | ResourceUsage | usage = `ResourceUsage.Static`
| ) |  |

## Member Function Documentation

override void VisimRenderGL.GLVertexBuffer.BindBuffer | ( |  | ) | `[virtual]`

Binds buffer to the renderer on default position (depending on the vertex format)

Implements VisimBox.Renderer.VertexBuffer.

override void VisimRenderGL.GLVertexBuffer.ConstructBuffer | ( | int | count,
|  | bool | justPrepare = `false`
| ) |  | `[protected, virtual]`

Will construct buffer with specified number of elements. If HWbuffer already has some buffer assigned, it will be deleted.

Parameters:

  count | Required number of elements
  justPrepade | Only prepares buffer without setting it's size

Implements VisimBox.Renderer.HWBuffer< T >.

void VisimRenderGL.GLVertexBuffer.CreateBuffer | ( | IVertexArray | varray | ) | `[protected]`

override void VisimRenderGL.GLVertexBuffer.Dispose | ( |  | ) | `[virtual]`

Reimplemented from VisimBox.Renderer.HWBuffer< T >.

static BufferUsageHint VisimRenderGL.GLVertexBuffer.GetHint | ( | ResourceUsage | usage | ) | `[static]`

override void VisimRenderGL.GLVertexBuffer.ReadCache | ( | int | start,
|  | int | count
| ) |  | `[virtual]`

Reads part of the buffer to cache.

Parameters:

  start | starting index
  count | number of elements to be read from the buffer

Reimplemented from VisimBox.Renderer.HWBuffer< T >.

override IVertex VisimRenderGL.GLVertexBuffer.ReadElement | ( | int | position | ) | `[virtual]`

Directly reads one element from the buffer (might be very slow)

Parameters:

  position | Index of the element to write

Returns:
  Element on the position

Implements VisimBox.Renderer.HWBuffer< T >.

void VisimRenderGL.GLVertexBuffer.ReleaseBuffer | ( |  | ) | `[protected]`

void VisimRenderGL.GLVertexBuffer.SetBuffer | ( | IVertexArray | varray | ) | `[protected]`

Sets content of the buffer to varray.

Parameters:

  varray |

override void VisimRenderGL.GLVertexBuffer.WriteCache | ( | int | start,
|  | int | count
| ) |  | `[virtual]`

Writes content of the cache to the buffer.

Parameters:

  start | starting index
  count | number of elements to be written to the buffer

Implements VisimBox.Renderer.HWBuffer< T >.

override void VisimRenderGL.GLVertexBuffer.WriteCache | ( |  | ) | `[virtual]`

Writes content of the cache to index buffer.

Reimplemented from VisimBox.Renderer.HWBuffer< T >.

override void VisimRenderGL.GLVertexBuffer.WriteElement | ( | int | position,
|  | ref IVertex | value
| ) |  |

## Property Documentation

override string VisimRenderGL.GLVertexBuffer.FileName`[get, set]`

File used to create the resource (if it was loaded from the disk)

Reimplemented from VisimBox.Renderer.HWBuffer< T >.

override uint VisimRenderGL.GLVertexBuffer.InternalID`[get]`

Internal ID for the buffer.

Reimplemented from VisimBox.Renderer.HWBuffer< T >.

The documentation for this class was generated from the following file:

- GLVertexBuffer.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events