chimera icon indicating copy to clipboard operation
chimera copied to clipboard

Remove D3DX dependency; Use Direct2D + DirectWrite instead

Open BinToss opened this issue 4 years ago • 3 comments

This would allow Chimera to run without requiring the DirectX June 2010 redistribution. The D3DX library (including LPD3DXFONT) has been retired and is no longer maintained nor included with the rest of Windows' native DirectX packages.

I recommend looking into DirectWrite + Direct2D and/or DirectXTK SpriteFont as a possible alternative. The latter could be used for gamepad button sprites, too.

D3DX can be found... ...in [src/chimera/output/draw_text.cpp] Line 4: #include <d3dx9.h> ...in [src/monolith/monolith.cmake] Line 15, Column 235: .../libzstd.a -l d3dx9

Links: D3DX retirement Text via DirectWrite + Direct2D DirectXTK

BinToss avatar Sep 05 '20 20:09 BinToss

The d3d9x dependency has not been removed for TTF text support, but not having it no longer blocks the game from loading. (e28c2343f0ad6233c5d0f8d9a745874866f30df2)

When not having d3d9x the game will simply fall back to bitmap text.

Aerocatia avatar Dec 17 '20 08:12 Aerocatia

In the mean time, you can have users install d3d9x with the minimal DXSetup shipped with OpenSauce 4.0 (2015). dxredist.zip

BinToss avatar Apr 13 '21 00:04 BinToss

Arecaidian Fox and I recently tested SPV3 (and OpenSauce by extension) with d3dx9 only present in the game's directory (not "installed" in any way, not present in any system folder, and confirmed via ProcessHacker's Process Modules tab).

Works like a charm. If Chimera is released with d3dx9_43.dll, users won't need to explicitly install it or the DirectX Runtime (June 2010) redist.

BinToss avatar Sep 10 '22 13:09 BinToss