Universal graphical hook for Windows apps, although it should work on Linux too if you implement it correctly, that will display an ImGui Demo Window as an example.
- DX9 + DX9Ex
- DX10
- DX11
- DX12
- OpenGL
- Vulkan
Prerequisite:
- Visual Studio 2022
- premake5 (premake5 must be in your PATH)
- Windows SDK
- Vulkan SDK
Building:
git clone https://github.com/RegularLunar/imgui-multi-hook.git
cd imgui-multi-hook
premake5 vs2022Then open MultiHook.sln in Visual Studio, Go to SetRenderingBackend and choose your backend. Then build!
We create a 'dummy device' and a 'dummy swapchain' (for DirectX10 and higher). See the CreateDeviceD3DX function in every DirectX backend. See DX12 example 'CreateDeviceD3D12'. The point is to get a pointer to the vTable to get the required functions addresses. We release it right after getting the pointers because we won't use our 'dummy device' and 'dummy swapchain' for drawing. See code used in DX12 backend hook.
We hook wglSwapBuffers which is an exported function in opengl32.dll. See code used in OpenGL backend hook.
We create a 'dummy device' to get the required functions addresses. The point is to hook into vkQueuePresentKHR where we will submit the queue with our data from our command pool and our command buffer. See code used in Vulkan backend hook.
Issues and PRs are welcome. For major changes, please open an issue first.
- bruhmoment21 - Literally everything. All i did was fork their project and clean it up / update it.
Made with 💜 by RegularLunar