- December 20, 2011 at 6:54 pm #30717
I wrote application that renders to FBO (texture as color attachment, renderbufferobject as depth attachment). I’ve tried using npot texture with mipmap 0 as color attachment for rendering full screen quad but when checking if FBO is complete it fails and fails when creating color attachment as texture for that FBO. I’m developing on Android 4.0 Galaxy Nexus with PowerVR SGX 540_120 chip on board. Sources of Android 4.0 are from Google site, also drivers (binaries) for PowerVR SGX 540_120 are from Google site ? I read on forum that OpenGL ES 2.0 has support for Npot textures ??
What about OpenGL ES 1.1 ?December 20, 2011 at 6:55 pm #35346
Also I forget to mention that I use GL_CLAMP_TO_EDGE as texture wrap mode.January 10, 2012 at 11:56 am #35347
OpenGL ES 1.1 does not have core support for npot textures.
You have to check for the texture_npot extension before using them.
OpenGL ES 2.0 does support npot textures but please be aware that there are limitations when it comes to texture filtering for npot textures.
MarcoJanuary 19, 2012 at 8:41 pm #35348
I’m currently struggling through this as well. Can you explain what the limitations are? I can’t find any documentation that explains what to do to make NPOT support reliable.January 23, 2012 at 9:28 am #35349
The best documentation to look at are the ES 1.1 and ES 2.0 specifications
and the online man-pages
The one for ES2.0 states for glTexParameter the following:
“Similarly, if the width or height of a texture image are not powers of two and either the GL_TEXTURE_MIN_FILTER is set to one of the functions that requires mipmaps or the GL_TEXTURE_WRAP_S or GL_TEXTURE_WRAP_T is not set to GL_CLAMP_TO_EDGE, then the texture image unit will return (R, G, B, A) = (0, 0, 0, 1).”
MarcoMarch 16, 2012 at 8:12 am #35350
i’m also using FBO and followed all provided information you gave in that forum.
My texture is 1024×1024 and is a EGLImage obtained from an Android native buffer.
All the FBO setup is fine (i checked the status and glError at each step and there is no error).
The problem is that nothing is drawn in my texture.
For information i tried on another mobile with different GPU and it is working fine. But one of the major diff is that on PowerVR SGX540 is not supporting npot_texture extension while the other ones yes.
For the moment i conclude that i’m certainly missing a configuration but i don’t find which one.
Texture parameters are:
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
texture size is 1024×1024 format is RGB565
Any idea on possible missing configuration.
Thanks a lot for your help.
SebMarch 16, 2012 at 8:38 am #35351
We’ve found that some devices don’t support framebuffer formats other than RGBA. Don’t remember if that’s the case for PowerVR, but FYI. We only ever use RGBA as a result.