Direct X and Xfree86

John Fortin
Mon Nov 15 08:21:00 GMT 1999

John Fortin wrote:

> I couple of things about DX that I have learned (possibly incorrectly ;).
> *    In full screen mode, the video memory may be cleared when there is a
> contest switch to the windows desktop.  So there has to be a way to refresh the
> screen.  I did this by having a back-buffer in user-memory, which is not
> cleared, and then I blit to the primary buffer when I want to draw.  The DX
> docs. say that writting directly to the primary surface is usually a bad idea.
> *   There are not any 2d drawing primitives in DX.  There may be hardware
> blitting acceleration, but only in video memory.  There may be 3D accel. and
> there are 3d primitives.
> *   To get a pointer to the buffers and guareentee that it is a good pointer,
> you have to lock the surface, do the blit, and unlock.  This is a very expensive
> operation.  DX 6 allows the programmer to define a block of memory as a
> dx-surface, and the pointer to the memory block doesn't change.  Then we don't
> have to do a lock every time, and we can use DX blitting.  DX 3 (i.e WinNT4 does
> not have this capibility ).  We can simulate this by writting our own blit
> function, but I have not done this yet.
> *   Using DX means that the program will be a Windows program, and needs to be
> well behaved with regards to the OS.  It has to handle context-switching
> (alt-tab for instance).  In my implementation, this functionality runs as a
> seperate thread which in created during the library startup.
> John
> Mike MacDonald wrote:
> > I think I don't have the latest X source, the one I seem to have is 6.3...
> >
> > I'm going to go about this, I think, by creating an xf86MapDXMem function.
> > Then I can also look at using mapmem and getio to duplicate what Holger did,
> > and get all the normal accelerated X servers up and running.
> >
> > This way people can choose.  DX will be slow until I get all the xaa
> > primitives updated to use DX acceleration.

More information about the Cygwin-xfree mailing list