22// This needs to be used along with a Platform Backend (e.g. Win32)
33
44// Implemented features:
5- // [X] Renderer: User texture binding. Use 'D3D12_GPU_DESCRIPTOR_HANDLE' as ImTextureID. Read the FAQ about ImTextureID!
6- // [X] Renderer: Large meshes support (64k+ vertices) with 16-bit indices.
7- // [X] Renderer: Multi-viewport support (multiple windows). Enable with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'.
5+ // [X] Renderer: User texture binding. Use 'D3D12_GPU_DESCRIPTOR_HANDLE' as ImTextureID. Read the FAQ about
6+ // ImTextureID! [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices.
87
98// Important: to compile on 32-bit systems, this backend requires code to be compiled with '#define ImTextureID ImU64'.
10- // See imgui_impl_dx12.cpp file for details.
9+ // This is because we need ImTextureID to carry a 64-bit value and by default ImTextureID is defined as void*.
10+ // This define is set in the example .vcxproj file and need to be replicated in your app or by adding it to your
11+ // imconfig.h file.
1112
12- // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
13- // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
14- // Learn about Dear ImGui:
15- // - FAQ https://dearimgui.com/faq
16- // - Getting Started https://dearimgui.com/getting-started
17- // - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
18- // - Introduction, links and more at the top of imgui.cpp
13+ // You can copy and use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
14+ // If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp.
15+ // Read online: https://github.com/ocornut/imgui/tree/master/docs
1916
2017#pragma once
21- #include "imgui.h" // IMGUI_IMPL_API
22- #ifndef IMGUI_DISABLE
23- #include <dxgiformat.h> // DXGI_FORMAT
18+ #include "imgui.h" // IMGUI_IMPL_API
2419
2520struct ID3D12Device ;
2621struct ID3D12DescriptorHeap ;
2722struct ID3D12GraphicsCommandList ;
2823struct D3D12_CPU_DESCRIPTOR_HANDLE ;
2924struct D3D12_GPU_DESCRIPTOR_HANDLE ;
3025
31- // Follow "Getting Started" link and check examples/ folder to learn about using backends!
32-
3326// cmd_list is the command list that the implementation will use to render imgui draw lists.
3427// Before calling the render function, caller must prepare cmd_list by resetting it and setting the appropriate
3528// render target and descriptor heap that contains font_srv_cpu_desc_handle/font_srv_gpu_desc_handle.
36- // font_srv_cpu_desc_handle and font_srv_gpu_desc_handle are handles to a single SRV descriptor to use for the internal font texture.
37- IMGUI_IMPL_API bool ImGui_ImplDX12_Init (ID3D12Device * device , int num_frames_in_flight , DXGI_FORMAT rtv_format , ID3D12DescriptorHeap * cbv_srv_heap ,
38- D3D12_CPU_DESCRIPTOR_HANDLE font_srv_cpu_desc_handle , D3D12_GPU_DESCRIPTOR_HANDLE font_srv_gpu_desc_handle );
39- IMGUI_IMPL_API void ImGui_ImplDX12_Shutdown ();
40- IMGUI_IMPL_API void ImGui_ImplDX12_NewFrame (ID3D12CommandQueue * apCommandQueue );
41- IMGUI_IMPL_API void ImGui_ImplDX12_RenderDrawData (ImDrawData * draw_data , ID3D12GraphicsCommandList * graphics_command_list );
29+ // font_srv_cpu_desc_handle and font_srv_gpu_desc_handle are handles to a single SRV descriptor to use for the internal
30+ // font texture.
31+ IMGUI_IMPL_API bool ImGui_ImplDX12_Init (
32+ ID3D12Device * apDevice , int aNumFramesInFlight , DXGI_FORMAT aRTVFormat , ID3D12DescriptorHeap * apSRVHeapDesc , D3D12_CPU_DESCRIPTOR_HANDLE aFontSRVDescCPU ,
33+ D3D12_GPU_DESCRIPTOR_HANDLE aFontSRVDescGPU );
34+ IMGUI_IMPL_API void ImGui_ImplDX12_Shutdown ();
35+ IMGUI_IMPL_API void ImGui_ImplDX12_NewFrame (ID3D12CommandQueue * apCommandQueue );
36+ IMGUI_IMPL_API void ImGui_ImplDX12_RenderDrawData (ImDrawData * apDrawData , ID3D12GraphicsCommandList * apCommandLists );
4237
4338// Use if you want to reset your rendering device without losing Dear ImGui state.
44- IMGUI_IMPL_API void ImGui_ImplDX12_InvalidateDeviceObjects ();
45- IMGUI_IMPL_API bool ImGui_ImplDX12_CreateDeviceObjects (ID3D12CommandQueue * apCommandQueue );
46-
47- #endif // #ifndef IMGUI_DISABLE
39+ IMGUI_IMPL_API void ImGui_ImplDX12_InvalidateDeviceObjects ();
40+ IMGUI_IMPL_API bool ImGui_ImplDX12_CreateDeviceObjects (ID3D12CommandQueue * apCommandQueue );
0 commit comments