3

How to check, programmatically, if a given OpenGL ES implementation supports non-POT textures?

Alexander Kulyakhtin
  • 47,782
  • 38
  • 107
  • 158

1 Answers1

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
  • 1
    Do 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