From www.williamfeely.info
Jump to: navigation, search


DXGL is a project to create a DirectDraw/Direct3D version 1 to 7 implementation that runs on OpenGL. 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 an alpha stage, but several applications and games already work.

System Requirements

  • Windows XP (with SP3), Vista, 7, 8, 8.1, or 10 (Also works with recent versions of Wine)
  • OpenGL 2.0 or higher compatible video card, with hardware accelerated non-power-of-two size textures
    • OpenGL 3.2 or higher recommended.
  • Visual C++ 2013 x86 runtime, available at https://www.microsoft.com/en-us/download/details.aspx?id=40784 (will be installed if not present)

Build Requirements

  • Visual Studio 2013 (The free Community edition works for this)
  • The following components are optional. The build process will ask for these if they do not exist:
    • TortoiseSVN (to fill in revision on SVN builds)
    • HTML Help Workshop (to build help)
    • NSIS (to build installer, requires TortoiseSVN and HTML Help Workshop to succeed, only 2.46 tested so far)

Build Instructions

Old instructions; view above video for step by step instructions:
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.


See DXGL Features for detailed information.

See DXGL Changelog for release information and previous version downloads.

Also see DXGL Test Results.

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 emulated with GLSL shader

What partially works:

  • 3D graphics are only partially supported.

What doesn't work:

  • Many functions are stubbed out and return an error


These are goals to be set for future releases. This is completely subject to change at any time.

  • 0.5.8
Upgrade compilers to Visual C++ 2013: 100% complete
Isolate API from backend threads: 50% complete
  • 0.5.9
Add depth buffer fill: 90% complete
Rework D3DTLVERTEX rendering: 50% complete
Support `Adjust primary resolution` on Direct3D: 50% complete
Optimize shader cache: 15% complete
Group renderer commands into batches: 0% complete
Add framerate limiter: 0% complete
Improve fog support: 0% complete
  • 0.5.x
Add mipmap surfaces: 95% complete
Support D3D2 textures: 95% complete
Fix reference counts: 90% complete
Implement D3D execute buffers: 75% complete
Add software T&L for execute buffers: 50% complete
Fix resource leaks: 25% complete
Create new/better DXGLCFG application: 15% complete
Add client memory surfaces: 10% complete
Add multisampling: 0% complete
Precompile generated shaders used in previous sessions: 0% complete
Fix 16-bit 565 surfaces on ATI Radeon X300 series: 0% complete
Fix clippers on NVIDIA GeForce 6 series GPU: 0% complete
Fix 8-bit color with Mesa software renderer: 0% complete
  • 0.5.x or 0.6.0
Support optional INI files for configuration: 0% complete
Optionally delete user settings on uninstall: 0% complete
Add DXGL loader stub to fix programs that demand ddraw.dll from system32: 0% complete
  • Future
Support multiple DirectDraw drivers per process: 75% complete
Validate DDraw parameters: 75% complete
Support surface color depths: 75% complete
Support NULL HWND: 25% complete
Implement and improve API functions: 25% complete
Convert from C++ to C: 20% complete
Add Code::Blocks projects: 10% complete
Support GCC/MinGW compilation: 5% complete
Create Doxygen documentation: 5% complete
Support PBO texture transfer: 0% complete
Add optimized texture color conversion: 0% complete
Support palette fading without updating primary: 0% complete
Advanced VSync support: 0% complete
Hook GetCursorPos/SetCursorPos/ClipCursor/GetClipCursor/GetCursorInfo: 0% complete
Hook GDI palette function: 0% complete

Screenshots and videos

Note: These are old screenshots and videos. DXGL is now capable of running several games.

DXGLTestAppMain1.png DXGLCfg.png

The first screenshot is of the test application for DXGL. The second screenshot is of the config program.

DXGLTest1 ddraw.png DXGLTest1 dxgl001 0.png

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.

DXGLTest1 dxgl002.png DXGLTest1 dxgl003.png

DXGLTest displaying color patterns in windowed mode; Gradient bar test in 32-bit color

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.


These downloads are subject to the GNU Lesser General Public License, version 2.1. To install, simply run the Windows installer. To upgrade, install over the old version. All programs configured by the configuration tool will be automatically updated.

The current available version of DXGL is 0.5.7. Please click one of the links below to download.

Windows installer

Source code

Please see All DXGL Downloads for older versions.


SVN readonly access is available at:


There is a Mediawiki-based SVN log at:



An AppDB system (similar to that on winehq.org) is now available at:


This requires a user account separate from the other services.

Discussion boards

You may discuss DXGL at:


You must create a forum account to post content.

Bug reports

Bug reports are managed by a Bugzilla system available at:


A user account needs to be created at this site to post bug reports.

Current bugs:

IDPStatusSeverityVersionSummary (36 tasks)  
24HighCONFIRMEDmajor0.5.1completely breaks Fable 
28LowCONFIRMEDenhancement0.5.1"Rubber band" selection box doesn't draw in the right place in Settlers 4[DXGL]
3NormalCONFIRMEDnormal0.5.0Starlancer colours and textures are a great big mess[DXGL]
4NormalCONFIRMEDnormal0.3.2Pharaoh's main menu screen is black 
8NormalCONFIRMEDnormalSVNWorms Armageddon (And likely 2 and World Party) Intro sprite corruption and frozen main menu 
29NormalCONFIRMEDnormalSVNStar Wars Ep.1 Racer won't start[DXGL]
37NormalCONFIRMEDnormal0.5.6Cave Story Engine Modification - GFX corruption/large bars of color[DXGL]
44NormalCONFIRMEDnormalSVNRight mouse click + hold not working the expected way in The Settlers 3[DXGL]
47NormalCONFIRMEDenhancement0.5.7[Feature request] Integer-factor scaling[DXGL]
1NormalUNCONFIRMEDnormalSVNDouble Clicking is handled as multiple single clicks 
2NormalUNCONFIRMEDnormal0.3.1Age of Empires 1 + Rise of Rome crash when switching resolution (to play back ingame video's) 
5NormalUNCONFIRMEDnormalSVNmouse cursor not visible in age of empires 1 and 2 during a match / campaign mission 
6NormalUNCONFIRMEDnormalSVNAge of Empires 1 and 2 video's are blackscreen with audio 
9NormalUNCONFIRMEDnormal0.4.0Rollercoaster Tycoon Deluxe Crashes 
10NormalUNCONFIRMEDnormal0.4.0Aspect Corrected Stretch On starcraft Brood War causes the mouse to be stuck in the top left 
11NormalUNCONFIRMEDnormal0.4.0Diablo 2 Won't Launch With DXGL 
12NormalUNCONFIRMEDnormal0.4.0Diablo 1 Won't Return resolution under some circumstances 
13NormalUNCONFIRMEDnormal0.4.0Mouse Buggy in Diablo 1 with Aspect Corrected Stretch 
14NormalUNCONFIRMEDnormal0.4.0Can't Get Past Caesar III Title Screen 
16NormalUNCONFIRMEDnormal0.5.0Command & Conquer: Red Alert 2 menu buttons not appearing 
18NormalUNCONFIRMEDnormal0.5.0Mouse buttons do nothing - King's Quest: Mask of Eternity 
19NormalUNCONFIRMEDnormalSVNBattle.net Display issues in Storm engine games (Starcraft, WC2, Diablo) 
20NormalUNCONFIRMEDnormal0.5.0Necrodome mouse locked[DXGL]
21NormalUNCONFIRMEDnormal0.5.0MageSlayer & Take no Prisoners[DXGL]
25NormalUNCONFIRMEDnormal0.5.1Blair Witch Volume 2: The Legend of Coffin Rock 
26NormalUNCONFIRMEDnormal0.5.1Left mouse click not working in Settlers 4 missions[DXGL]
30NormalUNCONFIRMEDnormalSVNScreenshot corrupted in Settlers 4 
31NormalUNCONFIRMEDnormalSVNPeriodic graphics corruption/freezing in Settlers 4[DXGL]
33NormalUNCONFIRMEDnormal0.5.5Metal Fatigue: Black Screen in game[DXGL]
35NormalUNCONFIRMEDblocker0.5.6DXGL - incorrect opengl support detected[DXGL]
36NormalUNCONFIRMEDnormal0.5.6Cave Story - Obscure GFX issue[DXGL]
43NormalUNCONFIRMEDnormal0.5.7Tony Hawk's Pro Skater 2 doesn't launch with DXGL[DXGL]
45NormalUNCONFIRMEDnormal0.5.7"Balls of Steel" vsync issues 
46NormalUNCONFIRMEDnormal0.5.7Blair Witch Volume 2: The Legend of Coffin Rock 
48NormalUNCONFIRMEDmajor0.5.7Parts of the HUD on Metal Gear Solid 1 PC are invisible