mirror of
https://github.com/processing/processing4.git
synced 2026-02-02 21:29:17 +01:00
Fix setVertex for PATH PShapeOpenGL
This commit is contained in:
@@ -1708,14 +1708,25 @@ public class PShapeOpenGL extends PShape {
|
||||
return;
|
||||
}
|
||||
|
||||
if (vertexCodes[index] != VERTEX) {
|
||||
PGraphics.showWarning(NOT_A_SIMPLE_VERTEX, "setVertex()");
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: in certain cases (kind = TRIANGLE, etc) the correspondence between
|
||||
// input and tessellated vertices is 1-1, so in those cases re-tessellation
|
||||
// wouldn't be necessary. But in order to reasonable take care of that
|
||||
// situation, we would need a complete rethinking of the rendering architecture
|
||||
// in Processing :-)
|
||||
inGeo.vertices[3 * index + 0] = x;
|
||||
inGeo.vertices[3 * index + 1] = y;
|
||||
inGeo.vertices[3 * index + 2] = z;
|
||||
if (family == PATH) {
|
||||
vertices[index][X] = x;
|
||||
vertices[index][Y] = y;
|
||||
if (is3D) vertices[index][Z] = z;
|
||||
} else {
|
||||
inGeo.vertices[3 * index + 0] = x;
|
||||
inGeo.vertices[3 * index + 1] = y;
|
||||
inGeo.vertices[3 * index + 2] = z;
|
||||
}
|
||||
markForTessellation();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user