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);
&…

14,405 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). 

6,947 views
Advertisement
Advertisement