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 ;)
Framebuffer dimension problem
Posted: Thu, 2014-02-06 08:58
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
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 );
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.
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.
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.