Sign in to follow this  

GL_MAX_COLOR_ATTACHMENTS definition on android?

This topic is 2015 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everybody,

I would like to use FBO's on android. I know it's possible because of GLES20.glGenFrameBuffers() and the other related methods. However, I can't find GL_MAX_COLOR_ATTACHMENTS anywhere?

Do I have to define it myself? Is it contained in some other class which I need to import?

Thanks!

Share this post


Link to post
Share on other sites
GLES2 specification does not support writing out to multiple offscreen color targets from a pixel shader. The GL_MAX_COLOR_ATTACHMENTS state does not exist (the spec functions as if GL_MAX_COLOR_ATTACHMENTS==1). Bind the color image to the GL_COLOR_ATTACHMENT0 attachment point of the FBO. See the [url="http://www.khronos.org/registry/gles/specs/2.0/es_full_spec_2.0.25.pdf"]GLES2.0.25 spec[/url] for details.

NVidia has registered an extension [url="http://www.khronos.org/registry/gles/extensions/NV/GL_NV_fbo_color_attachments.txt"]GL_NV_fbo_color_attachments[/url], which copies the desktop OpenGL feature for multiple color targets to GLES2. Both Tegra2 and Tegra3 support this extension, although I don't know what value they report for GL_MAX_COLOR_ATTACHMENTS.

Share this post


Link to post
Share on other sites
Thanks for your helpfull reply.

I was only aware of GL_NV_draw_buffers, which didn't mention GL_MAX_COLOR_ATTACHMENTS in it's spec.

I've tested on my TF101 tablet, which has a tegra 2 soc. It reports that it has 8 color attachments. This is probably the same for tegra 3.

Share this post


Link to post
Share on other sites

This topic is 2015 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this