ImGui DirectX11 Implementation - #2409
Conversation
…mpl_DX11 ported from Cpp file. WARNING: never compiled inside Silk.NET solution
|
@dotnet-policy-service agree |
|
I have pushed my prototype code all in one. My apologize for the long files! As a recap:
|
|
No worries. Is this ready for review? (it's still marked as draft :P) |
|
Not yet, I've set aside my compilation issues and improved the code to support .NET 6.0 features (instead of the .NET 9.0 I created my prototype on). I've also made a minimal sample that works which I'll push soon afterwards. |
…IntPtr conversion). csharp12 is required to pass readonly ref to dx wrapper. Still wasn't able to build inside the solution
Demo is heavily inspired by the DX11 Tutorial 1.2 - HelloQuad. I tried to reduce the sample to a minimal state to show off ImGui.
|
Hey, I think this PR is now ready for review (I provided a sample as well). There are still work to do (tell me if you need comments/self-explanatory code anywhere, this won't bother me). Most TODOs are out of my knowledge, there's one to check out as it can cause issues later: And sorry for the long wait also. |
Perksey
left a comment
There was a problem hiding this comment.
Thanks so much for your contribution! My only comment is can we put the demo project in the lab as well? Usually we like the lab to be pretty self-contained (as it's all experimental stuff), and if we get to the point where it's explicitly production-ready, then we'll add an example in the obvious directory.
Alternatively, if you'd like this to go to production (i.e. not be contained in the lab), please do shout and I'll review accordingly :) the first change towards this would be creating a Silk.NET.Direct3D11.Extensions.ImGui project and moving this code there, and then making sure the public-facing API and implementation is up to the standards we'd expect.
But I'm happy with just merging this into the lab for posterity if you're happy to make the change to the demo project :) thank you again for your contribution

Summary of the PR
This PR introduces initial support for ImGui with DirectX11 in Silk.NET. It includes:
Related issues, Discord discussions, or proposals
Current progress
/src/Lab/Experiments/ImGui_DX11/ImGui_Impl_DX11.cs(C++ port) and the associatedImGuiDX11Controller.csFurther Comments
The changes should not introduce any breaking API or behavioral changes: they will extend the functionality of Silk.NET.
Tested on
Remarks
This is actually my first PR to such a large open-source repo. Any help, constructive criticism, remarks, suggestions, improvements and feedback are greatly appreciated!