   SDL frame rate problem in fullscreen
  Hello.I made a simple program in C using SDL and I have a problem. The drawing speed is very very slow when in fullscreen and I can't figure out why. When initializing the screen without SDL_FULLSCREEN, in window it all happens very very fast, just as it should, I guess.I have a frame rate limit at 60 and in every cycle there is only a surface being blitted all over the screen plus a small rectangle filled somewhere.Thing is, the resolution is a mere 320 x 240 so this makes it even more frustrating! If I blit it with transparency it gets worse... I have only a couple of frames per second anyway...Any ideas why?   
  try upping that resolution 640x480, because SDL hardware accelerates on some platforms, and 320x240 is not a valid fullscreen resolution, so it is creating a minimum of a 640x480 fullscreen mode, and upsampling your blitted image (probably in software), which will slow things down alot.   ;  You also might want to try a resolution of 800x600.  If that dosen't work, then post your code.  There are some other things I herd that you might have to change in SDL in Full Screen Mode.So try that and reply.Chad.;  I tried 640, 800 and 1024. It gets progressively slower to draw up until about just one frame per second at 1024.Forgot to mention, I'm using Dev-C++ on Windows 2000, latest DX and a GeForce3 Ti 200 running Doom 3 pretty smoothly :) so this slowdown in fullscreen is a little absurd...I tried all possible combinations of hardware/software screen, with and without double buffer but it still does that...   ;  Could you post some code?   ;  Sure but it's nothing fancy.this is in main:dpa_startup();SDL_SetColorKey( cursor_main, SDL_SRCCOLORKEY, SDL_MapRGB( screen->format, 255, 255, 255 ) );image = SDL_LoadBMP( "test.bmp" );camera.x = camera.y = 0;if (image->w > canvas.w) camera.w = canvas.w; else camera.w = image->w;if (image->h > canvas.h) camera.h = canvas.h; else camera.h = image->h;/* game loop */loop_done = FALSE;ticks_old = SDL_GetTicks();while (loop_done == FALSE){   SDL_FillRect( screen, NULL, 0 );   draw_interface();   SDL_BlitSurface( image, &camera, screen, &canvas );   SDL_GetMouseState( &mousex, &mousey );   mouse.x = mousex; mouse.y = mousey;   SDL_BlitSurface( cursor_main, NULL, screen, &mouse );   SDL_Flip( screen );   /* handle events */   /* regulate frame rate */   do   { SDL_Delay( 1 ); ticks = SDL_GetTicks();   }   while (1000/(ticks-ticks_old) > TARGET_FPS);   ticks_old = ticks;} /* end: game loop */and this is in dpa_startup():/* init video */if (SDL_Init( SDL_INIT_VIDEO| SDL_INIT_TIMER ) < 0) return 1;atexit( SDL_Quit );SDL_ShowCursor( SDL_DISABLE );/* switch resolution */SDL_WM_SetCaption( "myapp", NULL );screen = SDL_SetVideoMode( RESX, RESY, 32,  SDL_SWSURFACE| SDL_DOUBLEBUF| SDL_FULLSCREEN );if (screen == NULL) return 2;with some more irrelevant stuff eliminated here, like variable definitions and such.I'm not sure there is a problem in my code, since running the app windowed works much much faster.   ;  The SDL_DOUBLEBUF flag is incompatible with SDL_SW_SURFACE (Link) Try disabling that.   ;  Oh thanks, I left it that way after I (as I mentioned earlier) tried all possible combinations of flags :)I switched back to HW_SURFACE. Same problem.Hmmm I was wondering... I *AM* also blitting an image with color key directly on the screen which is in harware. I did read that accessing video memory is a big slowdown so that's why I avoided reading from the screen surface.But does blitting with alpha directly on screen fall in the category of operations that involve reading from video memory?If so, I should be doing everything in a screen's identical copy then blit the copy onto the screen every frame, right? I'll try that.   ;  all alpha blending in SDL is done in software.you need to use a specialised API like openGL to have any chance of doing it in hardware.i prefer to keep all my surfaces as software, as mixing the 2 doesnt help. either all hardware or all software.   ;  If you don't "regulate frame rate", do you still have problems?   