Skip to content

Commit 7040ca7

Browse files
committed
a few corrections in the java mode examples
1 parent ecd174d commit 7040ca7

5 files changed

Lines changed: 19 additions & 3 deletions

File tree

java/examples/Demos/Graphics/Ribbons/Ribbons.pde

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ void setup() {
3131
void draw() {
3232
background(0);
3333

34+
ambient(80);
3435
lights();
3536

3637
translate(width/2, height/2, 200);
@@ -47,4 +48,4 @@ void mousePressed(){
4748

4849
void mouseDragged(){
4950
arcball.mouseDragged();
50-
}
51+
}

java/examples/Topics/Shaders/Deform/data/deform.glsl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#ifdef GL_ES
2+
precision mediump float;
3+
precision mediump int;
4+
#endif
5+
16
uniform sampler2D textureSampler;
27

38
uniform float time;

java/examples/Topics/Shaders/ImageMask/data/mask.glsl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#ifdef GL_ES
2+
precision mediump float;
3+
precision mediump int;
4+
#endif
5+
16
uniform sampler2D textureSampler;
27
uniform sampler2D maskSampler;
38

java/examples/Topics/Shaders/ToonShading/data/ToonFrag.glsl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#ifdef GL_ES
2+
precision mediump float;
3+
precision mediump int;
4+
#endif
5+
16
varying vec3 vertNormal;
27
varying vec3 vertLightDir;
38

java/examples/Topics/Textures/TextureCube/TextureCube.pde

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ float roty = PI/4;
1717
void setup() {
1818
size(640, 360, P3D);
1919
tex = loadImage("berlin-1.jpg");
20-
textureMode(NORMALIZED);
20+
textureMode(NORMAL);
2121
fill(255);
2222
stroke(color(44,48,32));
2323
}
@@ -88,4 +88,4 @@ void mouseDragged() {
8888
float rate = 0.01;
8989
rotx += (pmouseY-mouseY) * rate;
9090
roty += (mouseX-pmouseX) * rate;
91-
}
91+
}

0 commit comments

Comments
 (0)