DXGL

Discuss anything not covered by any of the other categories.
Post Reply
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

DXGL

Post by leileilol »

http://www.williamfeely.info/wiki/DXGL

Anyone used it for certain DirectX games? (particularily 8bpp games of the DX2-6 era)
It works well with Quake2 (in Software mode that is). It's so nice playing in 320x240 again, upscaled to 1920x1080 with proper 4:3 aspect.
i should not be here
r00k
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: DXGL

Post by r00k »

Im confused why not just use Ogl, Q2 does.
I mean, its a Dx -> Opengl2.0 (wrapper?) to fix legacy issues. How would this encompass software mode? or did it not read enough about it.... :(


U should just dig out a p2-333 machine and run software Quake there. If u really wanna be nuts about legacy, play it at 30 fps like back in 1996...


reminds me to try Quake again on my ibm ps/2 as JC said it would run fine on a S3 integrated chip
need to test these various sw quake engines! gives me an excuse to bring my ibm outta the basement...



Nice Find Leileilo..
mh
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: DXGL

Post by mh »

Software mode Q1 and Q2 can use DirectDraw surfaces for their backbuffers. With DirectDraw support falling off, this is useful functionality to have, but at the same time both engines also had a GDI surfaces option which was also adequately fast.

It needs to be noted that in both cases neither engine used DirectDraw or GDI in the traditional manner. Instead they would create one surface at startup, and a typical frame would consist of Locking the surface, then running the absolutely standard software rendering codepath, writing to the surface memory instead of to system memory. That avoids the performance problems normally associated with using GDI, but may cause performance problems with DirectDraw if anything needs to read from Locked surface memory.

For Q1 and Q2, particularly as we have the source code for both, it would be of greater benefit to just port the DirectDraw code to D3D8 or 9, both of which encompass the DirectDraw functionality required, in addition to more standard 3D rendering. So the code would create a D3D8 or 9 device with a lockable backbuffer, Lock that and write to it instead.

For other games where we don't have source code and where they use DirectDraw, something like this is appropriate. I would have personally implemented it on D3D9 rather than GL2 though, for more robust driver support.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: DXGL

Post by Spike »

that webpage explicitly mentions wine, which may be why they avoid d3d - for greater porability. either way, d3d9 is outdated, and d3d11 doesn't work on half the winapi systems out there (ie: xp+older+wine). though its not like you can depend upon gl2 drivers either, especially with windows update's video drivers.
Post Reply