MipMap errors using GLKit GLTextureLoader

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!

Replies

Once upon a time I found this forum helpful. Apple engineers would even chim in - if no one else.


Now it seems it is a place to let issues die.


😢

I have this same issue, though I'm loading the textures myself. What's frustrating is that everything looks fine in the inspector. All the texture levels are there, all are correctly sized, and all are the same internal format. So I don't know what it's complaining about. It seems like it all started after the lastest xcode 8.1 update, but I could be wrong there. It's interesting that it's hapenning with GLKit, as this indicates it might not be something in my code after all.