[SDL] SDL and the framebuffer

Steve B rshadow at linuxquestions.net
Wed Jan 26 03:35:01 PST 2005


On Tue, 2005-01-11 at 22:28 -0800, Sam Lantinga wrote:
> > I would add something: 
> > I'm one of the devs of the bzflag.
> > I recently added SDL to the game, as the game is multiplatform.
> > Another the dev used to play with direct-color 8 bit, as it was
> > supported on the game before SDL adding.
> > Analyzing the problem we found that SDL_pixel.c need to be patched with
> > some lines of code, not handling our particular configuration. 
> > We are now releasing really soon, and we would like those patch, or
> > something else that fixes it, to be applied, in a way that we could in
> > the future, eventually discard the old files.
> 
> I've been hesitant to apply this patch, since I don't have access to a
> direct-color 8 bit display, and I know that SDL always assumes 1 byte per
> pixel to be a palettized mode for blitting purposes.

Sam, the default palette that SDL creates for 8 bit surfaces is a 3-3-2
palette. But, the mask, shift, and loss values are all set for a single
8 bit value with no RGB fields. I think that means that the SDL blit
code will do the right thing most of the time. 

			Bob Pendleton

> 
> Does the patch as written address your needs?
> 
> See ya!
> 	-Sam Lantinga, Software Engineer, Blizzard Entertainment
> 
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
> 





More information about the SDL mailing list