Non power of two textures in iOS Non power of two textures in iOS ios ios

Non power of two textures in iOS

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;}