Forums - Framebuffer dimension problem

6 posts / 0 new
Last post
Framebuffer dimension problem
Joakim
Join Date: 5 Feb 14
Posts: 3
Posted: Thu, 2014-02-06 08:58

So my game with a thin framebuffer (16x256 or 16x512) works on many devices but gives a GL_FRAMEBUFFER_UNSUPPORTED error on my Galaxy Core Plus (Adreno 203). Is there any documentation on what dimensions are supported? If it's square thats not very optimal for my use case ;)

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Thu, 2014-02-06 10:35

Hi...

Can you let us know what the sizes and formats of all of the attached images in the frame buffer are?  If you change the size, does the error go away?

 

thanks

  • Up0
  • Down0
Joakim
Join Date: 5 Feb 14
Posts: 3
Posted: Fri, 2014-04-04 00:36

Sorry for the late late reply! I attach a color buffer of the same size. (16x256). Not sure about the terminology here but the source looks like this (using moai engine just cutting out the relevant parts):

u32 colorFormat = ZGL_PIXEL_FORMAT_RGBA8;
this->mGLFrameBufferID = zglCreateFramebuffer ();
this->mGLColorBufferID = zglCreateRenderbuffer ();
zglBindRenderbuffer ( this->mGLColorBufferID );
zglRenderbufferStorage ( this->mColorFormat, this->mWidth, this->mHeight );
zglBindFramebuffer ( ZGL_FRAMEBUFFER_TARGET_DRAW_READ, this->mGLFrameBufferID );
zglFramebufferRenderbuffer ( ZGL_FRAMEBUFFER_TARGET_DRAW_READ, ZGL_FRAMEBUFFER_ATTACHMENT_COLOR, this->mGLColorBufferID );
this->mGLTexID = zglCreateTexture ();
zglBindTexture ( this->mGLTexID );
zglTexImage2D ( 0, ZGL_PIXEL_FORMAT_RGBA, this->mWidth, this->mHeight, ZGL_PIXEL_FORMAT_RGBA, ZGL_PIXEL_TYPE_UNSIGNED_BYTE, 0 );
zglFramebufferTexture2D ( ZGL_FRAMEBUFFER_TARGET_DRAW_READ, ZGL_FRAMEBUFFER_ATTACHMENT_COLOR, this->mGLTexID, 0 );

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Fri, 2014-04-04 07:11

GL_FRAMEBUFFER_UNSUPPORTED can also involve inconsistent color formats in the FBO.

Look at http://www.opengl.org/wiki/Framebuffer_Object  for more details.

Not sure how the moai engine is translating the calls into gles calls.

  • Up0
  • Down0
Joakim
Join Date: 5 Feb 14
Posts: 3
Posted: Fri, 2014-04-04 07:58

It translates pretty much 1-1, just remove the Z. Anyway it's just about size since if I change the size to 64x64 it works. So I just wondered if there are any documented lower size limits for the framebuffer and/or textures.

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Tue, 2014-04-08 07:09

I've checked with our driver team, and confirmed that there are no explicit lower size limits on the framebuffer size.  If there's an apk you can share which duplicates the problem, we can investigate further.

  • 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.