public static final class GlUtil.Attribute extends Object
setBuffer(float[], int).| Modifier and Type | Field | Description |
|---|---|---|
String |
name |
The name of the attribute in the GLSL sources.
|
| Constructor | Description |
|---|---|
Attribute(int program,
int index) |
Creates a new GL attribute.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
bind() |
Sets the vertex attribute to whatever was attached via
setBuffer(float[], int). |
void |
setBuffer(float[] buffer,
int size) |
Configures
bind() to attach vertices in buffer (each of size size
elements) to this GlUtil.Attribute. |
public final String name
public Attribute(int program,
int index)
program - The identifier of a compiled and linked GLSL shader program.index - The index of the attribute. After this instance has been constructed, the name
of the attribute is available via the name field.public void setBuffer(float[] buffer,
int size)
bind() to attach vertices in buffer (each of size size
elements) to this GlUtil.Attribute.buffer - Buffer to bind to this attribute.size - Number of elements per vertex.public void bind()
setBuffer(float[], int).
Should be called before each drawing call.