Mike MacDonald mmacdona@tsi.gte.com
Mon Nov 15 08:49:00 GMT 1999

Hmm, well, I've talked to alot of people who basically use DX to get a
surface, then use ASM routines to to their blitting..  Esp from System to
video ram..  I didn't know about the 2d drawing primitives.  I thought they
were a part of Direct Draw, but I haven't gotten into that very far.   Worst
case scenario, I have some good quick asm routines for most of those
primitives.  I have to assume that the straight vga256 primitives are
unaccelerated and pretty fast too.   I would be nice though to use some of
the hardware accelerations features on different cards through DX..   I'm
going to try and get the accel servers up and running too..

-----Original Message-----
From: John Fortin [ mailto:fortinj@ibm.net ]
Sent: Monday, November 15, 1999 11:07 AM
To: Mike MacDonald
Subject: Re: X

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
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

*   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
you have to lock the surface, do the blit, and unlock.  This is a very
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
have to do a lock every time, and we can use DX blitting.  DX 3 (i.e WinNT4
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
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.


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
> 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