Skip to content

Commit 78cc626

Browse files
authored
Merge pull request #2 from ocornut/docking
version 1.91.6
2 parents 60f6526 + 947aa9c commit 78cc626

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+518
-285
lines changed

backends/imgui_impl_allegro5.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
// Implemented features:
55
// [X] Renderer: User texture binding. Use 'ALLEGRO_BITMAP*' as ImTextureID. Read the FAQ about ImTextureID!
66
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy ALLEGRO_KEY_* values are obsolete since 1.87 and not supported since 1.91.5]
7-
// [X] Platform: Clipboard support (from Allegro 5.1.12)
8-
// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
9-
// Missing features:
10-
// [ ] Renderer: Multi-viewport support (multiple windows)..
11-
// [ ] Renderer: The renderer is suboptimal as we need to convert vertices manually.
7+
// [X] Platform: Clipboard support (from Allegro 5.1.12).
8+
// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
9+
// Missing features or Issues:
10+
// [ ] Renderer: The renderer is suboptimal as we need to unindex our buffers and convert vertices manually.
1211
// [ ] Platform: Missing gamepad support.
12+
// [ ] Renderer: Multi-viewport support (multiple windows).
1313

1414
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
1515
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.

backends/imgui_impl_allegro5.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
// Implemented features:
55
// [X] Renderer: User texture binding. Use 'ALLEGRO_BITMAP*' as ImTextureID. Read the FAQ about ImTextureID!
66
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy ALLEGRO_KEY_* values are obsolete since 1.87 and not supported since 1.91.5]
7-
// [X] Platform: Clipboard support (from Allegro 5.1.12)
8-
// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
9-
// Missing features:
10-
// [ ] Renderer: Multi-viewport support (multiple windows)..
7+
// [X] Platform: Clipboard support (from Allegro 5.1.12).
8+
// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
9+
// Missing features or Issues:
1110
// [ ] Renderer: The renderer is suboptimal as we need to unindex our buffers and convert vertices manually.
1211
// [ ] Platform: Missing gamepad support.
12+
// [ ] Renderer: Multi-viewport support (multiple windows).
1313

1414
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
1515
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.

backends/imgui_impl_android.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
// Implemented features:
55
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy AKEYCODE_* values are obsolete since 1.87 and not supported since 1.91.5]
66
// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen/Pen.
7-
// Missing features:
7+
// Missing features or Issues:
88
// [ ] Platform: Clipboard support.
99
// [ ] Platform: Gamepad support. Enable with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
10-
// [ ] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: Check if this is even possible with Android.
10+
// [ ] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: Check if this is even possible with Android.
1111
// [ ] Platform: Multi-viewport support (multiple windows). Not meaningful on Android.
1212
// Important:
1313
// - Consider using SDL or GLFW backend on Android, which will be more full-featured than this.

backends/imgui_impl_android.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
// Implemented features:
55
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy AKEYCODE_* values are obsolete since 1.87 and not supported since 1.91.5]
66
// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen/Pen.
7-
// Missing features:
7+
// Missing features or Issues:
88
// [ ] Platform: Clipboard support.
99
// [ ] Platform: Gamepad support. Enable with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
10-
// [ ] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: Check if this is even possible with Android.
10+
// [ ] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: Check if this is even possible with Android.
1111
// [ ] Platform: Multi-viewport support (multiple windows). Not meaningful on Android.
1212
// Important:
1313
// - Consider using SDL or GLFW backend on Android, which will be more full-featured than this.

backends/imgui_impl_dx10.cpp

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// Implemented features:
55
// [X] Renderer: User texture binding. Use 'ID3D10ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID!
6-
// [X] Renderer: Large meshes support (64k+ vertices) with 16-bit indices.
6+
// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
77
// [X] Renderer: Multi-viewport support (multiple windows). Enable with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'.
88

99
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
@@ -347,21 +347,16 @@ static void ImGui_ImplDX10_CreateFontsTexture()
347347

348348
// Store our identifier
349349
io.Fonts->SetTexID((ImTextureID)bd->pFontTextureView);
350+
}
350351

351-
// Create texture sampler
352-
// (Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling)
352+
static void ImGui_ImplDX10_DestroyFontsTexture()
353+
{
354+
ImGui_ImplDX10_Data* bd = ImGui_ImplDX10_GetBackendData();
355+
if (bd->pFontTextureView)
353356
{
354-
D3D10_SAMPLER_DESC desc;
355-
ZeroMemory(&desc, sizeof(desc));
356-
desc.Filter = D3D10_FILTER_MIN_MAG_MIP_LINEAR;
357-
desc.AddressU = D3D10_TEXTURE_ADDRESS_CLAMP;
358-
desc.AddressV = D3D10_TEXTURE_ADDRESS_CLAMP;
359-
desc.AddressW = D3D10_TEXTURE_ADDRESS_CLAMP;
360-
desc.MipLODBias = 0.f;
361-
desc.ComparisonFunc = D3D10_COMPARISON_ALWAYS;
362-
desc.MinLOD = 0.f;
363-
desc.MaxLOD = 0.f;
364-
bd->pd3dDevice->CreateSamplerState(&desc, &bd->pFontSampler);
357+
bd->pFontTextureView->Release();
358+
bd->pFontTextureView = nullptr;
359+
ImGui::GetIO().Fonts->SetTexID(0); // We copied bd->pFontTextureView to io.Fonts->TexID so let's clear that as well.
365360
}
366361
}
367362

@@ -514,6 +509,22 @@ bool ImGui_ImplDX10_CreateDeviceObjects()
514509
bd->pd3dDevice->CreateDepthStencilState(&desc, &bd->pDepthStencilState);
515510
}
516511

512+
// Create texture sampler
513+
// (Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling)
514+
{
515+
D3D10_SAMPLER_DESC desc;
516+
ZeroMemory(&desc, sizeof(desc));
517+
desc.Filter = D3D10_FILTER_MIN_MAG_MIP_LINEAR;
518+
desc.AddressU = D3D10_TEXTURE_ADDRESS_CLAMP;
519+
desc.AddressV = D3D10_TEXTURE_ADDRESS_CLAMP;
520+
desc.AddressW = D3D10_TEXTURE_ADDRESS_CLAMP;
521+
desc.MipLODBias = 0.f;
522+
desc.ComparisonFunc = D3D10_COMPARISON_ALWAYS;
523+
desc.MinLOD = 0.f;
524+
desc.MaxLOD = 0.f;
525+
bd->pd3dDevice->CreateSamplerState(&desc, &bd->pFontSampler);
526+
}
527+
517528
ImGui_ImplDX10_CreateFontsTexture();
518529

519530
return true;
@@ -525,8 +536,9 @@ void ImGui_ImplDX10_InvalidateDeviceObjects()
525536
if (!bd->pd3dDevice)
526537
return;
527538

539+
ImGui_ImplDX10_DestroyFontsTexture();
540+
528541
if (bd->pFontSampler) { bd->pFontSampler->Release(); bd->pFontSampler = nullptr; }
529-
if (bd->pFontTextureView) { bd->pFontTextureView->Release(); bd->pFontTextureView = nullptr; ImGui::GetIO().Fonts->SetTexID(0); } // We copied bd->pFontTextureView to io.Fonts->TexID so let's clear that as well.
530542
if (bd->pIB) { bd->pIB->Release(); bd->pIB = nullptr; }
531543
if (bd->pVB) { bd->pVB->Release(); bd->pVB = nullptr; }
532544
if (bd->pBlendState) { bd->pBlendState->Release(); bd->pBlendState = nullptr; }
@@ -592,7 +604,7 @@ void ImGui_ImplDX10_NewFrame()
592604
ImGui_ImplDX10_Data* bd = ImGui_ImplDX10_GetBackendData();
593605
IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplDX10_Init()?");
594606

595-
if (!bd->pFontSampler)
607+
if (!bd->pVertexShader)
596608
ImGui_ImplDX10_CreateDeviceObjects();
597609
}
598610

backends/imgui_impl_dx10.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// Implemented features:
55
// [X] Renderer: User texture binding. Use 'ID3D10ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID!
6-
// [X] Renderer: Large meshes support (64k+ vertices) with 16-bit indices.
6+
// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
77
// [X] Renderer: Multi-viewport support (multiple windows). Enable with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'.
88

99
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.

backends/imgui_impl_dx11.cpp

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// Implemented features:
55
// [X] Renderer: User texture binding. Use 'ID3D11ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID!
6-
// [X] Renderer: Large meshes support (64k+ vertices) with 16-bit indices.
6+
// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
77
// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'.
88
// [X] Renderer: Multi-viewport support (multiple windows). Enable with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'.
99

@@ -304,7 +304,7 @@ void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data)
304304
global_idx_offset += draw_list->IdxBuffer.Size;
305305
global_vtx_offset += draw_list->VtxBuffer.Size;
306306
}
307-
platform_io.Renderer_RenderState = NULL;
307+
platform_io.Renderer_RenderState = nullptr;
308308

309309
// Restore modified DX state
310310
device->RSSetScissorRects(old.ScissorRectsCount, old.ScissorRects);
@@ -370,21 +370,16 @@ static void ImGui_ImplDX11_CreateFontsTexture()
370370

371371
// Store our identifier
372372
io.Fonts->SetTexID((ImTextureID)bd->pFontTextureView);
373+
}
373374

374-
// Create texture sampler
375-
// (Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling)
375+
static void ImGui_ImplDX11_DestroyFontsTexture()
376+
{
377+
ImGui_ImplDX11_Data* bd = ImGui_ImplDX11_GetBackendData();
378+
if (bd->pFontTextureView)
376379
{
377-
D3D11_SAMPLER_DESC desc;
378-
ZeroMemory(&desc, sizeof(desc));
379-
desc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
380-
desc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP;
381-
desc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP;
382-
desc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP;
383-
desc.MipLODBias = 0.f;
384-
desc.ComparisonFunc = D3D11_COMPARISON_ALWAYS;
385-
desc.MinLOD = 0.f;
386-
desc.MaxLOD = 0.f;
387-
bd->pd3dDevice->CreateSamplerState(&desc, &bd->pFontSampler);
380+
bd->pFontTextureView->Release();
381+
bd->pFontTextureView = nullptr;
382+
ImGui::GetIO().Fonts->SetTexID(0); // We copied data->pFontTextureView to io.Fonts->TexID so let's clear that as well.
388383
}
389384
}
390385

@@ -537,6 +532,22 @@ bool ImGui_ImplDX11_CreateDeviceObjects()
537532
bd->pd3dDevice->CreateDepthStencilState(&desc, &bd->pDepthStencilState);
538533
}
539534

535+
// Create texture sampler
536+
// (Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling)
537+
{
538+
D3D11_SAMPLER_DESC desc;
539+
ZeroMemory(&desc, sizeof(desc));
540+
desc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
541+
desc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP;
542+
desc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP;
543+
desc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP;
544+
desc.MipLODBias = 0.f;
545+
desc.ComparisonFunc = D3D11_COMPARISON_ALWAYS;
546+
desc.MinLOD = 0.f;
547+
desc.MaxLOD = 0.f;
548+
bd->pd3dDevice->CreateSamplerState(&desc, &bd->pFontSampler);
549+
}
550+
540551
ImGui_ImplDX11_CreateFontsTexture();
541552

542553
return true;
@@ -548,8 +559,9 @@ void ImGui_ImplDX11_InvalidateDeviceObjects()
548559
if (!bd->pd3dDevice)
549560
return;
550561

562+
ImGui_ImplDX11_DestroyFontsTexture();
563+
551564
if (bd->pFontSampler) { bd->pFontSampler->Release(); bd->pFontSampler = nullptr; }
552-
if (bd->pFontTextureView) { bd->pFontTextureView->Release(); bd->pFontTextureView = nullptr; ImGui::GetIO().Fonts->SetTexID(0); } // We copied data->pFontTextureView to io.Fonts->TexID so let's clear that as well.
553565
if (bd->pIB) { bd->pIB->Release(); bd->pIB = nullptr; }
554566
if (bd->pVB) { bd->pVB->Release(); bd->pVB = nullptr; }
555567
if (bd->pBlendState) { bd->pBlendState->Release(); bd->pBlendState = nullptr; }

backends/imgui_impl_dx11.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// Implemented features:
55
// [X] Renderer: User texture binding. Use 'ID3D11ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID!
6-
// [X] Renderer: Large meshes support (64k+ vertices) with 16-bit indices.
6+
// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
77
// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'.
88
// [X] Renderer: Multi-viewport support (multiple windows). Enable with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'.
99

backends/imgui_impl_dx12.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// Implemented features:
55
// [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.
6+
// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
77
// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'.
88
// [X] Renderer: Multi-viewport support (multiple windows). Enable with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'.
99
// FIXME: The transition from removing a viewport and moving the window in an existing hosted viewport tends to flicker.
@@ -22,6 +22,7 @@
2222
// CHANGELOG
2323
// (minor and older changes stripped away, please see git history for details)
2424
// 2024-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
25+
// 2024-12-09: DirectX12: Let user specifies the DepthStencilView format by setting ImGui_ImplDX12_InitInfo::DSVFormat.
2526
// 2024-11-15: DirectX12: *BREAKING CHANGE* Changed ImGui_ImplDX12_Init() signature to take a ImGui_ImplDX12_InitInfo struct. Legacy ImGui_ImplDX12_Init() signature is still supported (will obsolete).
2627
// 2024-11-15: DirectX12: *BREAKING CHANGE* User is now required to pass function pointers to allocate/free SRV Descriptors. We provide convenience legacy fields to pass a single descriptor, matching the old API, but upcoming features will want multiple.
2728
// 2024-10-23: DirectX12: Unmap() call specify written range. The range is informational and may be used by debug tools.
@@ -77,6 +78,7 @@ struct ImGui_ImplDX12_Data
7778
ID3D12RootSignature* pRootSignature;
7879
ID3D12PipelineState* pPipelineState;
7980
DXGI_FORMAT RTVFormat;
81+
DXGI_FORMAT DSVFormat;
8082
ID3D12DescriptorHeap* pd3dSrvDescHeap;
8183
UINT numFramesInFlight;
8284
ImGui_ImplDX12_Texture FontTexture;
@@ -388,7 +390,7 @@ void ImGui_ImplDX12_RenderDrawData(ImDrawData* draw_data, ID3D12GraphicsCommandL
388390
global_idx_offset += draw_list->IdxBuffer.Size;
389391
global_vtx_offset += draw_list->VtxBuffer.Size;
390392
}
391-
platform_io.Renderer_RenderState = NULL;
393+
platform_io.Renderer_RenderState = nullptr;
392394
}
393395

394396
static void ImGui_ImplDX12_CreateFontsTexture()
@@ -646,6 +648,7 @@ bool ImGui_ImplDX12_CreateDeviceObjects()
646648
psoDesc.SampleMask = UINT_MAX;
647649
psoDesc.NumRenderTargets = 1;
648650
psoDesc.RTVFormats[0] = bd->RTVFormat;
651+
psoDesc.DSVFormat = bd->DSVFormat;
649652
psoDesc.SampleDesc.Count = 1;
650653
psoDesc.Flags = D3D12_PIPELINE_STATE_FLAG_NONE;
651654

@@ -812,6 +815,7 @@ bool ImGui_ImplDX12_Init(ImGui_ImplDX12_InitInfo* init_info)
812815

813816
bd->pd3dDevice = init_info->Device;
814817
bd->RTVFormat = init_info->RTVFormat;
818+
bd->DSVFormat = init_info->DSVFormat;
815819
bd->numFramesInFlight = init_info->NumFramesInFlight;
816820
bd->pd3dSrvDescHeap = init_info->SrvDescriptorHeap;
817821

@@ -828,7 +832,7 @@ bool ImGui_ImplDX12_Init(ImGui_ImplDX12_InitInfo* init_info)
828832
main_viewport->RendererUserData = IM_NEW(ImGui_ImplDX12_ViewportData)(bd->numFramesInFlight);
829833

830834
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
831-
if (init_info->SrvDescriptorAllocFn == NULL)
835+
if (init_info->SrvDescriptorAllocFn == nullptr)
832836
{
833837
// Wrap legacy behavior of passing space for a single descriptor
834838
IM_ASSERT(init_info->LegacySingleSrvCpuDescriptor.ptr != 0 && init_info->LegacySingleSrvGpuDescriptor.ptr != 0);
@@ -850,7 +854,7 @@ bool ImGui_ImplDX12_Init(ImGui_ImplDX12_InitInfo* init_info)
850854
#endif
851855

852856
// Allocate 1 SRV descriptor for the font texture
853-
IM_ASSERT(init_info->SrvDescriptorAllocFn != NULL && init_info->SrvDescriptorFreeFn != NULL);
857+
IM_ASSERT(init_info->SrvDescriptorAllocFn != nullptr && init_info->SrvDescriptorFreeFn != nullptr);
854858
init_info->SrvDescriptorAllocFn(&bd->InitInfo, &bd->FontTexture.hFontSrvCpuDescHandle, &bd->FontTexture.hFontSrvGpuDescHandle);
855859

856860
return true;

backends/imgui_impl_dx12.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// Implemented features:
55
// [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.
6+
// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
77
// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'.
88
// [X] Renderer: Multi-viewport support (multiple windows). Enable with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'.
99

@@ -30,7 +30,8 @@ struct ImGui_ImplDX12_InitInfo
3030
ID3D12Device* Device;
3131
ID3D12CommandQueue* CommandQueue;
3232
int NumFramesInFlight;
33-
DXGI_FORMAT RTVFormat;
33+
DXGI_FORMAT RTVFormat; // RenderTarget format.
34+
DXGI_FORMAT DSVFormat; // DepthStencilView format.
3435
void* UserData;
3536

3637
// Allocating SRV descriptors for textures is up to the application, so we provide callbacks.

0 commit comments

Comments
 (0)