Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


GL_MAX_COLOR_ATTACHMENTS definition on android?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 chronozphere   Members   -  Reputation: 142

Like
0Likes
Like

Posted 10 June 2012 - 09:21 AM

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!

Sponsor:

#2 clb   Members   -  Reputation: 1785

Like
0Likes
Like

Posted 10 June 2012 - 11:59 AM

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.
Me+PC=clb.demon.fi | C++ Math and Geometry library: MathGeoLib, test it live! | C++ Game Networking: kNet | 2D Bin Packing: RectangleBinPack | Use gcc/clang/emcc from VS: vs-tool | Resume+Portfolio | gfxapi, test it live!

#3 chronozphere   Members   -  Reputation: 142

Like
0Likes
Like

Posted 10 June 2012 - 12:46 PM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS