GL_MAX_COLOR_ATTACHMENTS definition on android?

Started by
1 comment, last by chronozphere 11 years, 10 months ago
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!
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.
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.

This topic is closed to new replies.

Advertisement