public final class BatchablePreparation
extends java.lang.Object
| Constructor and Description |
|---|
BatchablePreparation() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addBaseAttributes(com.badlogic.gdx.utils.Array<com.badlogic.gdx.graphics.VertexAttribute> attributes,
int textureCount,
boolean position3D,
boolean textureCoordinates3D)
Generate vertex attributes suitable for multi-texturing and vertex color.
|
static java.lang.String |
generateGenericFragmentShader(int textureCount) |
static java.lang.String |
generateGenericVertexShader(int textureCount) |
static void |
populateQuadrangleIndices(short[] triangles)
Populates an array of triangle indices for quadrangles made up of two triangles.
|
public static void addBaseAttributes(com.badlogic.gdx.utils.Array<com.badlogic.gdx.graphics.VertexAttribute> attributes,
int textureCount,
boolean position3D,
boolean textureCoordinates3D)
textureCount - The number of textures to support.position3D - Whether the position attribute should include a Z component.textureCoordinates3D - Whether the texture coordinate attribute(s) should include a third component.attributes - The array to add the vertex attributes to. They are added with position and color in the first two
available positions, followed by texture coordinates.public static java.lang.String generateGenericVertexShader(int textureCount)
public static java.lang.String generateGenericFragmentShader(int textureCount)
public static void populateQuadrangleIndices(short[] triangles)
2--3
| /|
|/ |
1--4
triangles - The array that will be filled with triangle indices.