   SDL - an exact copy of the screen
  (I hope it's OK i made a new thread for this question, even if I mentioned it in an earlier thread I made)Because of slowdowns in fullscreen I decided I should try to render everything on a software surface, identical to the screen one, then blit the copy to the screen... but I don't know what is the safest way to do this :)I have SDL_Surface *screen, *screen_shadow; of which screen is used for SDL_SetVideoMode. Then I did screen_shadow = SDL_CreateRGBSurface with the same parameters as for screen, but in software. After rendering I do SDL_BlitSurface( screen_shadow, NULL, screen, NULL ); and then the flip.Is there a safer way to verify memory sizes are equal etcetera? I'm very new to this that's why I'm asking :)   
Quote:Then I did screen_shadow = SDL_CreateRGBSurface with the same parameters as for screen, but in software.You might also want to add a call to SDL_DisplayFormat to make the image the exact same format as the main screen. I'm thinking you could actually skip creating a new surface and just use the one provided by SDL_DisplayFormat. For example:screen_shadow = SDL_DisplayFormat( SDL_GetVideoSurface() );Then you can just do one SDL_FillRect to clear that screen to black in case anythign was there after you first create it, then you can just go as you said in your post, drawing to it, then blitting to the screen, then finally flipping.   ;  this is what SDL does if it cant get you the settings you want - and its slower when it happens. it's transparent to you though, you would have to inspect the surface returned by SDL_SetVideoMode(...) to see what settings it actually got you. its better to run test trials of blitting the following for your video surface as software and again as hardware.blitting a s/w surface blitting a h/w surfaceblitting a s/w colourkey surfaceblitting a h/w colourkey surfaceblitting a s/w alpha surfaceblitting a h/w alpha surfacealso try varying your resolution, bits per pixel, etc.  ;  Thus far with screen_shadow created as a new surface works faster (not very fast like in window but I guess I have more problems I need to search for in my program). Trying Drew's method to format directly the screen brings no speed improvement which makes me think it creates the shadow as a hardware surface, which I don't need.Thanks for the help, I'll come back with details if I find anything extraordinary :)Oh and thanks for reminding me to use DisplayFormat, I had some crazy artifacts on screen and was scratching my head...   ;  Just curious but what frame rates are you getting in windowed as opposed to fullscreen and are you using the SDL_DOUBLEBUF flag for your SDL_SetVideoMode? When using SDL w/out OpenGL I was limited to the refresh rate of my monitor in full screen mode but windowed mode didn't wait for vsync. This is probably because it was software and not hardware so the game loop didn't block and wait for the vsync even though the video card only refreshed the screen on the monitors refresh rate.That may be a card specific experience but thought it might help out just in case.edit:Also, are you using SDL_DisplayFormat on your loaded surfaces that are being blitted to the screen? Hardware surfaces are only available to the best of my knowledge in fullscreen mode and if the video surface is in hardware you gain hardware acceleration on many cards with hardware to hardware blits whereas SDL_LoadBMP does no automatic conversions for you in this regard making SDL_DisplayFormat your best friend.   ;  Well, now I am getting in fullscreen the same frame rate as in window. I can't say if there is a small difference though, because I don't measure the fps, I'm capping it at 60. There was a problem I had (which I described in the other thread I made here :D) that slowed it down in fullscreen. And yes I am using double buffer, and DisplayFormat on every surface, especially after I had those crazy artifacts I'm very very careful now :)   