Sewer56 / Reloaded.Imgui.Hook

A simple personal use utility library that can be used to inject Dear Imgui into the current process.
MIT License
19 stars 5 forks source link

DX12 support? #2

Open AudriusButkevicius opened 2 years ago

AudriusButkevicius commented 2 years ago

I have no idea how DirectX works, but I wonder if it would be a lot of work to support DX12, given it should be pretty similar to DX11?

Sewer56 commented 2 years ago

It would be a fair bit of work, but probably doable within 2 days by someone experienced.

The starting point would be the following: - Clone https://github.com/Sewer56/DearImguiSharp - Build Dear ImGui C Bindings (cimgui) with DX12 support. (edit generator.sh to include dx12) ~~(Note: Use MinGW and GCC to generate the bindings, cl/VS Compiler doesn't always work) ~~ (The library currently used was built with ./generator.lua gcc "internal" win32 dx9 dx11 in the script.)

- Build DearImGuiSharp (see readme). - Add and implement Reloaded.Imgui.Hook.Direct3D12 to this project.

[Update September 2022. The base library now supports the remaining backends, including DX12 & Vulkan]

=======

As for how to implement Reloaded.Imgui.Hook.Direct3D12? I'd check two things:

(To see what might be necessary to hook, specifically look for ImGui backend function calls.)

The source code there looks fairly reasonable. Personally I was able to implement DX11 support without ever having used it before; so it's definitively possible.

=======

Unrelated: You can use Reloaded II for running managed code inside native applications for your personal projects https://github.com/Reloaded-Project/Reloaded-II

.NET Framework is long out of support and only gets security updates these days.