[SDL] Get the window position on SDL/X11

Gabriele Greco gabrielegreco at tin.it
Thu Jan 16 06:00:01 PST 2003

 >i have a resource file full of graphics (lets say all png) i know the =
 >where to locate each png in my file.. how do i do to pass this =
 >informatin to an SDL_Surface.

Well, i guess most SDL_Image methods offer you to load a png file from a 
file but this file has to be one png only. So you would have to export 
that png file from the resource file to a tmp file and then let 
SDL_Image load it. On the other hand watch out for png libraries that 
let you load a png image from a buffer in memory. You then could load 
the png data fromfile to the buffer and convert it to an sdl surface. 
Maybe SDL_Image can  do this also for you. I am not very familiar with it.

I could also offer you a self made resource file format and c++ classes 
to handle it, but i havent implemented a png data loader yet ( BITMAP 
AND WAVE are available).

Hope this  helped you a bit.


Gesendet von Yahoo! Mail - http://mail.yahoo.de
Weihnachts-Einkäufe ohne Stress! http://shopping.yahoo.de

More information about the SDL mailing list