use of processing.opengl.PGraphicsOpenGL.AttributeMap in project processing by processing.
the class PShapeOpenGL method collectPolyAttribs.
protected void collectPolyAttribs() {
AttributeMap rootAttribs = root.polyAttribs;
if (family == GROUP) {
for (int i = 0; i < childCount; i++) {
PShapeOpenGL child = (PShapeOpenGL) children[i];
child.collectPolyAttribs();
}
} else {
for (int i = 0; i < polyAttribs.size(); i++) {
VertexAttribute attrib = polyAttribs.get(i);
tessGeo.initAttrib(attrib);
if (rootAttribs.containsKey(attrib.name)) {
VertexAttribute rattrib = rootAttribs.get(attrib.name);
if (rattrib.diff(attrib)) {
throw new RuntimeException("Children shapes cannot have different attributes with same name");
}
} else {
rootAttribs.put(attrib.name, attrib);
}
}
}
}
Aggregations