Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nefarius/Indicium-Supra
DirectX API-hooking framework
https://github.com/nefarius/Indicium-Supra
api-hooking directx-10 directx-11 directx-9 dll-injection games overlay windows
Last synced: about 1 month ago
JSON representation
DirectX API-hooking framework
- Host: GitHub
- URL: https://github.com/nefarius/Indicium-Supra
- Owner: nefarius
- License: mit
- Created: 2015-12-07T22:39:36.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-07-27T20:42:06.000Z (over 1 year ago)
- Last Synced: 2024-06-20T19:41:23.598Z (6 months ago)
- Topics: api-hooking, directx-10, directx-11, directx-9, dll-injection, games, overlay, windows
- Language: C++
- Homepage:
- Size: 4.29 MB
- Stars: 305
- Watchers: 24
- Forks: 55
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Indicium-Supra
API-Hooking and rendering framework for DirectX-based games.
[![Build status](https://ci.appveyor.com/api/projects/status/rt4ybpwrhn22kegm?svg=true)](https://ci.appveyor.com/project/nefarius/indicium-supra) [![Discord](https://img.shields.io/discord/346756263763378176.svg)](https://discord.nefarius.at) [![Website](https://img.shields.io/website-up-down-green-red/https/docs.nefarius.at.svg?label=docs.nefarius.at)](https://docs.nefarius.at/) [![GitHub followers](https://img.shields.io/github/followers/nefarius.svg?style=social&label=Follow)](https://github.com/nefarius) [![Mastodon Follow](https://img.shields.io/mastodon/follow/109321120351128938?domain=https%3A%2F%2Ffosstodon.org%2F&style=social)](https://fosstodon.org/@Nefarius)
## About
`Indicium-Supra` consists of a self-contained library (DLL) which exposes a minimalistic API for rendering custom content in foreign processes eliminating the need for in-depth knowledge about Direct3D and API-hooking. The most common use-case might be drawing custom overlays on top of your games. The framework takes care about pesky tasks like detecting the DirectX version the game was built for and supports runtime-hooking (no special launcher application required).
## Supported DirectX versions
- DirectX 9.0
- DirectX 9.0 Extended (Vista+)
- DirectX 10
- DirectX 11
- DirectX 12 (implemented but untested)## How to build
### Prerequisites
**Samples are currently broken on this branch due to major API redesign!**
- Visual Studio **2019** ([Community Edition](https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=16) is just fine)
- [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk)
- [Follow the Vcpkg Quick Start](https://github.com/Microsoft/vcpkg#quick-start) and install the following packages:
- `.\vcpkg install spdlog:x86-windows-static spdlog:x64-windows-static detours:x86-windows-static detours:x64-windows-static`
- For the ImGui sample to build you'll also need:
- `.\vcpkg install imgui:x86-windows-static imgui:x64-windows-static`Building should be pretty straight-forward since the dependencies get installed via [Vcpkg](https://github.com/Microsoft/vcpkg). You have multiple choices for getting things done.
### Visual Studio
Just open the solution file `Indicium-Supra.sln` and start the build from there.
### The lazy way
Now if you're really in a hurry you can [grab pre-built binaries from the buildbot](https://buildbot.nefarius.at/builds/Indicium-Supra/master/). Boom, done.
## How to use
Inject the resulting host library (e.g. `Indicium-ImGui.dll`) into the target process first using a DLL injection utility of your choice (you can ofc. [use mine as well](https://github.com/nefarius/Injector)). The following example loads the [imgui sample](samples/Indicium-ImGui):
```PowerShell
.\Injector -i -n hl2.exe Indicium-ImGui.dll
```Just make sure your host library doesn't require any external dependencies not present in the process context or you'll get a `LoadLibrary failed` error.
## Diagnostics
The core library logs its progress and potential errors to the file `%TEMP%\Indicium-Supra.log`.
## Demos
The following screenshots show [imgui](https://github.com/ocornut/imgui) getting rendered in foreign processes using different versions of DirectX.
### DirectX 9
Half-Life 2, 32-Bit
![Half-Life 2](https://thumbs.gfycat.com/AltruisticElectricIberianmole-size_restricted.gif)
### DirectX 9 Ex
Castlevania: Lords of Shadow, 32-Bit
![Castlevania: Lords of Shadow](https://thumbs.gfycat.com/DeafeningSomeKob-size_restricted.gif)
### DirectX 10
Bioshock 2, 32-Bit
![Bioshock2_2017-08-10_14-48-38.png](https://lh3.googleusercontent.com/-oWNHhCbWBLo/WYxWJ0l6qqI/AAAAAAAAAK0/2yTiRcSeH-I-6YUmsGfPimBSti4VobfQgCHMYCw/s0/Bioshock2_2017-08-10_14-48-38.png)
### DirectX 11
Ryse: Son of Rome, 64-Bit
![Ryse_2017-08-09_21-48-57.png](https://lh3.googleusercontent.com/-A1Yj4RE07C4/WYtnLFgGg3I/AAAAAAAAAKk/ZMEfZNAQ670XR4vtRtO0Yy3vN2EXwXKygCHMYCw/s0/Ryse_2017-08-09_21-48-57.png)
Road Redemption, 64-Bit
![RoadRedemptionEarlyAccess_2017-08-14_14-06-21.png](https://lh3.googleusercontent.com/-v2Ao0kCoTvg/WZGSQeniK8I/AAAAAAAAAN0/TXpCVv8pLFoGsuKlwnBRufFuG_ZXaZmRACHMYCw/s0/RoadRedemptionEarlyAccess_2017-08-14_14-06-21.png)
## Sources
- [DX9-Overlay-API](https://github.com/agrippa1994/DX9-Overlay-API)
- [CREATING A RENDER TARGET IN DIRECTX11](http://www.hlsl.co.uk/blog/2014/11/19/creating-a-render-target-in-directx11)
- [ion RE Library](https://github.com/scen/ionlib)
- [C# – SCREEN CAPTURE AND OVERLAYS FOR DIRECT3D 9, 10 AND 11 USING API HOOKS](http://spazzarama.com/2011/03/14/c-screen-capture-and-overlays-for-direct3d-9-10-and-11-using-api-hooks/)
- [HelloD3D12](https://github.com/GPUOpen-LibrariesAndSDKs/HelloD3D12)