From a87e849ef4861fd2da4dff5b8c026b04babe3aa2 Mon Sep 17 00:00:00 2001 From: codeanticode Date: Tue, 19 Jan 2010 04:43:46 +0000 Subject: [PATCH] Some notes concerning current OpenGL ES limitations on Android --- .../src/processing/android/core/GLTexture.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/android/core/src/processing/android/core/GLTexture.java b/android/core/src/processing/android/core/GLTexture.java index fe7b18e96..96174c6bb 100644 --- a/android/core/src/processing/android/core/GLTexture.java +++ b/android/core/src/processing/android/core/GLTexture.java @@ -953,7 +953,22 @@ public class GLTexture extends PImage implements PConstants, GLConstants IntBuffer buffer = BufferUtil.newIntBuffer(size); gl.glBindTexture(texTarget, tex[0]); - //gl.glGetTexImage(texTarget, 0, glFormat, glType, buffer); + + // Not Available: + //gl.glGetTexImage(texTarget, 0, glFormat, glType, buffer); + + // TODO: + // There is no GetTexImage, but if the texture is in a renderable format (RGB or RGBA, not L, A, or LA) + // then you can bind it to an FBO and use glReadPixels. + // From: http://www.idevgames.com/forum/showthread.php?t=17044 + // Unfortunately, FBO support seems to be available only on iPhone through an custom extension (glBindFramebufferOES, etc). + // Read also note on opengl page on android site: + // http://developer.android.com/guide/topics/graphics/opengl.html + // Specifically: + // "Finally, note that though Android does include some basic support for OpenGL ES 1.1, the support is not complete, + // and should not be relied upon at this time." + // :-( + gl.glBindTexture(texTarget, 0); buffer.get(intArray);