You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add TextureRef and update related APIs
- Set IMGUI_DISABLE_OBSOLETE_FUNCTIONS and remove usage of deprecated functions
- Fixup deprecated API usages (callconv, alignment)
Copy file name to clipboardExpand all lines: libs/imgui/backends/imgui_impl_dx12.h
+9-12Lines changed: 9 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,9 @@
2
2
// This needs to be used along with a Platform Backend (e.g. Win32)
3
3
4
4
// Implemented features:
5
-
// [X] Renderer: User texture binding. Use 'D3D12_GPU_DESCRIPTOR_HANDLE' as ImTextureID. Read the FAQ about ImTextureID!
5
+
// [X] Renderer: User texture binding. Use 'D3D12_GPU_DESCRIPTOR_HANDLE' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
6
6
// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
7
+
// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
7
8
// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'.
8
9
// [X] Renderer: Multi-viewport support (multiple windows). Enable with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'.
9
10
@@ -24,21 +25,18 @@
24
25
#include<dxgiformat.h>// DXGI_FORMAT
25
26
#include<d3d12.h>// D3D12_CPU_DESCRIPTOR_HANDLE
26
27
27
-
// FIX(zig-gamedev)
28
-
extern"C" {
29
-
30
28
// Initialization data, for ImGui_ImplDX12_Init()
31
29
structImGui_ImplDX12_InitInfo
32
30
{
33
31
ID3D12Device*Device;
34
-
ID3D12CommandQueue*CommandQueue;
32
+
ID3D12CommandQueue*CommandQueue;// Command queue used for queuing texture uploads.
35
33
intNumFramesInFlight;
36
34
DXGI_FORMATRTVFormat; // RenderTarget format.
37
35
DXGI_FORMATDSVFormat; // DepthStencilView format.
38
36
void*UserData;
39
37
40
38
// Allocating SRV descriptors for textures is up to the application, so we provide callbacks.
41
-
// (current version of the backend will only allocate one descriptor, future versions will need to allocate more)
39
+
// (current version of the backend will only allocate one descriptor, from 1.92 the backend will need to allocate more)
// 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, they must be in 'srv_descriptor_heap'
59
+
// - 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, they must be in 'srv_descriptor_heap'
60
+
// - When we introduced the ImGui_ImplDX12_InitInfo struct we also added a 'ID3D12CommandQueue* CommandQueue' field.
// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually.
0 commit comments