Skip to content

Commit 94d55f7

Browse files
committed
updated opengl renderer to latest version from java mode
1 parent 320bb6e commit 94d55f7

File tree

12 files changed

+4910
-3954
lines changed

12 files changed

+4910
-3954
lines changed

core/src/processing/core/PApplet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ public SketchSurfaceViewGL(Context context, int wide, int high, boolean is3D) {
819819
setEGLContextClientVersion(2);
820820

821821
// The renderer can be set only once.
822-
setRenderer(PGraphicsOpenGL.pgl.getRenderer());
822+
setRenderer(((PGLES)PGraphicsOpenGL.pgl).getRenderer());
823823
setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
824824

825825
// assign this g to the PApplet

core/src/processing/core/PGraphics.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,11 @@ public class PGraphics extends PImage implements PConstants {
447447
protected float backgroundR, backgroundG, backgroundB, backgroundA;
448448
protected int backgroundRi, backgroundGi, backgroundBi, backgroundAi;
449449

450+
451+
/** The current blending mode. */
452+
protected int blendMode;
453+
454+
450455
// ........................................................
451456

452457
/**
@@ -886,6 +891,8 @@ protected void defaultSettings() { // ignore
886891
background(backgroundColor);
887892
}
888893

894+
blendMode(BLEND);
895+
889896
settingsInited = true;
890897
// defaultSettings() overlaps reapplySettings(), don't do both
891898
//reapplySettings = false;
@@ -955,6 +962,8 @@ protected void reapplySettings() {
955962
textAlign(textAlign, textAlignY);
956963
background(backgroundColor);
957964

965+
blendMode(blendMode);
966+
958967
//reapplySettings = false;
959968
}
960969

@@ -1434,7 +1443,15 @@ public void noClip() {
14341443

14351444

14361445
public void blendMode(int mode) {
1437-
showMissingWarning("blendMode");
1446+
this.blendMode = mode;
1447+
blendModeImpl();
1448+
}
1449+
1450+
1451+
protected void blendModeImpl() {
1452+
if (blendMode != BLEND) {
1453+
showMissingWarning("blendMode");
1454+
}
14381455
}
14391456

14401457

core/src/processing/core/PShape.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ public class PShape implements PConstants {
166166
protected int emissiveColor;
167167
protected float shininess;
168168

169+
protected int sphereDetailU, sphereDetailV;
170+
protected int rectMode;
171+
protected int ellipseMode;
172+
169173
/** Temporary toggle for whether styles should be honored. */
170174
protected boolean style = true;
171175

core/src/processing/opengl/LineStroker.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@ private int computeRoundJoin(int cx, int cy, int xa, int ya, int xb, int yb,
312312
return ncoords / 2;
313313
}
314314

315-
private static final long ROUND_JOIN_THRESHOLD = 1000L;
315+
//private static final long ROUND_JOIN_THRESHOLD = 1000L;
316+
private static final long ROUND_JOIN_THRESHOLD = 100000000L;
316317

317318
private static final long ROUND_JOIN_INTERNAL_THRESHOLD = 1000000000L;
318319

0 commit comments

Comments
 (0)