mirror of
https://github.com/processing/processing4.git
synced 2026-02-02 13:21:07 +01:00
some comments and minor changes in A3D
This commit is contained in:
@@ -110,10 +110,12 @@ import android.graphics.Color;
|
||||
*/
|
||||
public class PGraphics extends PImage implements PConstants {
|
||||
|
||||
public int VERTEXCOUNT = 0; // Just for debugging purposes, I'll remove soon. Andres
|
||||
// These three are only for debugging/benchmarking purposes. I will remove soon (Andres):
|
||||
public int VERTEXCOUNT = 0;
|
||||
public int TRIANGLECOUNT = 0;
|
||||
public int FACECOUNT = 0;
|
||||
|
||||
|
||||
// ........................................................
|
||||
|
||||
// width and height are already inherited from PImage
|
||||
|
||||
@@ -380,7 +380,7 @@ public class PGraphicsAndroid3D extends PGraphics {
|
||||
colorArray = new int[DEFAULT_BUFFER_SIZE * 4];
|
||||
texCoordArray = new int[DEFAULT_BUFFER_SIZE * 2];
|
||||
normalArray = new int[DEFAULT_BUFFER_SIZE * 3];
|
||||
|
||||
|
||||
buffersAllocated = true;
|
||||
}
|
||||
}
|
||||
@@ -492,8 +492,8 @@ public class PGraphicsAndroid3D extends PGraphics {
|
||||
vertexBuffer.rewind();
|
||||
colorBuffer.rewind();
|
||||
texCoordBuffer.rewind();
|
||||
normalBuffer.rewind();
|
||||
|
||||
normalBuffer.rewind();
|
||||
|
||||
textureImage = null;
|
||||
textureImagePrev = null;
|
||||
|
||||
@@ -1535,7 +1535,7 @@ public class PGraphicsAndroid3D extends PGraphics {
|
||||
normalArray[3 * n + 1] = toFixed32(a[NY]);
|
||||
normalArray[3 * n + 2] = toFixed32(a[NZ]);
|
||||
texCoordArray[2 * n + 0] = toFixed32((cx + sx * a[U]) * uscale);
|
||||
texCoordArray[2 * n + 1] = toFixed32((cy + sy * a[V]) * vscale);
|
||||
texCoordArray[2 * n + 1] = toFixed32((cy + sy * a[V]) * vscale);
|
||||
n++;
|
||||
|
||||
VERTEXCOUNT++;
|
||||
@@ -1583,7 +1583,7 @@ public class PGraphicsAndroid3D extends PGraphics {
|
||||
normalArray[3 * n + 1] = toFixed32(c[NY]);
|
||||
normalArray[3 * n + 2] = toFixed32(c[NZ]);
|
||||
texCoordArray[2 * n + 0] = toFixed32((cx + sx * c[U]) * uscale);
|
||||
texCoordArray[2 * n + 1] = toFixed32((cy + sy * c[V]) * vscale);
|
||||
texCoordArray[2 * n + 1] = toFixed32((cy + sy * c[V]) * vscale);
|
||||
n++;
|
||||
|
||||
VERTEXCOUNT++;
|
||||
|
||||
Reference in New Issue
Block a user