Table of Contents

Class GLVertexArrayBuilder

Namespace
ReFuel.Graphics.OpenGL
Assembly
ReFuel.dll

Build an OpenGL vertex array.

public class GLVertexArrayBuilder
Inheritance
GLVertexArrayBuilder
Inherited Members

Properties

AttributeCount

The number of attributes in the current builder.

public int AttributeCount { get; }

Property Value

int

HasElements

True if the builder has elements.

public bool HasElements { get; }

Property Value

bool

Methods

FindAttribute(VertexArrayEx, VertexArrayQuery)

Find a suitable attribute in the given vertex array.

public void FindAttribute(VertexArrayEx source, VertexArrayQuery query)

Parameters

source VertexArrayEx

The source vertex array.

query VertexArrayQuery

The query parameters.

FindAttribute(int, VertexArrayEx, AttributeClass, int)

Find a suitable attribute in the given vertex array.

public void FindAttribute(int location, VertexArrayEx source, AttributeClass @class, int index)

Parameters

location int

The vertex array destination.

source VertexArrayEx

The source vertex array.

class AttributeClass

Attribute class.

index int

Attribute priority index.

Exceptions

IndexOutOfRangeException

No such attribute exists.

FindAttributes<T>(VertexArrayEx, T)

Find all attributes in the given queries.

public void FindAttributes<T>(VertexArrayEx source, T queries) where T : IEnumerable<VertexArrayQuery>

Parameters

source VertexArrayEx

The source vertex array.

queries T

The collection of queries.

Type Parameters

T

The query collection type.

Reset()

Reset the builder so it can be used again.

public void Reset()

SetAttribute(int, in AttributeBindingEx)

Set an attribute at the given location.

public void SetAttribute(int location, in AttributeBindingEx attribute)

Parameters

location int

The attribute location.

attribute AttributeBindingEx

The attribute value.

SetElements(in ElementBufferEx)

Set an element buffer for this vertex buffer.

public void SetElements(in ElementBufferEx elements)

Parameters

elements ElementBufferEx

The element buffer.

ToVertexArray()

Generate a vertex array from this builder..

public GLVertexArray ToVertexArray()

Returns

GLVertexArray

The built vertex array.

Exceptions

Exception

There is a problem with at least one vertex attribute.

TryFindAttribute(VertexArrayEx, VertexArrayQuery)

Find a suitable attribute in the given vertex array.

public bool TryFindAttribute(VertexArrayEx source, VertexArrayQuery query)

Parameters

source VertexArrayEx

The source vertex array.

query VertexArrayQuery

The query parameters.

Returns

bool

True if the vertex was found.

TryFindAttribute(int, VertexArrayEx, AttributeClass, int)

Find a suitable attribute in the given vertex array.

public bool TryFindAttribute(int location, VertexArrayEx source, AttributeClass @class, int index)

Parameters

location int

The vertex array destination.

source VertexArrayEx

The source vertex array.

class AttributeClass

Attribute class.

index int

Attribute priority index.

Returns

bool

True if a suitable attribute was found, and was set. False otherwise.