[SDL] Porting SDL to new hardware
Brian Gunn
libsdl-gmane at gunnbr.org
Tue May 1 18:54:10 PDT 2007
Ryan C. Gordon <icculus <at> icculus.org> writes:
> you might find it's easier to write a Linux fbcon driver and
> not make changes to SDL at all.
That's an interesting thought. I'll take a look at that!
> that surface's "pixels" field will be the framebuffer the app writes
> pixel data to
Okay, so does the pixels field need to be always accessible? I thought
it only had to be valid between a LockHWSurface() and UnlockHWSurface().
The way I've got my driver implemented right now, pixels of the main
surface is normally NULL and in LockHWSurface(), I map the HW video memory
to application memory and set pixels to that. Then the app can write directly
to video memory and call UnlockHWSurface(). (I had intended my driver to be
used for a double buffered display, so the app would actually be writting to
the display surface that's not currently visible.) Is that not the correct
implementation? Using that model, I didn't understand what UpdateRects() did.
I could switch it so that I allocate another frame buffer that would allow me to
use the HW blit to copy data to the visible display buffer.
Thank you again for your help!
Brian
More information about the SDL
mailing list