Package arc.graphics
Class VertexAttribute
java.lang.Object
arc.graphics.VertexAttribute
-
Field Summary
Modifier and TypeFieldDescriptionfinal String
the alias for the attribute used in aShader
static final VertexAttribute
final int
the number of components this attribute hasstatic final VertexAttribute
static final VertexAttribute
final boolean
For fixed types, whether the values are normalized to either -1f and +1f (signed) or 0f and +1f (unsigned)static final VertexAttribute
static final VertexAttribute
final int
the size (in bytes) of this attributestatic final VertexAttribute
final int
the OpenGL type of each component, e.g. -
Constructor Summary
ConstructorDescriptionVertexAttribute
(int components, int type, boolean normalized, String alias) Constructs a new VertexAttribute.VertexAttribute
(int components, String alias) Constructs a new VertexAttribute. -
Method Summary
-
Field Details
-
position
-
position3
-
texCoords
-
normal
-
color
-
mixColor
-
components
public final int componentsthe number of components this attribute has -
normalized
public final boolean normalizedFor fixed types, whether the values are normalized to either -1f and +1f (signed) or 0f and +1f (unsigned) -
type
public final int typethe OpenGL type of each component, e.g.GL20.GL_FLOAT
orGL20.GL_UNSIGNED_BYTE
-
alias
the alias for the attribute used in aShader
-
size
public final int sizethe size (in bytes) of this attribute
-
-
Constructor Details
-
VertexAttribute
Constructs a new VertexAttribute. The GL data type is automatically selected based on the usage.- Parameters:
components
- 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.
-
VertexAttribute
Constructs a new VertexAttribute.- Parameters:
components
- the number of components of this attribute, must be between 1 and 4.type
- the OpenGL type of each component, e.g.GL20.GL_FLOAT
orGL20.GL_UNSIGNED_BYTE
. SinceMesh
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.normalized
- For fixed types, whether the values are normalized to either -1f and +1f (signed) or 0f and +1f (unsigned)alias
- The alias used in a shader for this attribute. Can be changed after construction.
-