summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-10-12 15:29:01 +0200
committerSven Gothel <[email protected]>2012-10-12 15:29:01 +0200
commitbd47a89aad60a6915551fa847eea1ecda78fc9d5 (patch)
treeafe4afc204e7642f74f36543099de9c3a951375f
parent516131e6dd5beabc9df6d659c3f7284965bbe537 (diff)
Adapt to latest JOGL changes
-rwxr-xr-xsrc/demos/es1/RedSquare.java2
-rwxr-xr-xsrc/demos/es1/angeles/AngelesGL.java3
-rwxr-xr-xsrc/demos/es1/angeles/AngelesGLil.java3
-rw-r--r--src/demos/es1/cube/Cube.java2
-rw-r--r--src/demos/es1/cube/CubeImmModeSink.java9
-rwxr-xr-xsrc/demos/es1/cubefbo/FBCubes.java3
6 files changed, 13 insertions, 9 deletions
diff --git a/src/demos/es1/RedSquare.java b/src/demos/es1/RedSquare.java
index 951eed0..cce9b31 100755
--- a/src/demos/es1/RedSquare.java
+++ b/src/demos/es1/RedSquare.java
@@ -213,7 +213,7 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo
glTrace = false;
}
- GL2ES1 gl = FixedFuncUtil.wrapFixedFuncEmul(_gl);
+ GL2ES1 gl = FixedFuncUtil.wrapFixedFuncEmul(_gl, ShaderSelectionMode.AUTO, null);
if(swapInterval>=0) {
gl.setSwapInterval(swapInterval);
}
diff --git a/src/demos/es1/angeles/AngelesGL.java b/src/demos/es1/angeles/AngelesGL.java
index 42dbf76..176e7c0 100755
--- a/src/demos/es1/angeles/AngelesGL.java
+++ b/src/demos/es1/angeles/AngelesGL.java
@@ -28,6 +28,7 @@ import javax.media.opengl.*;
import javax.media.opengl.glu.*;
import com.jogamp.opengl.util.*;
import com.jogamp.opengl.util.glsl.fixedfunc.*;
+
import java.nio.*;
public class AngelesGL implements GLEventListener {
@@ -86,7 +87,7 @@ public class AngelesGL implements GLEventListener {
cComps = drawable.getGL().isGLES1() ? 4: 3;
- this.gl = FixedFuncUtil.wrapFixedFuncEmul(drawable.getGL());
+ this.gl = FixedFuncUtil.wrapFixedFuncEmul(drawable.getGL(), ShaderSelectionMode.AUTO, null);
System.err.println("AngelesGL: "+this.gl);
this.glu = GLU.createGLU();
diff --git a/src/demos/es1/angeles/AngelesGLil.java b/src/demos/es1/angeles/AngelesGLil.java
index 3e96dc1..077b975 100755
--- a/src/demos/es1/angeles/AngelesGLil.java
+++ b/src/demos/es1/angeles/AngelesGLil.java
@@ -28,6 +28,7 @@ import javax.media.opengl.*;
import javax.media.opengl.glu.*;
import com.jogamp.opengl.util.*;
import com.jogamp.opengl.util.glsl.fixedfunc.*;
+
import java.nio.*;
public class AngelesGLil implements GLEventListener {
@@ -82,7 +83,7 @@ public class AngelesGLil implements GLEventListener {
cComps = drawable.getGL().isGLES1() ? 4: 3;
- this.gl = FixedFuncUtil.wrapFixedFuncEmul(drawable.getGL());
+ this.gl = FixedFuncUtil.wrapFixedFuncEmul(drawable.getGL(), ShaderSelectionMode.AUTO, null);
System.err.println("AngelesGL: "+this.gl);
this.glu = GLU.createGLU();
diff --git a/src/demos/es1/cube/Cube.java b/src/demos/es1/cube/Cube.java
index 001f821..49c9544 100644
--- a/src/demos/es1/cube/Cube.java
+++ b/src/demos/es1/cube/Cube.java
@@ -95,7 +95,7 @@ public class Cube implements GLEventListener {
} catch (Exception e) {e.printStackTrace();}
}
- GL2ES1 gl = FixedFuncUtil.wrapFixedFuncEmul(_gl);
+ GL2ES1 gl = FixedFuncUtil.wrapFixedFuncEmul(_gl, ShaderSelectionMode.AUTO, null);
glu = GLU.createGLU();
diff --git a/src/demos/es1/cube/CubeImmModeSink.java b/src/demos/es1/cube/CubeImmModeSink.java
index 81f89d8..208ed36 100644
--- a/src/demos/es1/cube/CubeImmModeSink.java
+++ b/src/demos/es1/cube/CubeImmModeSink.java
@@ -59,11 +59,12 @@ public class CubeImmModeSink implements GLEventListener {
}
if(vboCubeF==null) {
- ImmModeSink vbo = ImmModeSink.createFixed(gl, GL.GL_STATIC_DRAW, 36,
+ ImmModeSink vbo = ImmModeSink.createFixed(36,
3, GL.GL_SHORT, // vertex
4, GL.GL_FLOAT, // color
3, GL.GL_BYTE, // normal
- 0, GL.GL_FLOAT); // texture
+ 0, GL.GL_FLOAT, // texture
+ GL.GL_STATIC_DRAW);
vbo.glBegin(GL.GL_TRIANGLES);
@@ -167,7 +168,7 @@ public class CubeImmModeSink implements GLEventListener {
}
public void init(GLAutoDrawable drawable) {
- GL2ES1 gl = FixedFuncUtil.wrapFixedFuncEmul(drawable.getGL());
+ GL2ES1 gl = FixedFuncUtil.wrapFixedFuncEmul(drawable.getGL(), ShaderSelectionMode.AUTO, null);
glu = GLU.createGLU();
@@ -406,7 +407,7 @@ public class CubeImmModeSink implements GLEventListener {
window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
// Size OpenGL to Video Surface
window.setSize(width, height);
- window.setFullscreen(true);
+ // window.setFullscreen(true);
window.setVisible(true);
long curTime;
diff --git a/src/demos/es1/cubefbo/FBCubes.java b/src/demos/es1/cubefbo/FBCubes.java
index 5bdea5c..9da8e07 100755
--- a/src/demos/es1/cubefbo/FBCubes.java
+++ b/src/demos/es1/cubefbo/FBCubes.java
@@ -42,6 +42,7 @@ import com.jogamp.opengl.FBObject;
import com.jogamp.opengl.FBObject.Attachment;
import com.jogamp.opengl.FBObject.TextureAttachment;
import com.jogamp.opengl.util.glsl.fixedfunc.FixedFuncUtil;
+import com.jogamp.opengl.util.glsl.fixedfunc.ShaderSelectionMode;
import demos.es1.cube.Cube;
@@ -59,7 +60,7 @@ public class FBCubes implements GLEventListener {
}
public void init(GLAutoDrawable drawable) {
- GL2ES1 gl = FixedFuncUtil.wrapFixedFuncEmul(drawable.getGL());
+ GL2ES1 gl = FixedFuncUtil.wrapFixedFuncEmul(drawable.getGL(), ShaderSelectionMode.AUTO, null);
System.out.println(gl);
fbo1.reset(gl, FBO_SIZE, FBO_SIZE);