How to load PNG images in SDL?

I tried googling it and suprisingly nothing useful comes up. I can upload BMP images using the IMG_LoadBMP function. I assumed SDL_LoadPNG would work but according to VC++, 'SDL_LoadPNG identifier not found'. Any help would be appreciated!
Last edited on
closed account (3CXz8vqX)
Google Lazyfoo
You need SDL_image, a separate library. I support the suggestion above.
Last edited on
Aha, thanks, tutorial 3 is just what I was looking for. :)
Yep, instead of SDL_LoadBMP("some.bmp"); it's SDL_LoadIMG("some.png");
closed account (3CXz8vqX)
or "some.gif" and so on...
Topic archived. No new replies allowed.