propane 3.8.0-java → 4.0.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.mvn/extensions.xml +1 -1
- data/.mvn/wrapper/maven-wrapper.properties +1 -1
- data/.travis.yml +1 -1
- data/CHANGELOG.md +7 -1
- data/README.md +7 -7
- data/Rakefile +6 -5
- data/lib/propane/app.rb +10 -17
- data/lib/propane/helper_methods.rb +6 -6
- data/lib/propane/version.rb +1 -1
- data/lib/propane-4.0.0.jar +0 -0
- data/library/pdf/itextpdf-5.5.13.2.jar +0 -0
- data/library/pdf/pdf.rb +7 -0
- data/library/slider/slider.rb +1 -1
- data/library/svg/batik-all-1.14.jar +0 -0
- data/library/svg/svg.rb +7 -0
- data/mvnw +3 -3
- data/mvnw.cmd +2 -2
- data/pom.rb +35 -8
- data/pom.xml +60 -9
- data/propane.gemspec +9 -7
- data/src/main/java/monkstone/ColorUtil.java +1 -1
- data/src/main/java/monkstone/FastNoiseModuleJava.java +127 -0
- data/src/main/java/monkstone/MathToolModule.java +31 -31
- data/src/main/java/monkstone/PropaneLibrary.java +3 -1
- data/src/main/java/monkstone/SmoothNoiseModuleJava.java +127 -0
- data/src/main/java/monkstone/fastmath/DegLutTables.java +25 -26
- data/src/main/java/monkstone/fastmath/Deglut.java +1 -1
- data/src/main/java/monkstone/filechooser/Chooser.java +2 -2
- data/src/main/java/monkstone/noise/LICENSE +121 -0
- data/src/main/java/monkstone/noise/OpenSimplex2F.java +914 -0
- data/src/main/java/monkstone/noise/OpenSimplex2S.java +1138 -0
- data/src/main/java/monkstone/slider/CustomHorizontalSlider.java +1 -1
- data/src/main/java/monkstone/slider/CustomVerticalSlider.java +1 -1
- data/src/main/java/monkstone/slider/SimpleHorizontalSlider.java +1 -1
- data/src/main/java/monkstone/slider/SimpleVerticalSlider.java +1 -1
- data/src/main/java/monkstone/slider/SliderBar.java +1 -1
- data/src/main/java/monkstone/slider/SliderGroup.java +1 -1
- data/src/main/java/monkstone/slider/WheelHandler.java +2 -2
- data/src/main/java/monkstone/vecmath/JRender.java +6 -6
- data/src/main/java/monkstone/vecmath/package-info.java +1 -1
- data/src/main/java/monkstone/vecmath/vec2/Vec2.java +103 -83
- data/src/main/java/monkstone/vecmath/vec3/Vec3.java +27 -41
- data/src/main/java/monkstone/videoevent/CaptureEvent.java +1 -1
- data/src/main/java/monkstone/videoevent/MovieEvent.java +1 -1
- data/src/main/java/monkstone/videoevent/package-info.java +1 -1
- data/src/main/java/processing/awt/PGraphicsJava2D.java +11 -4
- data/src/main/java/processing/awt/PImageAWT.java +8 -8
- data/src/main/java/processing/core/PApplet.java +245 -254
- data/src/main/java/processing/core/PConstants.java +155 -163
- data/src/main/java/processing/core/PGraphics.java +116 -109
- data/src/main/java/processing/core/PImage.java +3025 -3047
- data/src/main/java/processing/core/PMatrix.java +5 -2
- data/src/main/java/processing/data/DoubleDict.java +72 -43
- data/src/main/java/processing/data/DoubleList.java +6 -2
- data/src/main/java/processing/data/FloatDict.java +744 -756
- data/src/main/java/processing/data/FloatList.java +68 -26
- data/src/main/java/processing/data/IntDict.java +72 -45
- data/src/main/java/processing/data/IntList.java +63 -26
- data/src/main/java/processing/data/JSONArray.java +892 -931
- data/src/main/java/processing/data/JSONObject.java +1169 -1262
- data/src/main/java/processing/data/JSONTokener.java +30 -49
- data/src/main/java/processing/data/LongDict.java +699 -712
- data/src/main/java/processing/data/LongList.java +676 -700
- data/src/main/java/processing/data/Sort.java +1 -0
- data/src/main/java/processing/data/Table.java +4040 -3661
- data/src/main/java/processing/data/TableRow.java +16 -0
- data/src/main/java/processing/data/XML.java +1041 -956
- data/src/main/java/processing/event/TouchEvent.java +1 -1
- data/src/main/java/processing/opengl/FontTexture.java +2 -2
- data/src/main/java/processing/opengl/PGraphicsOpenGL.java +28 -31
- data/src/main/java/processing/opengl/PJOGL.java +8 -7
- data/src/main/java/processing/opengl/PShader.java +1 -6
- data/src/main/java/processing/opengl/PShapeOpenGL.java +23 -24
- data/src/main/java/processing/opengl/PSurfaceJOGL.java +6 -6
- data/src/main/java/processing/pdf/PGraphicsPDF.java +581 -0
- data/src/main/java/processing/svg/PGraphicsSVG.java +378 -0
- data/src/main/{java/processing/opengl → resources}/cursors/arrow.png +0 -0
- data/src/main/{java/processing/opengl → resources}/cursors/cross.png +0 -0
- data/src/main/{java/processing/opengl → resources}/cursors/hand.png +0 -0
- data/src/main/{java/processing/opengl → resources}/cursors/license.txt +0 -0
- data/src/main/{java/processing/opengl → resources}/cursors/move.png +0 -0
- data/src/main/{java/processing/opengl → resources}/cursors/text.png +0 -0
- data/src/main/{java/processing/opengl → resources}/cursors/wait.png +0 -0
- data/src/main/{java/processing/opengl → resources}/shaders/ColorFrag.glsl +0 -0
- data/src/main/{java/processing/opengl → resources}/shaders/ColorVert.glsl +0 -0
- data/src/main/{java/processing/opengl → resources}/shaders/LightFrag.glsl +0 -0
- data/src/main/{java/processing/opengl → resources}/shaders/LightVert.glsl +0 -0
- data/src/main/{java/processing/opengl → resources}/shaders/LineFrag.glsl +0 -0
- data/src/main/{java/processing/opengl → resources}/shaders/LineVert.glsl +0 -0
- data/src/main/{java/processing/opengl → resources}/shaders/MaskFrag.glsl +0 -0
- data/src/main/{java/processing/opengl → resources}/shaders/PointFrag.glsl +0 -0
- data/src/main/{java/processing/opengl → resources}/shaders/PointVert.glsl +0 -0
- data/src/main/{java/processing/opengl → resources}/shaders/TexFrag.glsl +0 -0
- data/src/main/{java/processing/opengl → resources}/shaders/TexLightFrag.glsl +0 -0
- data/src/main/{java/processing/opengl → resources}/shaders/TexLightVert.glsl +0 -0
- data/src/main/{java/processing/opengl → resources}/shaders/TexVert.glsl +0 -0
- data/test/test_helper.rb +1 -0
- data/test/vecmath_spec_test.rb +14 -3
- data/vendors/Rakefile +1 -1
- metadata +53 -53
- data/lib/propane-3.8.0.jar +0 -0
- data/src/main/java/monkstone/noise/Noise.java +0 -116
- data/src/main/java/monkstone/noise/NoiseGenerator.java +0 -63
- data/src/main/java/monkstone/noise/NoiseMode.java +0 -15
- data/src/main/java/monkstone/noise/SimplexNoise.java +0 -470
- data/src/main/java/monkstone/noise/ValueNoise.java +0 -170
|
@@ -42,7 +42,7 @@ longpress
|
|
|
42
42
|
|
|
43
43
|
W3C touch events
|
|
44
44
|
http://www.w3.org/TR/touch-events/
|
|
45
|
-
http://www.w3.org/TR/2011/WD-touch-events-
|
|
45
|
+
http://www.w3.org/TR/2011/WD-touch-events-22110913/
|
|
46
46
|
|
|
47
47
|
Pointer and gesture events (Windows)
|
|
48
48
|
http://msdn.microsoft.com/en-US/library/ie/hh673557.aspx
|
|
@@ -359,7 +359,7 @@ class FontTexture implements PConstants {
|
|
|
359
359
|
}
|
|
360
360
|
|
|
361
361
|
|
|
362
|
-
void updateUV() {
|
|
362
|
+
final void updateUV() {
|
|
363
363
|
width = textures[texIndex].glWidth;
|
|
364
364
|
height = textures[texIndex].glHeight;
|
|
365
365
|
|
|
@@ -370,7 +370,7 @@ class FontTexture implements PConstants {
|
|
|
370
370
|
}
|
|
371
371
|
|
|
372
372
|
|
|
373
|
-
void updateTex() {
|
|
373
|
+
final void updateTex() {
|
|
374
374
|
textures[texIndex].setNative(pixels, crop[0] - 1, crop[1] + crop[3] - 1,
|
|
375
375
|
crop[2] + 2, -crop[3] + 2);
|
|
376
376
|
}
|
|
@@ -181,32 +181,32 @@ public class PGraphicsOpenGL extends PGraphics {
|
|
|
181
181
|
// Shaders
|
|
182
182
|
|
|
183
183
|
static protected URL defColorShaderVertURL =
|
|
184
|
-
PGraphicsOpenGL.class.getResource("/
|
|
184
|
+
PGraphicsOpenGL.class.getResource("/shaders/ColorVert.glsl");
|
|
185
185
|
static protected URL defTextureShaderVertURL =
|
|
186
|
-
PGraphicsOpenGL.class.getResource("/
|
|
186
|
+
PGraphicsOpenGL.class.getResource("/shaders/TexVert.glsl");
|
|
187
187
|
static protected URL defLightShaderVertURL =
|
|
188
|
-
PGraphicsOpenGL.class.getResource("/
|
|
188
|
+
PGraphicsOpenGL.class.getResource("/shaders/LightVert.glsl");
|
|
189
189
|
static protected URL defTexlightShaderVertURL =
|
|
190
|
-
PGraphicsOpenGL.class.getResource("/
|
|
190
|
+
PGraphicsOpenGL.class.getResource("/shaders/TexLightVert.glsl");
|
|
191
191
|
static protected URL defColorShaderFragURL =
|
|
192
|
-
PGraphicsOpenGL.class.getResource("/
|
|
192
|
+
PGraphicsOpenGL.class.getResource("/shaders/ColorFrag.glsl");
|
|
193
193
|
static protected URL defTextureShaderFragURL =
|
|
194
|
-
PGraphicsOpenGL.class.getResource("/
|
|
194
|
+
PGraphicsOpenGL.class.getResource("/shaders/TexFrag.glsl");
|
|
195
195
|
static protected URL defLightShaderFragURL =
|
|
196
|
-
PGraphicsOpenGL.class.getResource("/
|
|
196
|
+
PGraphicsOpenGL.class.getResource("/shaders/LightFrag.glsl");
|
|
197
197
|
static protected URL defTexlightShaderFragURL =
|
|
198
|
-
PGraphicsOpenGL.class.getResource("/
|
|
198
|
+
PGraphicsOpenGL.class.getResource("/shaders/TexLightFrag.glsl");
|
|
199
199
|
|
|
200
200
|
static protected URL defLineShaderVertURL =
|
|
201
|
-
PGraphicsOpenGL.class.getResource("/
|
|
201
|
+
PGraphicsOpenGL.class.getResource("/shaders/LineVert.glsl");
|
|
202
202
|
static protected URL defLineShaderFragURL =
|
|
203
|
-
PGraphicsOpenGL.class.getResource("/
|
|
203
|
+
PGraphicsOpenGL.class.getResource("/shaders/LineFrag.glsl");
|
|
204
204
|
static protected URL defPointShaderVertURL =
|
|
205
|
-
PGraphicsOpenGL.class.getResource("/
|
|
205
|
+
PGraphicsOpenGL.class.getResource("/shaders/PointVert.glsl");
|
|
206
206
|
static protected URL defPointShaderFragURL =
|
|
207
|
-
PGraphicsOpenGL.class.getResource("/
|
|
207
|
+
PGraphicsOpenGL.class.getResource("/shaders/PointFrag.glsl");
|
|
208
208
|
static protected URL maskShaderFragURL =
|
|
209
|
-
PGraphicsOpenGL.class.getResource("/
|
|
209
|
+
PGraphicsOpenGL.class.getResource("/shaders/MaskFrag.glsl");
|
|
210
210
|
|
|
211
211
|
protected PShader defColorShader;
|
|
212
212
|
protected PShader defTextureShader;
|
|
@@ -3851,12 +3851,10 @@ public class PGraphicsOpenGL extends PGraphics {
|
|
|
3851
3851
|
float factor = 1;
|
|
3852
3852
|
|
|
3853
3853
|
if (matrix != null) {
|
|
3854
|
-
if (matrix instanceof PMatrix2D) {
|
|
3855
|
-
PMatrix2D tr = (PMatrix2D)matrix;
|
|
3854
|
+
if (matrix instanceof PMatrix2D tr) {
|
|
3856
3855
|
float areaScaleFactor = Math.abs(tr.m00 * tr.m11 - tr.m01 * tr.m10);
|
|
3857
3856
|
factor = (float) Math.sqrt(areaScaleFactor);
|
|
3858
|
-
} else if (matrix instanceof PMatrix3D) {
|
|
3859
|
-
PMatrix3D tr = (PMatrix3D)matrix;
|
|
3857
|
+
} else if (matrix instanceof PMatrix3D tr) {
|
|
3860
3858
|
float volumeScaleFactor =
|
|
3861
3859
|
Math.abs(tr.m00 * (tr.m11 * tr.m22 - tr.m12 * tr.m21) +
|
|
3862
3860
|
tr.m01 * (tr.m12 * tr.m20 - tr.m10 * tr.m22) +
|
|
@@ -10774,26 +10772,26 @@ public class PGraphicsOpenGL extends PGraphics {
|
|
|
10774
10772
|
// Matrix transformations
|
|
10775
10773
|
|
|
10776
10774
|
void applyMatrixOnPolyGeometry(PMatrix tr, int first, int last) {
|
|
10777
|
-
if (tr instanceof PMatrix2D) {
|
|
10778
|
-
applyMatrixOnPolyGeometry(
|
|
10779
|
-
} else if (tr instanceof PMatrix3D) {
|
|
10780
|
-
applyMatrixOnPolyGeometry(
|
|
10775
|
+
if (tr instanceof PMatrix2D matrix) {
|
|
10776
|
+
applyMatrixOnPolyGeometry(matrix, first, last);
|
|
10777
|
+
} else if (tr instanceof PMatrix3D matrix) {
|
|
10778
|
+
applyMatrixOnPolyGeometry(matrix, first, last);
|
|
10781
10779
|
}
|
|
10782
10780
|
}
|
|
10783
10781
|
|
|
10784
10782
|
void applyMatrixOnLineGeometry(PMatrix tr, int first, int last) {
|
|
10785
|
-
if (tr instanceof PMatrix2D) {
|
|
10786
|
-
applyMatrixOnLineGeometry(
|
|
10787
|
-
} else if (tr instanceof PMatrix3D) {
|
|
10788
|
-
applyMatrixOnLineGeometry(
|
|
10783
|
+
if (tr instanceof PMatrix2D matrix) {
|
|
10784
|
+
applyMatrixOnLineGeometry(matrix, first, last);
|
|
10785
|
+
} else if (tr instanceof PMatrix3D matrix) {
|
|
10786
|
+
applyMatrixOnLineGeometry(matrix, first, last);
|
|
10789
10787
|
}
|
|
10790
10788
|
}
|
|
10791
10789
|
|
|
10792
10790
|
void applyMatrixOnPointGeometry(PMatrix tr, int first, int last) {
|
|
10793
|
-
if (tr instanceof PMatrix2D) {
|
|
10794
|
-
applyMatrixOnPointGeometry(
|
|
10795
|
-
} else if (tr instanceof PMatrix3D) {
|
|
10796
|
-
applyMatrixOnPointGeometry(
|
|
10791
|
+
if (tr instanceof PMatrix2D matrix) {
|
|
10792
|
+
applyMatrixOnPointGeometry(matrix, first, last);
|
|
10793
|
+
} else if (tr instanceof PMatrix3D matrix) {
|
|
10794
|
+
applyMatrixOnPointGeometry(matrix, first, last);
|
|
10797
10795
|
}
|
|
10798
10796
|
}
|
|
10799
10797
|
|
|
@@ -13275,8 +13273,7 @@ public class PGraphicsOpenGL extends PGraphics {
|
|
|
13275
13273
|
|
|
13276
13274
|
@Override
|
|
13277
13275
|
public void vertex(Object data) {
|
|
13278
|
-
if (data instanceof double[]) {
|
|
13279
|
-
double[] d = (double[]) data;
|
|
13276
|
+
if (data instanceof double[] d) {
|
|
13280
13277
|
int l = d.length;
|
|
13281
13278
|
if (l < 25) {
|
|
13282
13279
|
throw new RuntimeException("TessCallback vertex() data is " +
|
|
@@ -182,7 +182,7 @@ public class PJOGL extends PGL {
|
|
|
182
182
|
@Override
|
|
183
183
|
protected PImage screenshot() {
|
|
184
184
|
AWTGLReadBufferUtil util = new AWTGLReadBufferUtil(capabilities.getGLProfile(), false);
|
|
185
|
-
return new PImageAWT(util.readPixelsToBufferedImage
|
|
185
|
+
return new PImageAWT(util.readPixelsToBufferedImage(gl, true));
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
|
|
@@ -241,8 +241,8 @@ public class PJOGL extends PGL {
|
|
|
241
241
|
PSurface surf = sketch.getSurface();
|
|
242
242
|
if (surf == null) {
|
|
243
243
|
return graphics.pixelDensity;
|
|
244
|
-
} else if (surf instanceof PSurfaceJOGL) {
|
|
245
|
-
return
|
|
244
|
+
} else if (surf instanceof PSurfaceJOGL jogl) {
|
|
245
|
+
return jogl.getPixelScale();
|
|
246
246
|
} else {
|
|
247
247
|
throw new RuntimeException("Renderer cannot find a JOGL surface");
|
|
248
248
|
}
|
|
@@ -637,6 +637,7 @@ public class PJOGL extends PGL {
|
|
|
637
637
|
setProperty(GLU.GLU_TESS_WINDING_RULE, rule);
|
|
638
638
|
}
|
|
639
639
|
|
|
640
|
+
@Override
|
|
640
641
|
public void setProperty(int property, int value) {
|
|
641
642
|
GLU.gluTessProperty(tess, property, value);
|
|
642
643
|
}
|
|
@@ -1997,10 +1998,10 @@ public class PJOGL extends PGL {
|
|
|
1997
1998
|
} else if (gl3 != null) {
|
|
1998
1999
|
gl3.glDrawBuffer(buf);
|
|
1999
2000
|
} else if (gl3es3 != null) {
|
|
2000
|
-
IntBuffer
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
gl3es3.glDrawBuffers(1,
|
|
2001
|
+
IntBuffer localIntBuf = IntBuffer.allocate(1);
|
|
2002
|
+
localIntBuf.put(buf);
|
|
2003
|
+
localIntBuf.rewind();
|
|
2004
|
+
gl3es3.glDrawBuffers(1, localIntBuf);
|
|
2004
2005
|
} else {
|
|
2005
2006
|
throw new RuntimeException(String.format(MISSING_GLFUNC_ERROR, "glDrawBuffer()"));
|
|
2006
2007
|
}
|
|
@@ -988,7 +988,7 @@ public class PShader implements PConstants {
|
|
|
988
988
|
|
|
989
989
|
|
|
990
990
|
/**
|
|
991
|
-
* @return
|
|
991
|
+
* @return
|
|
992
992
|
*/
|
|
993
993
|
protected boolean compileFragmentShader() {
|
|
994
994
|
pgl.shaderSource(glFragment, PApplet.join(fragmentShaderSource, "\n"));
|
|
@@ -1137,11 +1137,6 @@ public class PShader implements PConstants {
|
|
|
1137
1137
|
specularLoc = getAttributeLoc("specular");
|
|
1138
1138
|
emissiveLoc = getAttributeLoc("emissive");
|
|
1139
1139
|
shininessLoc = getAttributeLoc("shininess");
|
|
1140
|
-
|
|
1141
|
-
directionLoc = getAttributeLoc("direction");
|
|
1142
|
-
|
|
1143
|
-
offsetLoc = getAttributeLoc("offset");
|
|
1144
|
-
|
|
1145
1140
|
directionLoc = getAttributeLoc("direction");
|
|
1146
1141
|
offsetLoc = getAttributeLoc("offset");
|
|
1147
1142
|
|
|
@@ -413,9 +413,9 @@ public class PShapeOpenGL extends PShape {
|
|
|
413
413
|
|
|
414
414
|
@Override
|
|
415
415
|
public void addChild(PShape who) {
|
|
416
|
-
if (who instanceof PShapeOpenGL) {
|
|
416
|
+
if (who instanceof PShapeOpenGL psogl) {
|
|
417
417
|
if (family == GROUP) {
|
|
418
|
-
PShapeOpenGL c3d =
|
|
418
|
+
PShapeOpenGL c3d = psogl;
|
|
419
419
|
|
|
420
420
|
super.addChild(c3d);
|
|
421
421
|
c3d.updateRoot(root);
|
|
@@ -423,9 +423,9 @@ public class PShapeOpenGL extends PShape {
|
|
|
423
423
|
|
|
424
424
|
if (c3d.family == GROUP) {
|
|
425
425
|
if (c3d.textures != null) {
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
426
|
+
c3d.textures.forEach(tex -> {
|
|
427
|
+
addTexture(tex);
|
|
428
|
+
});
|
|
429
429
|
} else {
|
|
430
430
|
untexChild(true);
|
|
431
431
|
}
|
|
@@ -454,9 +454,9 @@ public class PShapeOpenGL extends PShape {
|
|
|
454
454
|
|
|
455
455
|
@Override
|
|
456
456
|
public void addChild(PShape who, int idx) {
|
|
457
|
-
if (who instanceof PShapeOpenGL) {
|
|
457
|
+
if (who instanceof PShapeOpenGL psogl) {
|
|
458
458
|
if (family == GROUP) {
|
|
459
|
-
PShapeOpenGL c3d =
|
|
459
|
+
PShapeOpenGL c3d = psogl;
|
|
460
460
|
|
|
461
461
|
super.addChild(c3d, idx);
|
|
462
462
|
c3d.updateRoot(root);
|
|
@@ -4636,36 +4636,36 @@ public class PShapeOpenGL extends PShape {
|
|
|
4636
4636
|
|
|
4637
4637
|
@Override
|
|
4638
4638
|
protected void styles(PGraphics g) {
|
|
4639
|
-
if (g instanceof PGraphicsOpenGL) {
|
|
4640
|
-
if (
|
|
4639
|
+
if (g instanceof PGraphicsOpenGL pgl) {
|
|
4640
|
+
if (pgl.stroke) {
|
|
4641
4641
|
setStroke(true);
|
|
4642
|
-
setStroke(
|
|
4643
|
-
setStrokeWeight(
|
|
4644
|
-
setStrokeCap(
|
|
4645
|
-
setStrokeJoin(
|
|
4642
|
+
setStroke(pgl.strokeColor);
|
|
4643
|
+
setStrokeWeight(pgl.strokeWeight);
|
|
4644
|
+
setStrokeCap(pgl.strokeCap);
|
|
4645
|
+
setStrokeJoin(pgl.strokeJoin);
|
|
4646
4646
|
} else {
|
|
4647
4647
|
setStroke(false);
|
|
4648
4648
|
}
|
|
4649
4649
|
|
|
4650
|
-
if (
|
|
4650
|
+
if (pgl.fill) {
|
|
4651
4651
|
setFill(true);
|
|
4652
|
-
setFill(
|
|
4652
|
+
setFill(pgl.fillColor);
|
|
4653
4653
|
} else {
|
|
4654
4654
|
setFill(false);
|
|
4655
4655
|
}
|
|
4656
4656
|
|
|
4657
|
-
if (
|
|
4657
|
+
if (pgl.tint) {
|
|
4658
4658
|
setTint(true);
|
|
4659
|
-
setTint(
|
|
4659
|
+
setTint(pgl.tintColor);
|
|
4660
4660
|
}
|
|
4661
4661
|
|
|
4662
|
-
setAmbient(
|
|
4663
|
-
setSpecular(
|
|
4664
|
-
setEmissive(
|
|
4665
|
-
setShininess(
|
|
4662
|
+
setAmbient(pgl.ambientColor);
|
|
4663
|
+
setSpecular(pgl.specularColor);
|
|
4664
|
+
setEmissive(pgl.emissiveColor);
|
|
4665
|
+
setShininess(pgl.shininess);
|
|
4666
4666
|
|
|
4667
4667
|
if (image != null) {
|
|
4668
|
-
setTextureMode(
|
|
4668
|
+
setTextureMode(pgl.textureMode);
|
|
4669
4669
|
}
|
|
4670
4670
|
} else {
|
|
4671
4671
|
super.styles(g);
|
|
@@ -4689,8 +4689,7 @@ public class PShapeOpenGL extends PShape {
|
|
|
4689
4689
|
|
|
4690
4690
|
@Override
|
|
4691
4691
|
public void draw(PGraphics g) {
|
|
4692
|
-
if (g instanceof PGraphicsOpenGL) {
|
|
4693
|
-
PGraphicsOpenGL gl = (PGraphicsOpenGL)g;
|
|
4692
|
+
if (g instanceof PGraphicsOpenGL gl) {
|
|
4694
4693
|
if (visible) {
|
|
4695
4694
|
pre(gl);
|
|
4696
4695
|
|
|
@@ -184,10 +184,10 @@ public class PSurfaceJOGL implements PSurface {
|
|
|
184
184
|
boolean hide = (sketch != null) &&
|
|
185
185
|
(PApplet.platform == PConstants.WINDOWS);
|
|
186
186
|
if (hide) setVisible(false);
|
|
187
|
-
|
|
187
|
+
|
|
188
188
|
ShimAWT.selectFolderImpl(prompt, callbackMethod, file,
|
|
189
189
|
callbackObject, null);
|
|
190
|
-
|
|
190
|
+
|
|
191
191
|
if (hide) setVisible(true);
|
|
192
192
|
});
|
|
193
193
|
}
|
|
@@ -273,7 +273,7 @@ public class PSurfaceJOGL implements PSurface {
|
|
|
273
273
|
case 2:
|
|
274
274
|
try {
|
|
275
275
|
profile = GLProfile.getGL2ES2();
|
|
276
|
-
|
|
276
|
+
|
|
277
277
|
// workaround for https://jogamp.org/bugzilla/show_bug.cgi?id=1347
|
|
278
278
|
if (!profile.isHardwareRasterizer()) {
|
|
279
279
|
GLProfile hardware = GLProfile.getMaxProgrammable(true);
|
|
@@ -281,7 +281,7 @@ public class PSurfaceJOGL implements PSurface {
|
|
|
281
281
|
profile = hardware;
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
|
-
|
|
284
|
+
|
|
285
285
|
} catch (GLException ex) {
|
|
286
286
|
profile = GLProfile.getMaxProgrammable(true);
|
|
287
287
|
} break;
|
|
@@ -657,7 +657,7 @@ public class PSurfaceJOGL implements PSurface {
|
|
|
657
657
|
stream = new FileInputStream(filename);
|
|
658
658
|
stream.close();
|
|
659
659
|
return filename;
|
|
660
|
-
|
|
660
|
+
|
|
661
661
|
} catch (IOException e1) { }
|
|
662
662
|
|
|
663
663
|
} catch (SecurityException se) { } // online, whups
|
|
@@ -1309,7 +1309,7 @@ public class PSurfaceJOGL implements PSurface {
|
|
|
1309
1309
|
String name = cursorNames.get(kind);
|
|
1310
1310
|
if (name != null) {
|
|
1311
1311
|
ImageIcon icon =
|
|
1312
|
-
new ImageIcon(getClass().getResource("cursors/" + name + ".png"));
|
|
1312
|
+
new ImageIcon(getClass().getResource("/cursors/" + name + ".png"));
|
|
1313
1313
|
PImage img = new PImageAWT(icon.getImage());
|
|
1314
1314
|
// Most cursors just use the center as the hotspot...
|
|
1315
1315
|
int x = img.width / 2;
|