summaryrefslogtreecommitdiffstats
path: root/src/demos/es1/cubefbo/FBCubes.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2008-07-25 16:27:43 +0000
committerSven Gothel <[email protected]>2008-07-25 16:27:43 +0000
commit0b1b93e201294cad2000247e672f3b27dc5ab52b (patch)
treecccb2525f0d2c141f657e8f965e9f20605fef43a /src/demos/es1/cubefbo/FBCubes.java
parente3b90ddc82f92c3e10ee732b3b4d8019cbc94190 (diff)
ES 2:
Working: demo.es2.RedSquare (gl2/es2 shader+PMVMatrix) +++ ES2 Fixed Function: Working on all profiles: demo.es1.RedSquare demo.es1.cube.Cube demo.es1.cubefbo.Main (buggy .. invisible - texture shader problem !) javabullet.demos.genericjoint.GenericJointDemo (buggy .. invisible !) git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JOGL_2_SANDBOX@264 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/es1/cubefbo/FBCubes.java')
-rwxr-xr-xsrc/demos/es1/cubefbo/FBCubes.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/demos/es1/cubefbo/FBCubes.java b/src/demos/es1/cubefbo/FBCubes.java
index 1f0215f..632dfed 100755
--- a/src/demos/es1/cubefbo/FBCubes.java
+++ b/src/demos/es1/cubefbo/FBCubes.java
@@ -52,16 +52,23 @@ class FBCubes implements GLEventListener {
}
public void init(GLAutoDrawable drawable) {
- GL2ES1 gl = drawable.getGL().getGL2ES1();
+ GL gl = drawable.getGL();
+
+ if(gl.isGLES2()) {
+ gl.getGLES2().enableFixedFunctionEmulationMode(GLES2.FIXED_EMULATION_VERTEXCOLOR | GLES2.FIXED_EMULATION_TEXTURE);
+ System.err.println("FBCubes Fixed emu: FIXED_EMULATION_VERTEXCOLOR | FIXED_EMULATION_TEXTURE");
+ }
fbo1.init(gl);
+ //fbo1.init(gl, GL.GL_RGB, GL.GL_RGB, GL.GL_UNSIGNED_BYTE);
+ //fbo1.init(gl, GL.GL_RGBA, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE);
+ //fbo1.init(gl, GL.GL_RGBA8, GL2.GL_BGRA, GL2.GL_UNSIGNED_INT_8_8_8_8_REV);
cubeInner.init(drawable);
cubeOuter.init(drawable);
}
public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
- GL2ES1 gl = drawable.getGL().getGL2ES1();
cubeOuter.reshape(drawable, x, y, width, height);
}
@@ -74,7 +81,7 @@ class FBCubes implements GLEventListener {
}
public void display(GLAutoDrawable drawable) {
- GL2ES1 gl = drawable.getGL().getGL2ES1();
+ GL gl = drawable.getGL();
fbo1.bind(gl);
cubeInner.reshape(drawable, 0, 0, FBO_SIZE, FBO_SIZE);
@@ -82,7 +89,6 @@ class FBCubes implements GLEventListener {
gl.glFinish();
fbo1.unbind(gl);
-
gl.glActiveTexture(GL.GL_TEXTURE0);
gl.glEnable (gl.GL_TEXTURE_2D);
cubeOuter.reshape(drawable, 0, 0, drawable.getWidth(), drawable.getHeight());