public final class VertexAttribute
extends java.lang.Object
VertexAttributes.Usage, its number of components and its shader alias. The Usage is needed for
the fixed function pipeline of OpenGL ES 1.x. Generic attributes are not supported in the fixed function pipeline. The number
of components defines how many components the attribute has. The alias defines to which shader attribute this attribute should
bind. The alias is used by a Mesh when drawing with a ShaderProgram. The alias can be changed at any time.| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
alias
the alias for the attribute used in a
ShaderProgram |
int |
numComponents
the number of components this attribute has
|
int |
offset
the offset of this attribute in bytes, don't change this!
|
int |
usage
the attribute
VertexAttributes.Usage |
| Constructor and Description |
|---|
VertexAttribute(int usage,
int numComponents,
java.lang.String alias)
Constructs a new VertexAttribute.
|
| Modifier and Type | Method and Description |
|---|---|
static VertexAttribute |
Color() |
static VertexAttribute |
ColorUnpacked() |
boolean |
equals(java.lang.Object obj)
Tests to determine if the passed object was created with the same parameters
|
static VertexAttribute |
Normal() |
static VertexAttribute |
Position() |
static VertexAttribute |
TexCoords(int unit) |
public final int usage
VertexAttributes.Usagepublic final int numComponents
public int offset
public java.lang.String alias
ShaderProgrampublic VertexAttribute(int usage,
int numComponents,
java.lang.String alias)
usage - the usage, used for the fixed function pipeline. Generic attributes are not supported in the fixed function
pipeline.numComponents - the number of components of this attribute, must be between 1 and 4.alias - the alias used in a shader for this attribute. Can be changed after construction.public static VertexAttribute Position()
public static VertexAttribute TexCoords(int unit)
public static VertexAttribute Normal()
public static VertexAttribute Color()
public static VertexAttribute ColorUnpacked()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Object