Updated to OpenGL examples in Java mode

This commit is contained in:
codeanticode
2012-07-29 00:41:34 +00:00
parent 905c143afc
commit 362e6bf811
8 changed files with 37 additions and 4 deletions
@@ -13,15 +13,13 @@
* and maximum z values.
*/
void setup()
{
void setup() {
size(640, 360, P3D);
noStroke();
fill(204);
}
void draw()
{
void draw() {
background(0);
lights();
@@ -7,6 +7,11 @@
// of a bad printing process. Can be controlled
// with different settings for RGB
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
uniform vec3 Scale;
uniform vec3 Offset;
uniform vec3 Register;
@@ -1,3 +1,8 @@
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
uniform sampler2D textureSampler;
uniform vec2 texcoordOffset;
@@ -1,3 +1,8 @@
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
uniform sampler2D textureSampler;
uniform vec2 texcoordOffset;
@@ -5,6 +5,11 @@
// explained in Paul Bourke's website:
// http://paulbourke.net/miscellaneous/domefisheye/fisheye/
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
uniform sampler2D textureSampler;
varying vec4 vertColor;
varying vec4 vertTexcoord;
@@ -5,6 +5,11 @@
// explained in Paul Bourke's website:
// http://paulbourke.net/miscellaneous/domefisheye/fisheye/
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
uniform sampler2D textureSampler;
varying vec4 vertColor;
varying vec4 vertTexcoord;
@@ -8,6 +8,11 @@
// Useful for ceramic or fluids - from Advanced
// Renderman, thanks to Larry Gritz
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
uniform vec3 AmbientColour;
uniform vec3 DiffuseColour;
uniform vec3 SpecularColour;
@@ -1,6 +1,11 @@
// Adapted from:
// http://callumhay.blogspot.com/2010/09/gaussian-blur-shader-glsl.html
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
uniform sampler2D textureSampler;
// The inverse of the texture dimensions along X and Y