
GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST) GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE) GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE) Width and height do not have to be a power of two GlBindTexture(GL_TEXTURE_2D, colour_texture) Generate a texture to hold the colour buffer GlGenFramebuffers( 1, &(frame_buffer ) ) Got this to work on Android 2.2 with OpenGL ES 2: // Create a frame buffer My ideal is to get depth and colour at the same time - don't really want to render colour and depth separately if I can help it. Will look at that if I can't get another solution working. Thanks for the fragment shader suggestion - I get the idea now. The Framebuffer status is that it is not complete. Regarding code - my source is barely different from the link I posted above. I also want to look at ES 2 - I am not sure I understand the idea of packing the depth information into colour buffer - do you have a reference I can look at to understand the idea better? Thanks for the comments - I specifically needed a solution for ES 1.1, if it could be found and work on Android. Is there a simple example of configuring an OpenGL ES FBO on Android to render depth to a texture? Alternatively is there a document describing what is and is not supported? My current code is based on this example but creating a colour texture as well instead of setting draw and read buffers to none. I seem to be able to get an FBO set-up with a colour texture but every time I attach a depth texture it fails. Having seen a number of examples for OpenGL, OpenGL ES on other platforms (including iPhone) I have tried a number of FBO configurations. I want to render the depth buffer to a texture. And if I change the texture to RGB it works.īut for the blending I need to access to the luminance and not the rgb component of my image.I am using an Android device running Froyo supporting OpenGL ES 1.1 and OpenGL ES 2.0 But in the draw function, when I bind to this FrameBuffer and check the Status I got the error GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT. Then I do the same with the second image which its format is GL_LUMINANCE. The texture's format is GL_RGB and it works fine, my first FBO contains the rendering in its texture. So I create one FBO for the first image, then I associate to that FBO a new texture which will received the rendering output. I think the best way to achieve my goal is to use Frame Buffer Object. My first image/texture is RGB and the second one is in grayscale, so I only got the luminance.

Here is my problem : I would like to render 2 images offscreen (which come from previous rendering) and then blend them together with a special algorithm. I'm working with OpenGL ES 3.0 on the im圆q sabreSD.
