DXGL
Introduction
DXGL is a project to create a DirectDraw/Direct3D version 1 to 7 implementation that runs on OpenGL 2.0. It is intended to alleviate some of the graphics glitches inherent with using legacy DirectX interfaces on modern video cards. The API will be 100% binary compatible with the system ddraw.dll file.
DXGL is currently in a pre-alpha stage and very little works at this point.
System Requirements
- Windows operating system (currently XP or above)
- OpenGL 2.0 or higher compatible video card, with hardware accelerated non-power-of-two size textures
- OpenGL 3.0 or higher compatible video card for 8-bit modes.
- Visual C++ 2010 x86 runtime, available at http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84
Build Requirements
- Visual Studio 2010 or Visual C++ 2010 Express
- Latest version of Windows SDK may be required
These instructions assume that you do not have any of the required software installed. If you already have any or all of this software installed and set up, skip those steps.
- Install Visual C++ 2010 Express at http://www.microsoft.com/express/downloads/#2010-Visual-CPP .
- Install the Windows SDK at http://www.microsoft.com/downloads/en/details.aspx?familyid=6b6c21d2-2006-4afa-9702-529fa782d63b .
- Warning: If you have installed Visual Studio 2010 SP1, install the Windows SDK update at http://www.microsoft.com/downloads/en/details.aspx?FamilyID=689655B4-C55D-4F9B-9665-2C547E637B70 .
- Open the dxgl.sln file, select your build configuration (Debug or Release) in the toolbar, and press F5.
Progress
See DXGL Features
What works:
- DirectDraw object creation and destruction (versions 1 to 7)
- Display mode enumeration and switching (with emulated mode switching)
- Fullscreen and windowed modes.
- Basic Blt() functionality
- 8-bit color on OpenGL 3.0+ graphics cards
What partially works:
- SetCooperativeLevel (destroys the GL context if switching between windowed and fullscreen modes)
What doesn't work:
- Most functions are stubbed out and return an error
- No 3D graphics support
Roadmap
These are goals to be set for future releases.
Items marked (done) have been completed in a SVN build.
- Version 0.1.0 Alpha
- Implement per-application settings
- Create installer
- Create help file
- Fix memory leaks
Screenshots and videos
The test application for DXGL. Currently only one test is available but more will be added when this test passes. The second screenshot is of the config program.
The first image is of the direct access/page flipping test in windowed mode, 8-bit color. This is the `reference` shot taken with the system's ddraw.dll. Colors depend on the current system palette. The second image is of the same program rendered in DXGL in fullscreen. The colors are rendered using GLSL, with a luminance texture for the image and a 256x1 BGRA texture for the color palette. The black bars are because the screen was set to 720x480 but DXGL was set to 640x480, using aspect corrected scaling instead of mode switching.
DXGLTest displaying color patterns in windowed mode; Gradient bar test in 32-bit color
{{#ev:youtube|qUPH0UyxCdw|320}}
Videos of test runs of dxgltest. The first test currently includes a palette screen and a gradient test. The gradients look ugly in 256 color mode because the routine does not support dithering.
Downloads
All downloads are subject to the GNU Lesser General Public License, version 2.1. To test, unzip and run dxgltest.exe. Press esc to exit a test.
| Version | Source | Binary | Notes |
|---|---|---|---|
| 0.0.7 | Add DirectDrawEnumerate. Add color fill and colorkey blt(). Fix flipping. Add compatibility with Windows 8. | ||
| 0.0.6 | Speed up surface locking. Fix non-multiple-of-8 modes. | ||
| 0.0.5 | Add GetDC() GDI surface access. Add more tests to DXGLTest. | ||
| 0.0.4 | Add all DDraw interfaces, add 15 and 24 bit modes, add low-res modes, fix memory leaks. | ||
| 0.0.3 | Remove wxWidgets and GLEW, fix duplicate mode enumeration, multiple fixes. | ||
| 0.0.2 | Add windowed mode. | ||
| 0.0.1 | Initial release. Only direct access to primary surface. |
SVN
The SVN repository is currently down.
AppDB
The AppDB is currently down.
Discussion boards
The discussion boards are currently down.
Bug reports
The Bugzilla is currenly down.
