summaryrefslogtreecommitdiffstats
path: root/src/demos/es1/cubefbo
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-04-05 01:55:54 +0200
committerSven Gothel <[email protected]>2011-04-05 01:55:54 +0200
commita7317cf820a33cac7f068153649031483df53cac (patch)
tree7f6125bd502f25d3faf50b15638e20b809042fea /src/demos/es1/cubefbo
parent05e3d96ff9586b2f6cd5c2841337f9be7d07c313 (diff)
Adapt to FBObject jogl changes b44288b26e8ac6de0593db349725c2a288bb520a
Diffstat (limited to 'src/demos/es1/cubefbo')
-rwxr-xr-xsrc/demos/es1/cubefbo/FBCubes.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/demos/es1/cubefbo/FBCubes.java b/src/demos/es1/cubefbo/FBCubes.java
index b6a1b0d..0bfe79a 100755
--- a/src/demos/es1/cubefbo/FBCubes.java
+++ b/src/demos/es1/cubefbo/FBCubes.java
@@ -45,7 +45,7 @@ public class FBCubes implements GLEventListener {
public FBCubes () {
cubeOuter = new Cube(true, false);
- fbo1 = new FBObject(FBO_SIZE, FBO_SIZE, FBObject.ATTR_DEPTH);
+ fbo1 = new FBObject(FBO_SIZE, FBO_SIZE);
cubeInner = new Cube(false, true);
// JAU cubeMiddle = new Cube(true, false);
@@ -72,11 +72,13 @@ public class FBCubes implements GLEventListener {
gl = gltrace;
}*/
- fbo1.init(gl);
- //fbo1.init(gl, GL.GL_RGB, GL.GL_RGB, GL.GL_UNSIGNED_BYTE); // faster
- //fbo1.init(gl, GL.GL_RGBA, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE); // GLES2 default
- //fbo1.init(gl, GL.GL_RGBA, GL.GL_RGBA, GL.GL_UNSIGNED_SHORT_5_5_5_1); // useless (1bit alpha)
- //fbo1.init(gl, GL.GL_RGBA8, GL2.GL_BGRA, GL2.GL_UNSIGNED_INT_8_8_8_8_REV); // GL2 default
+ fbo1.init(gl, GL2ES2.GL_NEAREST, GL2ES2.GL_NEAREST, 0, 0);
+ fbo1.attachDepthBuffer(gl, GL.GL_DEPTH_COMPONENT16);
+ //fbo1.init(gl, GL.GL_RGB, GL.GL_RGB, GL.GL_UNSIGNED_BYTE, GL2ES2.GL_NEAREST, GL2ES2.GL_NEAREST, 0, 0); // faster
+ //fbo1.init(gl, GL.GL_RGBA, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, GL2ES2.GL_NEAREST, GL2ES2.GL_NEAREST, 0, 0); // GLES2 default
+ //fbo1.init(gl, GL.GL_RGBA, GL.GL_RGBA, GL.GL_UNSIGNED_SHORT_5_5_5_1, GL2ES2.GL_NEAREST, GL2ES2.GL_NEAREST, 0, 0); // useless (1bit alpha)
+ //fbo1.init(gl, GL.GL_RGBA8, GL2.GL_BGRA, GL2.GL_UNSIGNED_INT_8_8_8_8_REV, GL2ES2.GL_NEAREST, GL2ES2.GL_NEAREST, 0, 0); // GL2 default
+ fbo1.unbind(gl);
cubeInner.init(drawable);
cubeOuter.init(drawable);
@@ -118,7 +120,6 @@ public class FBCubes implements GLEventListener {
cubeOuter.reshape(drawable, 0, 0, drawable.getWidth(), drawable.getHeight());
fbo1.use(gl);
cubeOuter.display(drawable);
- fbo1.unbind(gl);
gl.glDisable (gl.GL_TEXTURE_2D);