How to check, programmatically, if a given OpenGL ES implementation supports non-POT textures?
Asked
Active
Viewed 957 times
3
-
Does [this](http://stackoverflow.com/a/4761453/988027) answer your question? – Dan Jul 09 '12 at 12:14
-
@Dan Thanks! It gave me the right direction to look into. – Alexander Kulyakhtin Jul 09 '12 at 12:29
1 Answers
5
Finally, what worked for me on Android was:
static public boolean isNPOTSupported(GL10 gl) {
String extensions = gl.glGetString(GL10.GL_EXTENSIONS);
return extensions.indexOf("GL_OES_texture_npot") != -1;
}

Alexander Kulyakhtin
- 47,782
- 38
- 107
- 158
-
1Do you know if the graphics driver / chip internally converts the texture to a power of 2? Or is it really possible with that extension to have some "odd" resolutions in order to save memory and bandwidth? – tiguchi Aug 18 '13 at 15:39