summaryrefslogtreecommitdiffstats
path: root/src/demos/es1/cubefbo
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-05-17 13:44:03 +0200
committerSven Gothel <[email protected]>2011-05-17 13:44:03 +0200
commit9a9f75a43f6c21d35bd5b59c4254e64331ce33ec (patch)
tree393b147075e8cf2cefb46a08c6be70ba087e59c7 /src/demos/es1/cubefbo
parentf3afd3cd3be302c9b9cc3b6ec56cf032817e00a4 (diff)
sync w/ JOGL 526ea7a3fb579f88a0c0a1e597387aae29d5aa06
Diffstat (limited to 'src/demos/es1/cubefbo')
-rwxr-xr-xsrc/demos/es1/cubefbo/FBCubes.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/demos/es1/cubefbo/FBCubes.java b/src/demos/es1/cubefbo/FBCubes.java
index 0bfe79a..e0dea40 100755
--- a/src/demos/es1/cubefbo/FBCubes.java
+++ b/src/demos/es1/cubefbo/FBCubes.java
@@ -72,7 +72,8 @@ public class FBCubes implements GLEventListener {
gl = gltrace;
}*/
- fbo1.init(gl, GL2ES2.GL_NEAREST, GL2ES2.GL_NEAREST, 0, 0);
+ fbo1.init(gl);
+ fbo1.attachTexture2D(gl, 0, 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
@@ -115,12 +116,11 @@ public class FBCubes implements GLEventListener {
gl.glFinish();
fbo1.unbind(gl);
- gl.glActiveTexture(GL.GL_TEXTURE0);
gl.glEnable (gl.GL_TEXTURE_2D);
+ fbo1.use(gl, 0);
cubeOuter.reshape(drawable, 0, 0, drawable.getWidth(), drawable.getHeight());
- fbo1.use(gl);
cubeOuter.display(drawable);
-
+ fbo1.unuse(gl);
gl.glDisable (gl.GL_TEXTURE_2D);
// JAUFBObject tex = fbo1;