Forums - Nexus 7 OpenGL ES 3.0 Problem with framebuffer color attachments

4 posts / 0 new
Last post
Nexus 7 OpenGL ES 3.0 Problem with framebuffer color attachments
eros16700
Join Date: 15 Aug 13
Posts: 5
Posted: Wed, 2013-08-21 03:45

Hello Everyone!

I have a problem with framebuffer color attachments. When I use one color attachment everything all right, but when I create FBO with multiple color attachments and switch between them (calls function glDrawBuffers) I get error:

W/Adreno200-ES20(17390): <core_glDrawBuffers:3013>: GL_INVALID_OPERATION

I use device Nexus 7

Functions glGetString(GL_RENDERER) returns:

Adreno (TM) 320

glGetString(GL_RENDERER) returns:

OpenGL ES 3.0 [email protected]

 glGetIntegerv(GL_MAX_COLOR_ATTACHMENTS, &n) returns:

4

Can someone explain my device (Nexus 7) supports multiple color attachments?
 

  • Up0
  • Down0
RelativeGames
Profile picture
Join Date: 16 Apr 13
Posts: 56
Posted: Wed, 2013-10-23 01:21

 

I can confirm that this issue exists on my Nexus 4, Android 4.3.

Specifically, a call like this :

 

GLenum Buffer = GL_COLOR_ATTACHMENT0;
glDrawBuffers( 1, &Buffer );

is throwing out that W/Adreno200-ES20(1326): <core_glDrawBuffers:3013>: GL_INVALID_OPERATION
 

It's weird that when doing

GLenum Buffers[2]= { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1 };
glDrawBuffers( 2, Buffers );

Does NOT throw an error but actually works as intended with the adequate shaders, so the issue might be that it doesn't support texture detaching or reattaching ?

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Wed, 2013-10-23 09:39

Multiple color attachments should be supported on the Nexus devices.  Is this a problem you're finding unique to Nexus devices?

 

1) Check the error description in http://www.opengl.org/sdk/docs/man/xhtml/glDrawBuffers.xml and verify neither of those scenerios is appropriate.

 

2) Take a look at our Adreno SDK.  There's a gles2 texture synthesis sample which uses 2 color render targets

https://developer.qualcomm.com/mobile-development/mobile-technologies/ga...

 

3) Is there an apk you can provide which reproduces the problem?

 

thanks,

mark

  • Up0
  • Down0
RelativeGames
Profile picture
Join Date: 16 Apr 13
Posts: 56
Posted: Wed, 2013-10-23 18:24

 

 

Ups, mea culpa on this one. After seeing the error on my desktop HD7850 I read why glDrawBuffers throws errors. One of the reasons is invalid color attachments. So basically, if you have a render target class (like I do) and call glDrawBuffers with GL_COLOR_ATTACHMENT0 on the backbuffer, well that is an invalid operation because it doesn't have said attachment. It's a bit weird and does imply that the backbuffer doesn't support multiple render targets but hey, now I check to see if I have a texture attached to my framebuffer object and the error is gone.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.