I created a tennis game for OSX using SDL 1.2 + OpenGL 1.1 .
Everything was ok till El Capitan. Now, a few textures aren't displayed correctly.
The court white lines are now black ; the player textures are all bad ; the energy bars on the left are all black:

The white lines on the icons aren't normal. The rainbow texture on the highlighted icon isn't either:


How the game should normally looks:

So the wrong textures are:
Moreover, it's only the AppStore version of the game that gets these glitches. The version I distribute from my website seems to be glitch free ( => http://www.managames.com/predownload_en.php?f=TennisElbowMac_sto.zip )
I'm totally puzzled by what's going on. I know El Capitan just brought a big change in the way the OS renders things, but I have no idea where to look and even less what to fix.
It seems it only touches RGBA textures, but not all of them as most GUI elements are still correctly displayed.
So thanks in advance for any tips you may have !
I am having the same issue with my graphics in software. I am using SDL 1.2 and SDL_image 1.2.12. I tried to change the format of images that I am loading with SDL_image as SDL_Surface * const surface = IMG_Load(filename);
but nothing worked. At the end, as a quick fix, I changed my graphics to BMP (disaster) and load them with pure SDL's function:
SDL_Surface * const surface = SDL_LoadBMP(filename);
After that I don't have the glitches anymore. This is not final solution especially if you have lot of graphics.
Thanks to the help of Sidney Markowitz from this thread => https://lists.gnu.org/archive/html/enigma-devel/2015-10/msg00001.html , I figured a solution : replacing SDL_Image 1.2.12 version by 1.2.10 version.
If I got this right, the catch is that 1.2.10 comes with old universal code which is not allowed on the AppStore, so submitting an App with this version would likely end in a rejection. So I'm going to try to recompile it with only x86 code, that should likely do the trick.
EDIT:
Instead of recompiling, I just used Lipo ( http://www.manpages.info/macosx/lipo.1.html ), like this :
lipo -remove ppc -output ~/Documents/SDL_image /Library/Frameworks/SDL_image.framework/Versions/A/SDL_image
And then moved back "~/Documents/SDL_image" to "/Library/Frameworks/SDL_image.framework/Versions/A/" . And finally I edited its info.plist to fix the Bundle ID (needs 2 dots in it) so publishing on the AppStore could work.
Thanks again to Sidney Markowitz for the Lipo hint ! :-)
EDIT2:
New version has been rejected by Apple, because SDL_image 1.2.10 uses a deprecated CGDataProviderCreate API. The code contains a "#ifdef" to use a newer replacement, so I'll have to recompile it instead of using Lipo, but I'm afraid this newer replacement is the actual source of the glitch on OSX El Capitan.
EDIT3:
Recompiling SDL_image 1.2.10 works, but not as it, I had to change the installation folder to @rpath and a few other parameters and then it was successfully accepted on the AppStore.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With