🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Advertisement

Latest SDL2.0 Activity

SDL2 image

good.

Also experiment with pass argument by pointer or reference.
In this particular case it could be as simple as
//apply the image
SDL_Rect my_experimental_rect = SDL_Rect(100, 0, 0, 0); // todo: move me outside the main loop
SDL_BlitSurface(gHelloWorld, 0, gScreenSurface, &my_experimental_rect);
&…

15,964 views
Advertisement

Because of the SDL_Delay(3000) statements in the event loop, (that occur between when you call SDL_PollEvent and when you actually check the event) it would take about 12 seconds to respond to a quit event (assuming it is not already responding to another event). 

7,225 views
Advertisement
Advertisement