Skip to content

RegularLunar/imgui-multi-hook

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MultiHook

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.

License Stars Last Commit


Supported Backends

  • DX9 + DX9Ex
  • DX10
  • DX11
  • DX12
  • OpenGL
  • Vulkan

Building From Source

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 vs2022

Then open MultiHook.sln in Visual Studio, Go to SetRenderingBackend and choose your backend. Then build!


How it works

DirectX

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.

OpenGL

We hook wglSwapBuffers which is an exported function in opengl32.dll. See code used in OpenGL backend hook.

Vulkan

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.


Support

Issues and PRs are welcome. For major changes, please open an issue first.

Acknowledgements / Credits

  • bruhmoment21 - Literally everything. All i did was fork their project and clean it up / update it.

Made with 💜 by RegularLunar

Releases

No releases published

Contributors

Languages

  • C++ 87.1%
  • C 12.9%