enableAttributeAndDivisor method
void
enableAttributeAndDivisor(
- dynamic attribute,
- dynamic meshPerAttribute
Implementation
void enableAttributeAndDivisor(attribute, meshPerAttribute) {
final newAttributes = currentState["newAttributes"];
final enabledAttributes = currentState["enabledAttributes"];
final attributeDivisors = currentState["attributeDivisors"];
newAttributes[attribute] = 1;
if (enabledAttributes[attribute] == 0) {
gl.enableVertexAttribArray(attribute);
enabledAttributes[attribute] = 1;
}
if (attributeDivisors[attribute] != meshPerAttribute) {
gl.vertexAttribDivisor(attribute, meshPerAttribute);
attributeDivisors[attribute] = meshPerAttribute;
}
}