a few corrections in the java mode examples

This commit is contained in:
codeanticode
2012-09-05 23:47:44 +00:00
parent e67f0d653d
commit 3661d09ed3
5 changed files with 19 additions and 3 deletions

View File

@@ -31,6 +31,7 @@ void setup() {
void draw() {
background(0);
ambient(80);
lights();
translate(width/2, height/2, 200);
@@ -47,4 +48,4 @@ void mousePressed(){
void mouseDragged(){
arcball.mouseDragged();
}
}

View File

@@ -1,3 +1,8 @@
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
uniform sampler2D textureSampler;
uniform float time;

View File

@@ -1,3 +1,8 @@
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
uniform sampler2D textureSampler;
uniform sampler2D maskSampler;

View File

@@ -1,3 +1,8 @@
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
varying vec3 vertNormal;
varying vec3 vertLightDir;

View File

@@ -17,7 +17,7 @@ float roty = PI/4;
void setup() {
size(640, 360, P3D);
tex = loadImage("berlin-1.jpg");
textureMode(NORMALIZED);
textureMode(NORMAL);
fill(255);
stroke(color(44,48,32));
}
@@ -88,4 +88,4 @@ void mouseDragged() {
float rate = 0.01;
rotx += (pmouseY-mouseY) * rate;
roty += (mouseX-pmouseX) * rate;
}
}