Skip to content

Commit 43769b5

Browse files
committed
android sync
1 parent 4386253 commit 43769b5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

core/src/processing/opengl/PGraphicsOpenGL.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11889,6 +11889,7 @@ protected class TessellatorCallback implements PGL.TessellatorCallback {
1188911889
int cacheIndex;
1189011890
int vertFirst;
1189111891
int vertCount;
11892+
int vertOffset;
1189211893
int primitive;
1189311894

1189411895
public void init(boolean addCache, boolean strokeTess, boolean calcNorm,
@@ -11913,7 +11914,9 @@ public void begin(int type) {
1191311914
}
1191411915

1191511916
vertFirst = cache.vertexCount[cacheIndex];
11917+
vertOffset = cache.vertexOffset[cacheIndex];
1191611918
vertCount = 0;
11919+
System.out.println(vertFirst + " " + vertOffset);
1191711920

1191811921
if (type == PGL.TRIANGLE_FAN) primitive = TRIANGLE_FAN;
1191911922
else if (type == PGL.TRIANGLE_STRIP) primitive = TRIANGLE_STRIP;
@@ -11929,7 +11932,8 @@ public void end() {
1192911932
// every time a new vertex was emitted (see vertex() below).
1193011933
//tessBlock = tess.addFillIndexBlock(tessBlock);
1193111934
cacheIndex = cache.addNew();
11932-
vertFirst = 0;
11935+
vertFirst = cache.vertexCount[cacheIndex];
11936+
vertOffset = cache.vertexOffset[cacheIndex];
1193311937
}
1193411938

1193511939
int indCount = 0;
@@ -11989,8 +11993,9 @@ protected void addIndex(int tessIdx) {
1198911993
}
1199011994

1199111995
protected void calcTriNormal(int tessIdx0, int tessIdx1, int tessIdx2) {
11992-
tess.calcPolyNormal(vertFirst + tessIdx0, vertFirst + tessIdx1,
11993-
vertFirst + tessIdx2);
11996+
tess.calcPolyNormal(vertFirst + vertOffset + tessIdx0,
11997+
vertFirst + vertOffset + tessIdx1,
11998+
vertFirst + vertOffset + tessIdx2);
1199411999
}
1199512000

1199612001
public void vertex(Object data) {

0 commit comments

Comments
 (0)