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
sourceVertexArrayExThe source vertex array.
queryVertexArrayQueryThe 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
locationintThe vertex array destination.
sourceVertexArrayExThe source vertex array.
classAttributeClassAttribute class.
indexintAttribute 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
sourceVertexArrayExThe source vertex array.
queriesTThe collection of queries.
Type Parameters
TThe 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
locationintThe attribute location.
attributeAttributeBindingExThe attribute value.
SetElements(in ElementBufferEx)
Set an element buffer for this vertex buffer.
public void SetElements(in ElementBufferEx elements)
Parameters
elementsElementBufferExThe 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
sourceVertexArrayExThe source vertex array.
queryVertexArrayQueryThe 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
locationintThe vertex array destination.
sourceVertexArrayExThe source vertex array.
classAttributeClassAttribute class.
indexintAttribute priority index.
Returns
- bool
True if a suitable attribute was found, and was set. False otherwise.