I am using GLKit's GLTextureLoader, and the texture seems to work but I get this error in Instruments OpenGL ES expert:
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_BGRA, GL_UNSIGNED_BYTE, 0x106ec8000l) Invalid internal format(GL_RGBA), format(GL_BGRA) and type(GL_UNSIGNED_BYTE) combination
I am loading a 24-bit PNG with transparency with the following code:
NSDictionary *options = @{GLKTextureLoaderGenerateMipmaps: @YES,
GLKTextureLoaderOriginBottomLeft: @YES};
NSError *error;
NSString *path = [[NSBundle mainBundle] pathForResource:@"brushTexture.png" ofType:nil];
GLKTextureInfo *texture = [GLKTextureLoader textureWithContentsOfFile:path options:options error:&error];
The texture seems to work, but I was trying to resolve these errors reported by Instruments OpenGL ES expert:
Your application made a draw call using a texture that has miplevels with inconsistent internal formats. This will result in incorrect rendering. Each miplevel should have the same internal format. Miplevel 0 has a different internal format than miplevel 1.
Mipmapping has been enabled for this texture, but you are missing levels of your mip-chain. The rendering results will likely be incorrect. See documentation on TexImage2D, and TexParameteriv for more information.
All suggestions are appreciated!