It looks like you're new here. If you want to get involved, click one of these buttons!
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
to
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
those textures will be rendered correctly. however this will of course mess up if you set the alpha value of some object manually, e.g. through some effect. so I suppose the alpha value is premultiplied somewhere.
Comments
so when drawing the image(CGContextDrawImage) in that context it will be premultiplied.
so that's the cause. now the question is what will be a decent solution
this code will just remove the premultiplied alpha, after drawing the image into the context.
that's also how the SDL and the OSG guys did it:
http://bugzilla.libsdl.org/show_bug.cgi?id=868
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgPlugins/imageio/ReaderWriterImageIO_IOS.cpp https://forum.orx-project.org/uploads/legacy/fbfiles/files/iphonepremultipliedalphabug.zip
Thanks for the patch, I'll integrate it tonight!