Load other than BMP's with SDL?
Try SDL_image.
Quote:
This is a simple library to load images of various formats as SDL surfaces.
This library supports BMP, PNM (PPM/PGM/PBM), XPM, LBM, PCX, GIF, JPEG, PNG,
TGA, and TIFF formats.
As peregrin said, try SDL_image in fact all you have to do is very simple:
1. add the header to your source files
#include "SDL_image"
2. tell the linker to link against the library
(on linux, add this flag to your linker command on your Makefile)
-lSDL_image
3. replace all your SDL_LoadBMP() occurrences with IMG_Load()
and you're done :)
Marco
1. add the header to your source files
#include "SDL_image"
2. tell the linker to link against the library
(on linux, add this flag to your linker command on your Makefile)
-lSDL_image
3. replace all your SDL_LoadBMP() occurrences with IMG_Load()
and you're done :)
Marco
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement