DirectXSwapper is a lightweight DirectX proxy tool for real-time mesh and texture extraction, overlay rendering, and debugging in Direct3D9 games.
It now also includes experimental support for Direct3D12 (64-bit only) with mesh export triggered via the N
key (overlay not yet supported).
Caution
This tool is intended solely for research and educational purposes.
It allows exploration of level geometry not normally visible in-game.
It is not designed for piracy or unauthorized asset distribution.
- [06/08/2025] Added texture export support for Direct3D9 – bound textures can now be saved as
.png
- [06/11/2025] Critical fix: incorrect UV extraction resolved
- [06/11/2025] Added support for
D3DPT_TRIANGLESTRIP
primitive type - [06/27/2025] Added experimental Direct3D12 proxy support for 64-bit games – enabling early mesh extraction and resource logging for D3D12 titles
⚠️ Overlay is not available yet for D3D12.
PressN
during gameplay to export the currently rendered mesh.
- Extract mesh geometry to
.obj
files - Save bound textures as
.png
- In-game overlay using ImGui (D3D9 only)
- Live debug info and mesh filtering
- Minimal performance overhead
- Experimental support for Direct3D12 (64-bit games)
- Build the project
- Copy the proxy DLL (
d3d9.dll
) into the game folder (next to the.exe
or inside thebin/
directory) - Launch the game – a message box should appear confirming injection
- Use the ImGui overlay to control capture
- Press
C
to export the currently rendered mesh - View exported assets in the
Exported/
directory - View exported textures in the
Textures/
directory
- Build the project
- Copy the proxy DLL (
d3d12.dll
) into the game folder (next to the.exe
) - Launch the game – there is currently no overlay
- Press
N
while in-game to export the currently rendered mesh - View exported assets in the
Exported/
directory
- Geometry:
.obj
files are saved toExported/
- Textures:
.png
files are saved toTextures/
- Full support for DirectX10 / 11
- Standalone injector application (no manual DLL copying)
- Export to
.glTF
format - Overlay support for D3D12
This project is designed to be built using Microsoft Visual Studio 2022 not with g++
or command-line compilers.
This repository contains two projects:
d3d9
: Full-featured Direct3D9 proxy (supports overlay, texture export, mesh export)d3d12
: Experimental Direct3D12 proxy (64-bit only, mesh export only)
You can build both projects using Visual Studio 2022.
git clone https://github.com/IlanVinograd/DirectXSwapper.git
cd DirectXSwapper
- Open Visual Studio 2022
- Go to File → Open → Project/Solution...
- Select the solution file:
DirectXSwapper/DirectXSwapper.sln
- Visual Studio will load the two subprojects:
d3d9
d3d12
At the top of Visual Studio:
- Configuration: Choose
Release
(recommended) notDebug
- Platform:
- For
d3d9
: choose eitherWin32
orWin64
- For
d3d12
: choose onlyx64
(32-bit is not supported)
- For
Use the menu:
Build → Build Solution
After building, the compiled DLLs will be found in the data
folder inside the repository:
-
32-bit (
x32
) build:DirectXSwapper\data\d3d9.dll
-
64-bit (
x64
) build:DirectXSwapper\data\x64\d3d9.dll DirectXSwapper\data\x64\d3d12.dll
Note:
d3d9
supports both 32-bit and 64-bit buildsd3d12
supports 64-bit only
Copy the compiled DLL (d3d9.dll
or d3d12.dll
) into the game folder next to the game’s .exe
file:
C:\Games\SomeGame\ → paste the DLL here
This project also includes support for Premake5, which can be used to regenerate the Visual Studio solution and project files from premake5.lua
.
- Make sure you have
premake5.exe
in the project root. - Run the following in Command Prompt:
premake5.exe vs2022
This will generate the Visual Studio 2022 .sln
and .vcxproj
files under the build/
directory.
You can now open build/DirectXSwapper.sln
and build it as described above.
⚠️ You do not need to run Premake if you're using the provided.sln
in the root folder it's already generated.
Premake is useful only if you're modifying the project structure or adding new files and want to regenerate project files automatically.
Special thanks to Elisha Riedlinger for foundational work and architectural references used in this project.