Giter Club home page Giter Club logo

dxgl's Introduction

DXGL 0.5.21

https://dxgl.org

Introduction

DXGL is a free replacement for the Windows ddraw.dll library, running on OpenGL. It is designed to overcome driver bugs, particularly in Windows Vista and newer operating systems. It also adds various enhancements to the graphics output such as display scaling and filtering options. DXGL supports the DirectX 7.0 graphics APIs, however it is currently under development and many programs are not yet compatible with DXGL.

Updgrade notes

DXGL 0.5.8

If you upgrade from DXGL 0.5.8 or earlier, the configuration format will be changed, and earlier versions of DXGL will no longer recognize the profiles. In addition, any profiles generated by older versions of DXGL going forward will not be recognized by DXGL 0.5.9 or later. If you wish to migrate any old profiles generated after installing DXGL 0.5.9 or later, you will need to use Regedit to delete the “Configuration Version” registry value from the HKEY_CURRENT_USER\SOFTWARE\DXGL registry key to force the upgrade to be run again. In order to re-run the upgrade, re-run the DXGL installer.

DXGL 0.5.13

DXGL 0.5.13 fixes up the default value for the “Add color depths” option, because version 0.5.12 and earlier had a default not compatible with current versions. This one-time conversion resets the value for AddColorDepths in the registry entries to 1+4+16 which corresponds to enabling color depths 8-bit, 16-bit, and 32-bit, in order to ensure compatibility with Windows 8 and above.

The “Configuration Version” registry value in HKEY_CURRENT_USER\SOFTWARE\DXGL will be incremented to 2 in order to indicate this fix has been applied.

DXGL 0.5.17

Due to a bug found in the method used to uniquely identify profile paths, DXGL 0.5.17 and above will perform a one-time renaming of the profile registry keys. These new profiles will no longer be compatible with DXGL 0.5.16 or below.

The “Configuration Version” (“Configuration Version x64” for the x64 version) registry value in HKEY_CURRENT_USER\SOFTWARE\DXGL will be incremented to 3 in order to indicate this fix has been applied. If you need to migrate more version 2 profiles, change “Configuration Version” to 2 and re-run the installer.

System Requirements

  • Windows 7 (with SP1) or newer (standard build)
  • Windows XP (with SP3) or newer (legacy build)
    • Also compatible with most versions of Wine, by setting the ddraw DLL override to "native, builtin" which is done automatically at installation.
    • Not compatible with Windows 10 in S mode.
  • OpenGL 2.0 or higher compatible video card
    • Requires support for Framebuffer objects
    • Requires support for hardware accelerated non-power-of-two textures
    • OpenGL 3.2 or higher recommended.
  • The standard build requires a SSE2-capable processor; older processors require the legacy build.
  • For the standard build, Visual C++ 2022 x86 runtime, available at https://aka.ms/vs/17/release/vc_redist.x86.exe (note this link may track visitors) (will be installed if not present)
  • For the legacy build, Visual C++ 2010 x86 runtime, available at https://www.microsoft.com/en-us/download/details.aspx?id=8328 (will be installed if not present)

64-bit Build Notice

The 64-bit build of DXGL is intended solely for targeting 64-bit DirectDraw programs. For usage with 32-bit programs, please download the 32-bit build. The 32- and 64-bit versions of DXGL install in separate folders and Start Menu entries, and have separate profiles. The configuration program will not create profiles for mismatched platforms; you can only add profiles for 64-bit programs in the 64-bit build, and 32-bit programs in the 32-bit build.

Build Requirements

  • For the legacy build, Visual Studio 2010 or Visual C++ 2010 Express Edition with Service Pack 1.
  • For the standard build, Visual Studio 2022 Update 8, Community or higher.
  • The following components are optional. The build process will ask for these if they do not exist:
    • Git (to fill in revision on Git builds)
    • HTML Help Workshop (to build help)
    • NSIS (to build installer, requires Git and HTML Help Workshop to succeed)
  • In addition Visual C++ 2005 and Visual C++ 2008 project files are available in the vs8 and vs9 directories respectively.

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

Debug tracing

The Debug Trace build has been removed from the project files for DXGL. Instead, DXGL now supports debug tracing files in all builds. To enable tracing in DXGL create a file named dxgl.cfg or dxgl.ini in you game folder and add the following to it:

[debug]
DebugTraceLevel=3

This can be added to the [debug] section of any existing configuration file. Change back to 0 to disable tracing.

Progress

For detailed progress information, please check https://www.williamfeely.info/wiki/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 emulated with GLSL shader
  • Packed-pixel YUV surfaces

What partially works:

  • 3D graphics are only partially supported.
  • Overlay support is currently in development and has limited functionality.

What doesn't work:

  • Many functions are stubbed out and return an error

Installation

Run the installer. When the installer completes, open DXGL Config and add your program files to the config program. To uninstall, go to the Add/Remove Programs or Programs and Features control panel and uninstall.

GitHub

Source code for DXGL is available at https://github.com/dxgldotorg/dxgl

AppDB

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

This requires a user account separate from the other services.

Please note that the AppDB is now deprecated and will be made read-only once the new DXGL Wiki launches.

Discussion boards

You may discuss DXGL at: https://forum.dxgl.info

You must create a forum account to post content. For bug reports, please refer to the next section.

Bug reports

Please report bugs via the GitHub Issues system: https://github.com/dxgldotorg/dxgl/issues A GitHub account is required to file issues.

dxgl's People

Contributors

dxgldotorg avatar realmonster avatar yusufkhan-gamedev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dxgl's Issues

DXGL fails to work in Wine 8.0 in a 32-bit WINEPREFIX.

I'm using Wine 8.0 on Void Linux currently on kernel release 6.1.12.

I have no idea how to even debug this, all my 32-bit multilib is setup properly and the regular built in Wine DDRAW functions correctly but when I try to use DXGL this happens all the time now:

libGL error: MESA-LOADER: failed to open iris: libLLVM-12.so: failed to map segment from shared object (search paths /usr/lib32/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris: libLLVM-12.so: failed to map segment from shared object (search paths /usr/lib32/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: libLLVM-12.so: failed to map segment from shared object (search paths /usr/lib32/dri, suffix _dri)
libGL error: failed to load driver: swrast
0024:err:wgl:X11DRV_WineGL_InitOpenglInfo  couldn't initialize OpenGL, expect problems
0024:err:d3d:wined3d_caps_gl_ctx_create Failed to find a suitable pixel format.
0024:err:module:LdrInitializeThunk "ddraw.dll" failed to initialize, aborting
0024:err:module:LdrInitializeThunk Initializing dlls for L"C:\\Program Files\\DXGL\\dxglcfg.exe" failed, status c0000005

Everything was working fine when I had my packages held at Wine 7.0, and nothing I can search for "failed to map segment from shared object" gives me any clues on how to debug this or why this is even happening or why the default built-in DDRAW works but not DXGL.

Vsync tearing in X11

Running Might and Magic VI (without GrayFace's patch) through Wine in X11 session. Enabling vsync limits the framerate, but presentation still heavily tears, roughly around the same place. Enabling compositing eliminates tearing, but that's two vsync mechanisms fighting each other, which leads to stutter and increased latency. Using WineD3D is not an option for me, as it ignores vblank_mode env. var. and doesn't have the ability to scale output. Not sure what other games or demos I could run to check if it's a general issue.

GPU is integrated Intel HD Graphics 630 (Kaby Lake). The monitor is running at 75 Hz, but the problem persists in 60 Hz mode too.

Configuration file:

[display]
ScalingMode=2
FullscreenWindowMode=0
VSync=2
UseSetDisplayConfig=true

[scaling]
ScalingFilter=1

And performance graph, if it's anyhow useful:
Screenshot_20221015_153505

Feature to use PostMessage for mouse

In the game I run SendMessage in glRenderWindow::WndProc for mouse messages doesn't work for some reason. I changed it into PostMessage and it worked. It would be nice to have setting in config or perhaps replace it.

DXGL doesn't prevent screensaver (or screen saver)

OS: Windows 7 SP1
DXGL: 0.5.20
Target software: Nester NES emulator (https://web.archive.org/web/20040717084236/http://nester.dranalli.com/)

I haven't tested with other software as I'm using DXGL explicitly because is the only one that gave me the best results with this OLD directdraw application, and to be precise, the only that prevents this old software to have swap colors (256 colors app) on fullscreen.

I know that that emulator is old, but, isn't DXGL's purpose to run old DD software, after all? ;)

Anyway, it doesn't matter if I use an "exclusive fullscreen" mode, or any other, but after the 5 minutes I have it setup, the screensaver is triggered and not prevented.

I haven't seen any other option that could help.

In my very special case, I don't use the keyboard or mouse with this emulator and the gamepad wrapper (RockFire gameport>USB converter), also, can't be setup to avoid screensaver triggering.

But I guess that is not a concern, as video players, as Media Player Classic, don't have any kind of input and they prevent themselves the trigger of the screensaver, so I guess, and this is my point, maybe it can be done as well on DXGL.

I hope this could be fixed through DXGL, if not, thanks for reading, at least :-)

Mortal Kombat trilogy support

Hello.

I tried to use DXGL as wrapper for the game Mortal kombat trilogy (windows version), but when you try to put the game in fullscreen an error appears and you have to close the game.

I want to make it work too because i want to be able to use reshade to apply graphic filters like 2xsai o xbrz to filter the sprites.

Wine (7.0.1) + Syberia + scale

Apologies if this belongs elsewhere.

I've been able to get DXGL installed and running, however I'm stuck with scaling. I only have one DX7 game on hand to test (Syberia).

I had to disable (and, once finished, re-enable) the ddraw override in wine to run dxglcfg.exe (as per this comment), and added Syberia's game.exe (using defaults to begin with). This placed ddraw in GOG Games/Syberia where I have installed the game as expected.

The correct ddraw is being used (confirmed by WINEDEBUG=+loaddll output).

At first I tried fullscreen modes but Syberia always ran 800x600 regardless of DXGL. This also included emulating a "virtual desktop" under Wine with different resolutions versus not emulating. Aside from not being able to change resolution (note there is no in-game option to do so) the game renders fine - except for an unrelated loss-of-focus issue (see GOG Play Syberia 1 on Linux with wine for workarounds)

To run Syberia in windowed mode - I have to create player.ini with the following (0 is for windowed mode)

800 600 32 0 BaseCMO.cmo

The first two numbers are (known to be) ignored by the game - it will always select 800x600. Furthermore, no DXGL settings made any difference to the size. I tried many, but none made a difference. As an example (of many that did nothing):

[system]
NoWriteRegistry=true
[scaling]
; force 2x scale?
AdjustPrimaryResolution=4
WindowScaleX=2
WindowScaleY=2
[debug]
DebugTraceLevel=3

Upon exit I get an error, but otherwise the game renders fine. My problem is that it is a small 800x600 window.

Attached dxgl.log and the backtrace from the error upon exit (backtrace.txt)

Happy to troubleshoot further if needed.

Contradiction regarding the Wine's OpenGL version

Hey, thanks for writing this great project! I tried using 0.5.20 with Rainbow Six Rogue Spear on latest Wine without success. Basically 2D graphics are rendered (but with issues) and the 3D scene is just a black screen. Then I saw the min. required OpenGL version is 2.0 however this breaks Wine support because Wine's OpenGL version is 1.X. Is Wine intended to be supported on a more than a if-it-runs-it-runs basis?

Regards

Will this ever support DirectX 9, 10, etc..?

Hello!

First of all, I love that this project exists (hopefully it can "compete" against DXVK soon) and the efforts you're putting into it. Now, my main question is: will this project ever support DirectX 9+? And if yes, is there an ETA for that or not?

The reason for that is that my GPU doesn't support Vulkan and I'm on Linux, so I can't play pretty much any game that doesn't natively support OpenGL. And this project only supporting DirectX 7 it seems like, there's not much games that can be played apart from the older ones.

Compatibility with gta_sa.exe needed

The game crashes when I start to run it. Since gta_sa.exe is executed by the '32 bit' architecture, I've used the x86 version of DXGL (ddraw.dll and dxgl.ini). I'd be glad if you can fix it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.