Skip to content

Commit b73f09b

Browse files
committed
debugging lots of minor breakage from major overhaul of the last two weeks
1 parent 40550d1 commit b73f09b

File tree

10 files changed

+545
-184
lines changed

10 files changed

+545
-184
lines changed

candy/.settings/org.eclipse.jdt.core.prefs

Lines changed: 257 additions & 1 deletion
Large diffs are not rendered by default.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Wed Oct 08 15:50:01 EDT 2008
2+
cleanup_settings_version=2
3+
eclipse.preferences.version=1
4+
formatter_profile=_two spaces no tabs
5+
formatter_settings_version=11
6+
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>

core/src/processing/core/PApplet.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7227,6 +7227,12 @@ public void resetMatrix() {
72277227
}
72287228

72297229

7230+
public void applyMatrix(PMatrix source) {
7231+
if (recorder != null) recorder.applyMatrix(source);
7232+
g.applyMatrix(source);
7233+
}
7234+
7235+
72307236
public void applyMatrix(PMatrix2D source) {
72317237
if (recorder != null) recorder.applyMatrix(source);
72327238
g.applyMatrix(source);

core/src/processing/core/PGraphics.java

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ public class PGraphics extends PImage implements PConstants {
566566
protected int normalMode;
567567

568568
/// Keep track of how many calls to normal, to determine the mode.
569-
protected int normalCount;
569+
//protected int normalCount;
570570

571571
/** Current normal vector. */
572572
public float normalX, normalY, normalZ;
@@ -999,6 +999,7 @@ protected void vertexCheck() {
999999

10001000

10011001
public void vertex(float x, float y) {
1002+
vertexCheck();
10021003
float[] vertex = vertices[vertexCount];
10031004

10041005
curveVertexCount = 0;
@@ -1033,6 +1034,7 @@ public void vertex(float x, float y) {
10331034

10341035

10351036
public void vertex(float x, float y, float z) {
1037+
vertexCheck();
10361038
float[] vertex = vertices[vertexCount];
10371039

10381040
// only do this if we're using an irregular (POLYGON) shape that
@@ -1063,8 +1065,13 @@ public void vertex(float x, float y, float z) {
10631065

10641066
vertex[EDGE] = edge ? 1 : 0;
10651067

1066-
if (fill) {
1067-
if (textureImage != null) {
1068+
if (fill || textureImage != null) {
1069+
if (textureImage == null) {
1070+
vertex[R] = fillR;
1071+
vertex[G] = fillG;
1072+
vertex[B] = fillB;
1073+
vertex[A] = fillA;
1074+
} else {
10681075
if (tint) {
10691076
vertex[R] = tintR;
10701077
vertex[G] = tintG;
@@ -1076,11 +1083,6 @@ public void vertex(float x, float y, float z) {
10761083
vertex[B] = 1;
10771084
vertex[A] = 1;
10781085
}
1079-
} else {
1080-
vertex[R] = fillR;
1081-
vertex[G] = fillG;
1082-
vertex[B] = fillB;
1083-
vertex[A] = fillA;
10841086
}
10851087

10861088
vertex[AR] = ambientR;
@@ -1903,7 +1905,8 @@ public void sphere(float r) {
19031905

19041906
pushMatrix();
19051907
scale(r);
1906-
1908+
edge(false);
1909+
19071910
// 1st ring from south pole
19081911
beginShape(TRIANGLE_STRIP);
19091912
for (int i = 0; i < sphereDetailU; i++) {
@@ -1957,7 +1960,8 @@ public void sphere(float r) {
19571960
normal(0, 1, 0);
19581961
vertex(0, 1, 0);
19591962
endShape();
1960-
1963+
1964+
edge(true);
19611965
popMatrix();
19621966
}
19631967

0 commit comments

Comments
 (0)