PhantomRender.ImGui 0.1.0-preview.2

This is a prerelease version of PhantomRender.ImGui.
dotnet add package PhantomRender.ImGui --version 0.1.0-preview.2
                    
NuGet\Install-Package PhantomRender.ImGui -Version 0.1.0-preview.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PhantomRender.ImGui" Version="0.1.0-preview.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PhantomRender.ImGui" Version="0.1.0-preview.2" />
                    
Directory.Packages.props
<PackageReference Include="PhantomRender.ImGui" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PhantomRender.ImGui --version 0.1.0-preview.2
                    
#r "nuget: PhantomRender.ImGui, 0.1.0-preview.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PhantomRender.ImGui@0.1.0-preview.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PhantomRender.ImGui&version=0.1.0-preview.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=PhantomRender.ImGui&version=0.1.0-preview.2&prerelease
                    
Install as a Cake Tool

<h1 align="center">PhantomRender</h1> <p align="center"> <a href="./LICENSE"> <img src="https://img.shields.io/badge/license-MIT-green.svg?style=flat-square" alt="license"/> </a> <img src="https://img.shields.io/badge/platform-Windows-0078D7.svg?style=flat-square" alt="platform"/> <img src="https://img.shields.io/badge/framework-net48%20%7C%20net9.0-512BD4.svg?style=flat-square" alt="frameworks"/> <img src="https://img.shields.io/badge/arch-x86%20%7C%20x64-555555.svg?style=flat-square" alt="arch"/> </p> <p align="center"> Universal graphics hook + ImGui injected runtime for Windows games and applications. </p> <p align="center"> Includes two host variants: a modern NativeAOT host on .NET 9 and a managed host on .NET Framework 4.8. </p> <p align="center"> <a href="https://github.com/DestroyerDarkNess/PhantomRender/releases/download/0.1.0-preview.1--Vsix-0.1.12/PhantomRender.Templates.Vsix.vsix">Download Visual Studio Templates (.vsix)</a> </p> <p align="center"> <a href="./Games.md">Games Tested Gallery</a> · <a href="./KNOWN_ISSUES.md">Known Issues</a> </p>

Table of Contents

Project Structure

Project Description
src/PhantomRender Core hooks and low-level graphics/input interop.
src/PhantomRender.ImGui Overlay host and ImGui renderer layer for DX9/DX10/DX11/DX12/OpenGL/Vulkan.
src/PhantomRender.ImGui.Native NativeAOT injected host, dependency loader, logging, and default sample UI.
src/PhantomRender.ImGui.NetFramework Managed .NET Framework 4.8 host with classic Program.Main(...) debug entrypoint and dllmain.EntryPoint() injection entrypoint.

Graphics Support

API Status Notes
DirectX 9 ✅ Supported Present and EndScene modes are implemented.
DirectX 10 ✅ Supported DXGI IDXGISwapChain::Present path.
DirectX 11 ✅ Supported Stable resize path, owner-thread filtering, and Unity compatibility mode.
DirectX 12 ✅ Supported Queue capture path with Unity compatibility mode; still validate per title.
OpenGL ✅ Supported wglSwapBuffers hook path with target/context reinit on change.
Vulkan 🚧 In Progress Backend is still under construction and is not considered working yet.

Build And Publish

Requirements

  • Windows
  • .NET 9 SDK
  • Visual Studio 2022 or compatible MSVC build tools for NativeAOT publish

NativeAOT host (.NET 9)

Debug build

dotnet build src/PhantomRender.ImGui.Native/PhantomRender.ImGui.Native.csproj -c Debug -p:AutoPublishOnBuild=false

Release publish

dotnet publish src/PhantomRender.ImGui.Native/PhantomRender.ImGui.Native.csproj -c Release -r win-x64 -p:SkipAutoPublish=true

Published output

The default injected payload is produced at:

src/PhantomRender.ImGui.Native/bin/Release/net9.0/win-x64/publish/

That folder contains:

  • PhantomRender.ImGui.Native.dll
  • cimgui.dll
  • ImGuiImpl.dll

Managed host (.NET Framework 4.8)

Video walkthrough:

https://github.com/user-attachments/assets/0d236a89-ae5d-497b-9958-e1ade56f4f0c

This host is the .NET Framework 4.8 equivalent of PhantomRender.ImGui.Native.

Debug as a normal console app
dotnet build src/PhantomRender.ImGui.NetFramework/PhantomRender.ImGui.NetFramework.csproj -c Debug
  • Program.Main(...) is the classic console/debug entrypoint.
  • dllmain.EntryPoint() is the managed injection entrypoint.
  • Standard debug output goes to src/PhantomRender.ImGui.NetFramework/bin/<arch>/Debug/net48/.
Build the injectable DLL

Use one of the batch files in src/:

  • src/publish-netfx-x64.bat for x64 targets
  • src/publish-netfx-x86.bat for x86 targets

Each script:

  • builds PhantomRender.ImGui.NetFramework in Release as Library
  • asks for the path to Hydra.exe
  • uses the preset PhantomRender.ImGui.NetFramework.json
  • runs Hydra in console mode against PhantomRender.ImGui.NetFramework.dll

Expected release output:

src/PhantomRender.ImGui.NetFramework/bin/<arch>/Release/net48/

That folder should contain at least:

  • PhantomRender.ImGui.NetFramework.dll
  • cimgui.dll
  • ImGuiImpl.dll

Debug And Test

Debug the ImGui menu directly

To test or debug the ImGui menu itself, run PhantomRender.ImGui.Native as a normal console app in Visual Studio using the standard Debug configuration.

This is the fastest way to:

  • verify that the sample menu opens
  • test UI changes
  • debug overlay logic without injection

If you want the classic managed path instead, run PhantomRender.ImGui.NetFramework as a console app and use its Program.Main(...) entrypoint.

Build the injectable DLL

To test the injectable NativeAOT DLL, use one of the batch files in src/:

  • src/publish-x64.bat for x64 games
  • src/publish-x86.bat for x86 games

Each script publishes the injectable DLL and its native dependencies to the corresponding publish folder.

For the managed .NET Framework 4.8 host, use:

  • src/publish-netfx-x64.bat
  • src/publish-netfx-x86.bat

Injection Quick Start

  1. Inject PhantomRender.ImGui.Native.dll into the target game process.
  2. Use Insert to show or hide the sample UI.
  3. Use Delete to request overlay shutdown.

Diagnostics

On startup, the native host redirects console output to:

<publish folder>/PhantomRender.Native.log

Debugging a game crash

If the game crashes after injection, use this workflow:

  1. Open Visual Studio.
  2. Launch the game normally.
  3. In Visual Studio, open Debug > Attach to Process....
  4. Find the game process in the list and select it.
  5. Press Attach.
  6. Inject PhantomRender.ImGui.Native.dll.
  7. Wait for the crash.
  8. Copy the Visual Studio error message.
  9. Open the Call Stack window and copy the call stack shown by Visual Studio.
  10. Collect PhantomRender.Native.log from the same folder as the injected DLL.
  11. Open an issue and include all three: the error message, the call stack, and the log.

Known Issues

See KNOWN_ISSUES.md.

Future Work

  • Expand compatibility coverage across more tested titles.
  • Finish the Vulkan backend and make it usable across real titles.
  • Add dedicated samples for custom overlay UIs and integrations.

License

PhantomRender is licensed under the MIT License. See LICENSE.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.2 47 4/4/2026
0.1.0-preview.1 53 4/2/2026