Usage, its number of components and its shader alias. The Usage is used for
uniquely identifying the vertex attribute from among its VertexAttributes siblings. 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 |
|---|---|
| public String | alias
the alias for the attribute used in a |
| public final boolean | normalized
For fixed types, whether the values are normalized to either -1f and +1f (signed) or 0f and +1f (unsigned) |
| public final int | numComponents
the number of components this attribute has |
| public int | offset
the offset of this attribute in bytes, don't change this! |
| public final int | type
the OpenGL type of each component, e.g. |
| public int | unit
optional unit/index specifier, used for texture coordinates and bone weights |
| public final int | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public | VertexAttribute(int usage, int
the number of components of this attribute, must be between 1 and 4. numComponents, String the alias used in a shader for this attribute. Can be changed after construction. alias)Constructs a new VertexAttribute. |
| public | VertexAttribute(int usage, int
the number of components of this attribute, must be between 1 and 4. numComponents, String the alias used in a shader for this attribute. Can be changed after construction. alias, int Optional unit/index specifier, used for texture coordinates and bone weights unit)Constructs a new VertexAttribute. |
| public | VertexAttribute(int
The attribute usage, int Usage, used for identification.the number of components of this attribute, must be between 1 and 4. numComponents, int the OpenGL type of each component, e.g. type, boolean GL20#GL_FLOAT or GL20#GL_UNSIGNED_BYTE. Since
Mesh stores vertex data in 32bit floats, the total size of this attribute (type size times number of
components) must be a multiple of four.For fixed types, whether the values are normalized to either -1f and +1f (signed) or 0f and +1f (unsigned) normalized, String The alias used in a shader for this attribute. Can be changed after construction. alias)Constructs a new VertexAttribute. |
| public | VertexAttribute(int
The attribute usage, int Usage, used for identification.the number of components of this attribute, must be between 1 and 4. numComponents, int the OpenGL type of each component, e.g. type, boolean GL20#GL_FLOAT or GL20#GL_UNSIGNED_BYTE. Since
Mesh stores vertex data in 32bit floats, the total size of this attribute (type size times number of
components) must be a multiple of four bytes.For fixed types, whether the values are normalized to either -1f and +1f (signed) or 0f and +1f (unsigned) normalized, String The alias used in a shader for this attribute. Can be changed after construction. alias, int Optional unit/index specifier, used for texture coordinates and bone weights unit)Constructs a new VertexAttribute. |
| Modifier and Type | Method and Description |
|---|---|
| public static VertexAttribute | |
| public static VertexAttribute | |
| public static VertexAttribute | |
| public static VertexAttribute | |
| public VertexAttribute | |
| public boolean | equals(final Object obj)
Overrides java. Tests to determine if the passed object was created with the same parameters |
| public boolean | |
| public int | |
| public int | |
| public int | |
| public static VertexAttribute | |
| public static VertexAttribute | |
| public static VertexAttribute | |
| public static VertexAttribute |
| alias | back to summary |
|---|---|
| public String alias the alias for the attribute used in a | |
| normalized | back to summary |
|---|---|
| public final boolean normalized For fixed types, whether the values are normalized to either -1f and +1f (signed) or 0f and +1f (unsigned) | |
| numComponents | back to summary |
|---|---|
| public final int numComponents the number of components this attribute has | |
| offset | back to summary |
|---|---|
| public int offset the offset of this attribute in bytes, don't change this! | |
| type | back to summary |
|---|---|
| public final int type the OpenGL type of each component, e.g. | |
| unit | back to summary |
|---|---|
| public int unit optional unit/index specifier, used for texture coordinates and bone weights | |
| usage | back to summary |
|---|---|
| public final int usage The attribute | |
| usageIndex | back to summary |
|---|---|
| private final int usageIndex | |
| VertexAttribute | back to summary |
|---|---|
| public VertexAttribute(int usage, int numComponents, String alias) Constructs a new VertexAttribute. The GL data type is automatically selected based on the usage. | |
| VertexAttribute | back to summary |
|---|---|
| public VertexAttribute(int usage, int numComponents, String alias, int unit) Constructs a new VertexAttribute. The GL data type is automatically selected based on the usage.
| |
| VertexAttribute | back to summary |
|---|---|
| public VertexAttribute(int usage, int numComponents, int type, boolean normalized, String alias) Constructs a new VertexAttribute.
| |
| VertexAttribute | back to summary |
|---|---|
| public VertexAttribute(int usage, int numComponents, int type, boolean normalized, String alias, int unit) Constructs a new VertexAttribute.
| |
| Binormal | back to summary |
|---|---|
| public static VertexAttribute Binormal() | |
| BoneWeight | back to summary |
|---|---|
| public static VertexAttribute BoneWeight(int unit) | |
| ColorPacked | back to summary |
|---|---|
| public static VertexAttribute ColorPacked() | |
| ColorUnpacked | back to summary |
|---|---|
| public static VertexAttribute ColorUnpacked() | |
| copy | back to summary |
|---|---|
public VertexAttribute copy()
| |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Overrides java. Tests to determine if the passed object was created with the same parameters
| |
| equals | back to summary |
|---|---|
| public boolean equals(final VertexAttribute other) | |
| getKey | back to summary |
|---|---|
public int getKey()
| |
| getSizeInBytes | back to summary |
|---|---|
public int getSizeInBytes()
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| Normal | back to summary |
|---|---|
| public static VertexAttribute Normal() | |
| Position | back to summary |
|---|---|
| public static VertexAttribute Position() | |
| Tangent | back to summary |
|---|---|
| public static VertexAttribute Tangent() | |
| TexCoords | back to summary |
|---|---|
| public static VertexAttribute TexCoords(int unit) | |