Jump to content
  • Advertisement
Sign in to follow this  
chronozphere

GL_MAX_COLOR_ATTACHMENTS definition on android?

This topic is 2227 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
Advertisement
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 GLES2.0.25 spec for details.

NVidia has registered an extension GL_NV_fbo_color_attachments, 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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!