mirror of
https://github.com/processing/processing4.git
synced 2026-03-30 01:07:27 +02:00
tessellator object is static
This commit is contained in:
@@ -182,7 +182,7 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
protected int firstTexIndex;
|
||||
protected int firstTexCache;
|
||||
protected TexCache texCache;
|
||||
protected Tessellator tessellator;
|
||||
static protected Tessellator tessellator;
|
||||
|
||||
// ........................................................
|
||||
|
||||
@@ -388,7 +388,9 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
pgl = new PGL(this);
|
||||
pg = null;
|
||||
|
||||
tessellator = new Tessellator();
|
||||
if (tessellator == null) {
|
||||
tessellator = new Tessellator();
|
||||
}
|
||||
|
||||
inGeo = newInGeometry(IMMEDIATE);
|
||||
tessGeo = newTessGeometry(IMMEDIATE);
|
||||
@@ -6780,7 +6782,11 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
void disposeTessMap() {
|
||||
tessMap.dispose();
|
||||
}
|
||||
|
||||
|
||||
void compactTessMap() {
|
||||
tessMap.compact();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
//
|
||||
// Query
|
||||
|
||||
@@ -269,7 +269,7 @@ public class PShape3D extends PShape {
|
||||
glPointSizeBufferID = 0;
|
||||
glPointIndexBufferID = 0;
|
||||
|
||||
this.tessellator = pg.tessellator;
|
||||
this.tessellator = PGraphicsOpenGL.tessellator;
|
||||
this.family = family;
|
||||
this.root = this;
|
||||
this.parent = null;
|
||||
@@ -277,7 +277,7 @@ public class PShape3D extends PShape {
|
||||
|
||||
if (family == GEOMETRY || family == PRIMITIVE || family == PATH) {
|
||||
inGeo = pg.newInGeometry(PGraphicsOpenGL.RETAINED);
|
||||
}
|
||||
}
|
||||
|
||||
// Modes are retrieved from the current values in the renderer.
|
||||
textureMode = pg.textureMode;
|
||||
@@ -2526,7 +2526,7 @@ public class PShape3D extends PShape {
|
||||
tessGeo.applyMatrix(matrix);
|
||||
}
|
||||
|
||||
inGeo.tessMap.compact();
|
||||
inGeo.compactTessMap();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user