mirror of
https://github.com/processing/processing4.git
synced 2026-01-30 03:41:15 +01:00
check if attribute is active
This commit is contained in:
@@ -4903,6 +4903,7 @@ public class PShapeOpenGL extends PShape {
|
||||
}
|
||||
|
||||
for (VertexAttribute attrib: polyAttribs.values()) {
|
||||
if (!attrib.active()) continue;
|
||||
attrib.updateLoc(shader);
|
||||
attrib.bind(pgl);
|
||||
shader.setAttributeVBO(attrib.glLoc, attrib.glName,
|
||||
@@ -4913,8 +4914,13 @@ public class PShapeOpenGL extends PShape {
|
||||
shader.draw(root.glPolyIndex, icount, ioffset);
|
||||
}
|
||||
|
||||
for (VertexAttribute attrib: polyAttribs.values()) attrib.unbind(pgl);
|
||||
if (shader != null && shader.bound()) shader.unbind();
|
||||
for (VertexAttribute attrib: polyAttribs.values()) {
|
||||
if (!attrib.active()) continue;
|
||||
attrib.unbind(pgl);
|
||||
}
|
||||
if (shader != null && shader.bound()) {
|
||||
shader.unbind();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user