Class GLVertexArrayBuilder
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
HasElements
True if the builder has elements.
public bool HasElements { get; }
Property Value
Methods
FindAttribute(VertexArrayEx, VertexArrayQuery)
Find a suitable attribute in the given vertex array.
public void FindAttribute(VertexArrayEx source, VertexArrayQuery query)
Parameters
source
VertexArrayExThe source vertex array.
query
VertexArrayQueryThe 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
intThe vertex array destination.
source
VertexArrayExThe source vertex array.
class
AttributeClassAttribute class.
index
intAttribute 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
VertexArrayExThe source vertex array.
queries
TThe 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
intThe attribute location.
attribute
AttributeBindingExThe attribute value.
SetElements(in ElementBufferEx)
Set an element buffer for this vertex buffer.
public void SetElements(in ElementBufferEx elements)
Parameters
elements
ElementBufferExThe 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
VertexArrayExThe source vertex array.
query
VertexArrayQueryThe 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
intThe vertex array destination.
source
VertexArrayExThe source vertex array.
class
AttributeClassAttribute class.
index
intAttribute priority index.
Returns
- bool
True if a suitable attribute was found, and was set. False otherwise.