hi, I’m a SDL beginner and C beginner. I’m toying arounrd with the “put a
BMP on the screen”-tutorial on the sdl-webpages.
Please explain the meaning of the following behaviour:
When I put SDL_SetVideoMode in one funnction and “the rest”
(“the rest” is:
pic = SDL_LoadBMP(file);
SDL_BlitSurface(pic, NULL, scr, NULL);
SDL_UpdateRect(scr, 0, 0, 0, 0);
SDL_FreeSurface(pic);
)
in a different function, and call them both from main()
then I will not see the BMP “pic”.
BUT:
When I put all together in one function,
the BMP is displayed like expected.
When I put SDL_SetVideoMode into main and the rest into a
called function,
the BMP is displayed like expected.
??–
klaus peter thorn
thorn at merlinux.de
postmaster at merlinux.de postmaster at uni-hildesheim.de
www.merlinux.de/thorn