Integration in FlaxEngine #4736
Cop46
started this conversation in
New Users Build/Link/Run issues ONLY!
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have tried to integrate ImGui into Flax Engine ( https://github.com/FlaxEngine/FlaxEngine) but I can get it to work in directx 12.
In directX 11 that work perfect...
If anyone can look at this to help me, that was really sympatical ?
Thanks.
My actual work :
The initialisation code is in GPUDeviceDX12.Cpp file line 657 :
ImGui_ImplDX12_Init(_device, 1,
DXGI_FORMAT_R8G8B8A8_UNORM, RingHeap_CBV_SRV_UAV.GetHeap(),
RingHeap_CBV_SRV_UAV.GetHeap()->GetCPUDescriptorHandleForHeapStart(),
RingHeap_CBV_SRV_UAV.GetHeap()->GetGPUDescriptorHandleForHeapStart());
The init of impl is in file Engine.Cpp line 150 :
ImGui_ImplWin32_Init(MainWindow->GetNativePtr());
At line 361 :
ImGui_ImplDX12_NewFrame();
ImGui_ImplWin32_NewFrame();
ImGui::NewFrame();
ImGui::ShowDemoWindow(&show_demo_window);
And the draw part in GPUDevice.Cpp at line 510 after the RenderEnd();
ImGui::Render();
GPUContextDX12* _context = (GPUContextDX12*)context;
ID3D12GraphicsCommandList* commandList = _context->GetCommandList();
GPUDeviceDX12* _device = (GPUDeviceDX12*)_context->GetDevice();
context->ResetRenderTarget(); <---Here if I don't use this, the engine crash with render target error
ImGui_ImplDX12_RenderDrawData(ImGui::GetDrawData(), commandList);
Beta Was this translation helpful? Give feedback.
All reactions