GL_APPLE_texture_2D_limited_npot#
Supported Hardware#
Series5, Series5XT, Series6, Series6XE, Series6XT
Valid APIs#
OpenGL ES 1.x
Description#
This extension adds limited support for non-power-of-two (POT) textures in OpenGL ES 1.x. specifically; users are now able to create 2D textures with NPOT dimensions. This relaxation does not apply to cubemaps or 3D textures. There are also several limitations:
Texture Wrap Modes
Only GL_CLAMP_TO_EDGE may be used as a wrap mode when sampling from an NPOT texture.
MIP Mapping
MIP Mapping is not supported.
Only minification filters GL_NEAREST or GL_LINEAR are allowed.
glGenerateMIPMap does not work.
Most of these restrictions are lifted if GL_OES_texture_npot is present.
Note#
This functionality is core to OpenGL ES 2.0 and 3.0. All limitations on non-power of two textures are lifted for OpenGL ES 3.0
Example#
// Upload a texture with dimensions of 15 by 47. Typically, this isn't supported without
// extension support.
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 15, 47, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixelData);
// Only the following parameters are specifiable, anything else is invalid (including the
// default texture parameters!).
glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);