diff options
author | Sven Gothel <[email protected]> | 2009-03-16 15:33:10 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2009-03-16 15:33:10 +0000 |
commit | aefbc0323da190835bc146709bf560b3e3181b39 (patch) | |
tree | 0c025c00504372eb64ef0092b17186103d82bb58 /src/demos/es1/angeles | |
parent | b2c27c8edc2e9516a5341332a3480485d72eb6af (diff) |
sync with JOGL changes
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JOGL_2_SANDBOX@322 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/es1/angeles')
-rwxr-xr-x | src/demos/es1/angeles/AngelesGL.java | 29 | ||||
-rwxr-xr-x | src/demos/es1/angeles/AngelesGLil.java | 29 | ||||
-rwxr-xr-x | src/demos/es1/angeles/Main.java | 1 |
3 files changed, 19 insertions, 40 deletions
diff --git a/src/demos/es1/angeles/AngelesGL.java b/src/demos/es1/angeles/AngelesGL.java index 386d1db..b6317cc 100755 --- a/src/demos/es1/angeles/AngelesGL.java +++ b/src/demos/es1/angeles/AngelesGL.java @@ -29,8 +29,7 @@ import javax.media.opengl.sub.*; import javax.media.opengl.sub.fixed.*; import javax.media.opengl.util.*; import javax.media.opengl.glu.*; -import com.sun.opengl.util.glsl.fixed.*; -import com.sun.opengl.impl.fixed.GLFixedFuncImpl; +import com.sun.opengl.util.*; import java.nio.*; public class AngelesGL implements GLEventListener { @@ -83,22 +82,12 @@ public class AngelesGL implements GLEventListener { public void init(GLAutoDrawable drawable) { // FIXME: gl.setSwapInterval(1); - { - GL _gl = drawable.getGL(); - if(!GLFixedFuncUtil.isGLFixedFuncIf(_gl)) { - if(_gl.isGLES2()) { - this.gl = new GLFixedFuncImpl(_gl, new FixedFuncHook(_gl.getGL2ES2())); - } else { - this.gl = new GLFixedFuncImpl(_gl, _gl.getGL2ES1()); - } - _gl.getContext().setGL(this.gl); - } else { - this.gl = GLFixedFuncUtil.getGLFixedFuncIf(_gl); - } - System.err.println("AngelesGL: "+this.gl); - } + cComps = drawable.getGL().isGLES1() ? 4: 3; + + this.gl = GLFixedFuncUtil.getFixedFuncImpl(drawable.getGL()); + System.err.println("AngelesGL: "+this.gl); + this.glu = GLU.createGLU(); - cComps = gl.isGLES1() ? 4: 3; gl.glEnable(GL2ES1.GL_NORMALIZE); gl.glEnable(GL.GL_DEPTH_TEST); @@ -148,7 +137,7 @@ public class AngelesGL implements GLEventListener { this.x = x; this.y = y; - this.gl = GLFixedFuncUtil.getGLFixedFuncIf(drawable.getGL()); + this.gl = drawable.getGL().getGL2ES1(); gl.glMatrixMode(gl.GL_MODELVIEW); gl.glLoadIdentity(); @@ -177,7 +166,7 @@ public class AngelesGL implements GLEventListener { if (gAppAlive==0) return; - this.gl = GLFixedFuncUtil.getGLFixedFuncIf(drawable.getGL()); + this.gl = drawable.getGL().getGL2ES1(); // Actual tick value is "blurred" a little bit. sTick = (sTick + tick - sStartTick) >> 1; @@ -232,7 +221,7 @@ public class AngelesGL implements GLEventListener { } private boolean blendingEnabled = true; - private GLFixedFuncIf gl; // temp cache + private GL2ES1 gl; // temp cache private GLU glu; // Total run length is 20 * camera track base unit length (see cams.h). diff --git a/src/demos/es1/angeles/AngelesGLil.java b/src/demos/es1/angeles/AngelesGLil.java index 415008e..55694a3 100755 --- a/src/demos/es1/angeles/AngelesGLil.java +++ b/src/demos/es1/angeles/AngelesGLil.java @@ -29,8 +29,7 @@ import javax.media.opengl.sub.*; import javax.media.opengl.sub.fixed.*; import javax.media.opengl.util.*; import javax.media.opengl.glu.*; -import com.sun.opengl.util.glsl.fixed.*; -import com.sun.opengl.impl.fixed.GLFixedFuncImpl; +import com.sun.opengl.util.*; import java.nio.*; public class AngelesGLil implements GLEventListener { @@ -83,22 +82,12 @@ public class AngelesGLil implements GLEventListener { public void init(GLAutoDrawable drawable) { // FIXME: gl.setSwapInterval(1); - { - GL _gl = drawable.getGL(); - if(!GLFixedFuncUtil.isGLFixedFuncIf(_gl)) { - if(_gl.isGLES2()) { - this.gl = new GLFixedFuncImpl(_gl, new FixedFuncHook(_gl.getGL2ES2())); - } else { - this.gl = new GLFixedFuncImpl(_gl, _gl.getGL2ES1()); - } - _gl.getContext().setGL(this.gl); - } else { - this.gl = GLFixedFuncUtil.getGLFixedFuncIf(_gl); - } - System.err.println("AngelesGL: "+this.gl); - } + cComps = drawable.getGL().isGLES1() ? 4: 3; + + this.gl = GLFixedFuncUtil.getFixedFuncImpl(drawable.getGL()); + System.err.println("AngelesGL: "+this.gl); + this.glu = GLU.createGLU(); - cComps = gl.isGLES1() ? 4: 3; gl.glEnable(GL2ES1.GL_NORMALIZE); gl.glEnable(GL.GL_DEPTH_TEST); @@ -160,7 +149,7 @@ public class AngelesGLil implements GLEventListener { this.x = x; this.y = y; - this.gl = GLFixedFuncUtil.getGLFixedFuncIf(drawable.getGL()); + this.gl = drawable.getGL().getGL2ES1(); gl.glMatrixMode(gl.GL_MODELVIEW); gl.glLoadIdentity(); @@ -189,7 +178,7 @@ public class AngelesGLil implements GLEventListener { if (gAppAlive==0) return; - this.gl = GLFixedFuncUtil.getGLFixedFuncIf(drawable.getGL()); + this.gl = drawable.getGL().getGL2ES1(); // Actual tick value is "blurred" a little bit. sTick = (sTick + tick - sStartTick) >> 1; @@ -244,7 +233,7 @@ public class AngelesGLil implements GLEventListener { } private boolean blendingEnabled = true; - private GLFixedFuncIf gl; // temp cache + private GL2ES1 gl; // temp cache private GLU glu; // Total run length is 20 * camera track base unit length (see cams.h). diff --git a/src/demos/es1/angeles/Main.java b/src/demos/es1/angeles/Main.java index a4e345b..9a97305 100755 --- a/src/demos/es1/angeles/Main.java +++ b/src/demos/es1/angeles/Main.java @@ -4,6 +4,7 @@ import java.nio.*; import javax.media.nwi.*; import javax.media.opengl.*; import com.sun.javafx.newt.*; +import com.sun.javafx.newt.opengl.*; public class Main implements WindowListener, MouseListener { |