In my iOS app (targeted for iPad), I\'d like to use non power of two (NPT) textures. My GL_VERSION query returns \"OpenGL ES 2.0 APPLE\". According to the spec, it should su
As mentioned in my edit, I found the solution. NPOT on ES 2.0 requires that you use linear filtering and clamp to edge. Also, no mipmaps.
- (BOOL)isSupportNPOT {
// GL_OES_texture_npot
// GL_APPLE_texture_2D_limited_npot
// GL_ARB_texture_non_power_of_two
EAGLContext *context_ = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1];
[EAGLContext setCurrentContext:context_];
NSArray *extensionNames = nil;
NSString *extensionsString = [NSString stringWithCString:(const char *)glGetString(GL_EXTENSIONS) encoding:NSASCIIStringEncoding];
extensionNames = [extensionsString componentsSeparatedByString:@" "];
BOOL isSupport = [extensionNames containsObject:@"GL_APPLE_texture_2D_limited_npot"];
[EAGLContext setCurrentContext:nil];
NSLog(@"Apple Opengl support NPOT is %@", isSupport ? @"YES" : @"NO");
return isSupport;
}