This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: DirectDraw vs. GDI Device Independent Bitmaps for shadow fb server (and other development news)


>This may be a silly question: but what about a no-framebuffer server?
>GDI straight into a window? (And let the graphics card accelerate as
>much as possible..?)

That is not a silly question.  I originally set out to implement a GDI based
non-framebuffer server; currently I have code that draws the familiar X
background upon startup, but it does little else; that code has been in each
of the Shadow FB test releases.

Implementing a native X Server is not simple task, there are lots of
functions to implement and each function has to be correct else you get
garbled output and maybe even crashes.

When originally implementing the GDI server I used lots of dirty tricks,
like hard coding pixel values when drawing lines of certain types, using
global variables for device contexts, etc., as I had no idea if the visual
format I had chosen was correct and I had no idea how to use screen
privates; I also had no idea what pixel values in X corresponded to which
colors in Windows.  I needed to get the visual formats, color mapping, and
parameter passing correct before I went any further.  The easiest way to set
the correct visual formats, color mapping, and parameter passing was to
implement a shadow framebuffer based server using the GDI blitter and frob
the visual formats until the colors displayed correctly :)

In essence, I have been building the foundation for a GDI based server.

I will go back to coding the GDI based non-framebuffer server once I am
satisfied that the shadow framebuffer and primary framebuffer servers are
stable.  I believe that I now know enough to correctly implement a GDI based
server.

Good question, keep them coming,

Harold Hunt


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]