mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
set tessGeo when collecting custom vertex attributes
This commit is contained in:
@@ -2828,15 +2828,21 @@ public class PShapeOpenGL extends PShape {
|
||||
|
||||
protected void tessellate() {
|
||||
if (root == this && parent == null) { // Root shape
|
||||
boolean initAttr = false;
|
||||
if (polyAttribs == null) {
|
||||
polyAttribs = PGraphicsOpenGL.newAttributeMap();
|
||||
collectPolyAttribs();
|
||||
initAttr = true;
|
||||
}
|
||||
|
||||
if (tessGeo == null) {
|
||||
tessGeo = PGraphicsOpenGL.newTessGeometry(pg, polyAttribs, PGraphicsOpenGL.RETAINED);
|
||||
}
|
||||
tessGeo.clear();
|
||||
|
||||
if (initAttr) {
|
||||
collectPolyAttribs();
|
||||
}
|
||||
|
||||
for (int i = 0; i < polyAttribs.size(); i++) {
|
||||
VertexAttribute attrib = polyAttribs.get(i);
|
||||
tessGeo.initAttrib(attrib);
|
||||
@@ -2854,6 +2860,7 @@ public class PShapeOpenGL extends PShape {
|
||||
|
||||
protected void collectPolyAttribs() {
|
||||
AttributeMap rootAttribs = root.polyAttribs;
|
||||
tessGeo = root.tessGeo;
|
||||
|
||||
if (family == GROUP) {
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
|
||||
Reference in New Issue
Block a user