[SDL] optimizations without hardware acceleration

Chris Thielen chris at luethy.net
Sun Oct 6 21:43:01 PDT 2002


Alright. But if I'm running on a 32bpp X server, obviously an SDL
windowed app would run best at 32bpp, but if I request 16bpp fullscreen,
and I get it, 16bpp would be fastest, correct?

-- chris (chris at luethy.net)

On Sat, 2002-10-05 at 20:19, Bob Pendleton wrote:
> Chris Thielen wrote:
> > i just have a quick question about getting my sdl application to run as
> > fast as possible without hardware acceleration. should i run my
> > application in whatever bpp the user already has their computer in? like
> > if i'm running x11 at 32bpp, i shouldnt run my sdl app as a 16bpp
> > window, but as a 32bpp window, for more speed, right?
> > 
> > also, at least under x11, if you go fullscreen, does it change the bpp?
> > i run my x session at 1280x1024x32, but if i run my sdl app at
> > 800x600x16, will i still be doing 16->32bpp conversions, or does x11
> > switch into the correct video mode? (i assume x11 and win32 act the same
> > way with windowed/fullscreen bpp conversions)
> > 
> > thanks, just wondering if somebody could clear that up, thanks.
> 
> Using SDL_SetVideoMode() you can try to set any screen size and depth 
> that you want. But, there is no guarantee that you will get what you ask 
> for... That means that you always have to be ready to accept what ever 
> video modes are available. So, yes, you should be ready to deal with any 
> video mode and you should adapt your graphics code to work in the same 
> format as the video mode you got. The cost of converting each pixel you 
> draw to another format can be much greater than the cost of drawing the 
> pixels in the first place.
> 
> So the rules are:
> 1) ask for what you prefer
> 2) live with what you got
> 3) work with what you have
> 
> It is a good idea to convert all your art to work with the format you 
> have to. Spending the time converting the art when you load it will save 
> rendering time and can save memory. It is actually a good idea to 
> convert the art work to several forms and just inculde all the forms of 
> the art in your game. That way you can just use the pre-converted art 
> and not have to pay the cost of converting it when you load it.
> 
> 		Bob Pendleton
> 
> > 
> > -- chris (chris at luethy.net)
> > 
> > 
> > _______________________________________________
> > SDL mailing list
> > SDL at libsdl.org
> > http://www.libsdl.org/mailman/listinfo/sdl
> > 
> 
> 
> -- 
> +------------------------------------+
> + Bob Pendleton, consultant for hire +
> + Resume: http://www.jump.net/~bobp  +
> + Email:  bob at pendleton.com          +
> +------------------------------------+
> 
> 
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
> 






More information about the SDL mailing list