Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RawDX12Scene #12

Draft
wants to merge 6 commits into
base: backends
Choose a base branch
from
Draft

Add RawDX12Scene #12

wants to merge 6 commits into from

Conversation

Sirius902
Copy link

@Sirius902 Sirius902 commented Nov 24, 2023

TODO

  • Implement RawDX12Scene.CaptureScreenshot

Goes along with goatcorp/gc-cimgui#1, implements a RawDX12Scene based on the API of RawDX11Scene with some added requirements:

  • An IDXGISwapChain plus the ID3D12CommandQueue that was used to create it must be provided to make the scene.
  • RawDX12Scene.OnPostResize must be called within or after resizing buffers to initialize the render target views.
  • RawDX12Scene.OnPostPresent must be called after the original swapchain present function has been called for GPU synchronization.

Other than that, it's practically a drop-in replacement for RawDX11Scene as far as I know. I'm not a DirectX12 master by any means so the implementation is probably sub-optimal and has some bugs but it seems to work fine inside Kingdom Hearts II from what I've tested (screenshot below of Dalamud working within KH2). Hope this helps when XIV patch 7.0 drops!

NOTE: In my current implementation clearing stacks and destroying the ImGui context are currently disabled due to crashing from ImGui trying to free bad pointers. If I understand correctly the former is used for error recovery inside Dalamud, so if I managed to do something wrong when building gc-imgui and there is a way to make it work properly please let me know. Re-enabled after discussion with @goaaats. Also I'm not 100% sure if multiple fonts will work but with Dalamud's alone it seems fine.

Screenshot 2023-11-23 184027

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants