public final class VertexAttribute
- Object
- VertexAttribute
Describes a single attribute (position, normal, texture coordinate, color)
within a
VertexFormat. The engine derives the generated shader’s vertex
inputs from the attributes present in the format, which is why a fixed set of
well known usages is used rather than free form names.Nested types
enum VertexAttribute.Usage | The semantic meaning of a vertex attribute. |
Constructors
public VertexAttribute(VertexAttribute.Usage usage, int components) | Creates a float backed attribute. |
Methods
public VertexAttribute.Usage getUsage() | Returns the semantic usage of this attribute. |
public int getComponents() | Returns the number of float components in this attribute. |
Inherited methods
Constructor details
VertexAttribute
public VertexAttribute(VertexAttribute.Usage usage, int components)Creates a float backed attribute.
Parameters
usageVertexAttribute.Usage- the semantic usage of the attribute
componentsint- the number of float components (1 to 4)
Method details
getUsage
public VertexAttribute.Usage getUsage()Returns the semantic usage of this attribute.
getComponents
public int getComponents()Returns the number of float components in this attribute.