i am writing an SDL / OpenGL application that runs under OSX. I have to use existing code which uses the DevIL library for loading JPG and PNG textures. Unfortunately, this works very bad under OS X, so i decided not to use DevIL at all, and rewrite the respective parts of the application using another library. I want to keep it flexible (DevIL can handle a lot of image formats) and easy to use. Is there a good replacement for DevIL that you can recommend? The application is entirely written in C++.
Share
Have a look at the SDL_image library. It offers functions like
IMG_LoadPNGthat load your picture “as an” SDL_Surface.Since you already work with SDL this should fit quite well in your program.
Sample taken from the SDL_image documentation: