summaryrefslogtreecommitdiffstats
path: root/src/demos
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-02-24 02:58:23 +0100
committerSven Gothel <[email protected]>2012-02-24 02:58:23 +0100
commit067baba5f5c242b754ed3ff26bfd639d86812478 (patch)
tree8bfbd41df8c7066b7347ad65178a861f515d9220 /src/demos
parent063477d2a3136a3294a6f8917c87fa31f50a5467 (diff)
Adapt to latest JOGL changes (commit: a4c7bf0420e369e71561d2847f2fc444ce5abafa, d97c54896d349e8a22c9cafec75c62476c16fdd1)
Diffstat (limited to 'src/demos')
-rwxr-xr-xsrc/demos/GLInfo.java5
-rw-r--r--src/demos/dualDepthPeeling/DualDepthPeeling.java2
-rwxr-xr-xsrc/demos/es2/RedSquare.java8
-rwxr-xr-xsrc/demos/es2/openmax/MovieSimple.java6
-rw-r--r--src/demos/es2/perftst/PerfModule.java8
5 files changed, 12 insertions, 17 deletions
diff --git a/src/demos/GLInfo.java b/src/demos/GLInfo.java
index c49a578..1af0354 100755
--- a/src/demos/GLInfo.java
+++ b/src/demos/GLInfo.java
@@ -4,7 +4,6 @@ import javax.media.opengl.*;
import javax.media.nativewindow.*;
import com.jogamp.newt.*;
-import com.jogamp.newt.event.*;
import com.jogamp.newt.opengl.*;
public class GLInfo extends Thread implements GLEventListener {
@@ -94,8 +93,8 @@ public class GLInfo extends Thread implements GLEventListener {
GLProfile glp = gl.getGLProfile();
System.err.println(glp+" GL Profile Static: "+GLProfile.glAvailabilityToString());
- System.err.println(glp+" GL Profile Static - MaxFixedFunc: "+GLProfile.getMaxFixedFunc());
- System.err.println(glp+" GL Profile Static - MaxProgrammable: "+GLProfile.getMaxProgrammable());
+ System.err.println(glp+" GL Profile Static - MaxFixedFunc: "+GLProfile.getMaxFixedFunc(true));
+ System.err.println(glp+" GL Profile Static - MaxProgrammable: "+GLProfile.getMaxProgrammable(true));
System.err.println(glp+" GLCapabilities POST: "+drawable.getChosenGLCapabilities());
System.err.println(glp+" GL Profile: "+drawable.getGLProfile());
System.err.println(glp+" GL:" + gl);
diff --git a/src/demos/dualDepthPeeling/DualDepthPeeling.java b/src/demos/dualDepthPeeling/DualDepthPeeling.java
index eccf8ba..f1e841c 100644
--- a/src/demos/dualDepthPeeling/DualDepthPeeling.java
+++ b/src/demos/dualDepthPeeling/DualDepthPeeling.java
@@ -541,7 +541,7 @@ public class DualDepthPeeling implements GLEventListener, KeyListener, MouseList
void InitGL()
{
- GLProfile kProfile = GLProfile.getMaxProgrammable();
+ GLProfile kProfile = GLProfile.getMaxProgrammable(true);
GLCapabilities kGlCapabilities = new GLCapabilities(kProfile);
kGlCapabilities.setHardwareAccelerated(true);
m_kCanvas = new GLCanvas(kGlCapabilities);
diff --git a/src/demos/es2/RedSquare.java b/src/demos/es2/RedSquare.java
index c335478..536deb2 100755
--- a/src/demos/es2/RedSquare.java
+++ b/src/demos/es2/RedSquare.java
@@ -161,12 +161,10 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo
PMVMatrix pmvMatrix;
private void initShader(GL2ES2 gl) {
- int tmpI;
-
// Create & Compile the shader objects
- ShaderCode rsVp = ShaderCode.create(gl, gl.GL_VERTEX_SHADER, 1, RedSquare.class,
+ ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RedSquare.class,
"shader", "shader/bin", "redsquare");
- ShaderCode rsFp = ShaderCode.create(gl, gl.GL_FRAGMENT_SHADER, 1, RedSquare.class,
+ ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquare.class,
"shader", "shader/bin", "redsquare");
// Create & Link the shader program
@@ -179,7 +177,7 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo
// Let's manage all our states using ShaderState.
st = new ShaderState();
- st.attachShaderProgram(gl, sp);
+ st.attachShaderProgram(gl, sp, false);
}
public void init(GLAutoDrawable drawable) {
diff --git a/src/demos/es2/openmax/MovieSimple.java b/src/demos/es2/openmax/MovieSimple.java
index d6c8c7b..eaf5221 100755
--- a/src/demos/es2/openmax/MovieSimple.java
+++ b/src/demos/es2/openmax/MovieSimple.java
@@ -137,9 +137,9 @@ public class MovieSimple implements MouseListener, GLEventListener, OMXEventList
int tmpI;
// Create & Compile the shader objects
- ShaderCode rsVp = ShaderCode.create(gl, gl.GL_VERTEX_SHADER, 1, MovieSimple.class,
+ ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, MovieSimple.class,
"shader", "shader/bin", "moviesimple");
- ShaderCode rsFp = ShaderCode.create(gl, gl.GL_FRAGMENT_SHADER, 1, MovieSimple.class,
+ ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, MovieSimple.class,
"shader", "shader/bin", "moviesimple");
// Create & Link the shader program
@@ -152,7 +152,7 @@ public class MovieSimple implements MouseListener, GLEventListener, OMXEventList
// Let's manage all our states using ShaderState.
st = new ShaderState();
- st.attachShaderProgram(gl, sp);
+ st.attachShaderProgram(gl, sp, false);
}
OMXInstance movie=null;
diff --git a/src/demos/es2/perftst/PerfModule.java b/src/demos/es2/perftst/PerfModule.java
index b472039..ec2314b 100644
--- a/src/demos/es2/perftst/PerfModule.java
+++ b/src/demos/es2/perftst/PerfModule.java
@@ -22,9 +22,9 @@ public abstract class PerfModule {
st = new ShaderState();
// Create & Compile the shader objects
- ShaderCode vp = ShaderCode.create(gl, gl.GL_VERTEX_SHADER, 1, Perftst.class,
+ ShaderCode vp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, Perftst.class,
"shader", "shader/bin", vShaderName);
- ShaderCode fp = ShaderCode.create(gl, gl.GL_FRAGMENT_SHADER, 1, Perftst.class,
+ ShaderCode fp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, Perftst.class,
"shader", "shader/bin", fShaderName);
// Create & Link the shader program
@@ -45,9 +45,7 @@ public abstract class PerfModule {
System.out.println("shader creation: "+dt+" ms");
// Let's manage all our states using ShaderState.
- st.attachShaderProgram(gl, sp);
-
- st.useProgram(gl, true);
+ st.attachShaderProgram(gl, sp, true);
}
public static final void put(Buffer buffer, int type, float v) {