Jogamp
Adapt to JOGL's ShaderUtil API changes commit 62e5686fb583ad991d5811baf242d40d21952e27 v2.0-rc7 v2.0-rc8
authorSven Gothel <sgothel@jausoft.com>
Mon, 16 Apr 2012 19:38:49 +0000 (21:38 +0200)
committerSven Gothel <sgothel@jausoft.com>
Mon, 16 Apr 2012 19:38:49 +0000 (21:38 +0200)
src/demos/dualDepthPeeling/DualDepthPeeling.java
src/demos/es2/RedSquare.java
src/demos/es2/perftst/PerfModule.java

index f1e841c..41d50d0 100644 (file)
@@ -430,10 +430,10 @@ public class DualDepthPeeling implements GLEventListener, KeyListener, MouseList
 
     ShaderProgram build(GL2ES2 gl, String basename, boolean link) {
        ShaderProgram sp = new ShaderProgram();
-       ShaderCode vp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, DualDepthPeeling.class,
-                "shader", null, basename);
-       ShaderCode fp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, DualDepthPeeling.class,
-                                 "shader", null, basename);
+       ShaderCode vp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, DualDepthPeeling.class,
+                "shader", null, basename, false);
+       ShaderCode fp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, DualDepthPeeling.class,
+                                 "shader", null, basename, false);
        sp.add(vp);
        sp.add(fp);
        if(link && !sp.link(gl, System.err)) {
@@ -444,10 +444,10 @@ public class DualDepthPeeling implements GLEventListener, KeyListener, MouseList
     ShaderProgram build(GL2ES2 gl, String[] basenames, boolean link) {
        ShaderProgram sp = new ShaderProgram();
                ShaderCode vp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, basenames.length, DualDepthPeeling.class,
-                               "shader", basenames, null, null);
+                               "shader", basenames, null, null, false);
        sp.add(vp);
        ShaderCode fp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, basenames.length, DualDepthPeeling.class,
-                                 "shader", basenames, null, null);
+                                 "shader", basenames, null, null, false);
        sp.add(fp);
        if(link && !sp.link(gl, System.err)) {
                throw new GLException("Couldn't link program: "+sp);
index 536deb2..1269342 100755 (executable)
@@ -162,10 +162,10 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo
 
     private void initShader(GL2ES2 gl) {
         // Create & Compile the shader objects
-        ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RedSquare.class,
-                                            "shader", "shader/bin", "redsquare");
-        ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquare.class,
-                                            "shader", "shader/bin", "redsquare");
+        ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, RedSquare.class,
+                                            "shader", "shader/bin", "redsquare", false);
+        ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RedSquare.class,
+                                            "shader", "shader/bin", "redsquare", false);
 
         // Create & Link the shader program
         ShaderProgram sp = new ShaderProgram();
index ec2314b..d7cfb2c 100644 (file)
@@ -22,10 +22,10 @@ public abstract class PerfModule {
         st = new ShaderState();
 
         // Create & Compile the shader objects
-        ShaderCode vp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, Perftst.class,
-                                            "shader", "shader/bin", vShaderName);
-        ShaderCode fp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, Perftst.class,
-                                            "shader", "shader/bin", fShaderName);
+        ShaderCode vp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, Perftst.class,
+                                            "shader", "shader/bin", vShaderName, false);
+        ShaderCode fp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, Perftst.class,
+                                            "shader", "shader/bin", fShaderName, false);
 
         // Create & Link the shader program
         ShaderProgram sp = new ShaderProgram();
http://JogAmp.org git info: FAQ, tutorial and man pages.