Original Post
I was just wondering if its possible to blit one surface to another that doesnt have the video mode assigned to it. For example i have this code: Is it possible to blit the orange straight to the background? because if I try something like this: It compiles fine but nothing shows up. Even if I try and call: Nothing happens. So is this possible? Or is it only possible to blit to the screen? (Or whatever surface holds the video information)
#include "SDL\SDL.h"
#include <string>
SDL_Surface *screen = SDL_SetVideoMode(640,480,0,SDL_ANYFORMAT)
SDL_Surface *background = LoadBMP("background.bmp")
SDL_Surface *orange = LoadBMP("orange.bmp");
int main(int argc, char* args[])
{
SDL_Init(SDL_INIT_EVERYTHING);
SDL_BlitSurface(background, NULL, screen, NULL);
SDL_BlitSurface(orange, NULL, screen, NULL);
SDL_Flip(screen);
SDL_Delay(5000);
SDL_FreeSurface(orange);
SDL_FreeSurface(background);
SDL_Quit();
return 0;
}
SDL_BlitSurface(orange, NULL, background, NULL);
SDL_Flip(background);