Compare commits

..

3 Commits

Author SHA1 Message Date
Mark Jansen
049f3d4e1b Premake: Only build example_sdl2_vulkan with both sdl2 and vulkan (7852) 2024-11-07 20:39:53 +01:00
Mark Jansen
bdab3381a0 Premake: Add example_sdl2_sdlrenderer2 (7862) 2024-11-07 20:39:53 +01:00
ocornut
b8a79edcf5 Premake: experimental premake5 script.
(neater vs project output but certainly less standard than cmake)
(amended 2022-09-28)
(amended 2023-02-07)
2024-11-07 20:39:11 +01:00
13 changed files with 396 additions and 226 deletions

View File

@ -6,9 +6,6 @@
// [X] Renderer: Large meshes support (64k+ vertices) with 16-bit indices.
// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'.
// The aim of imgui_impl_dx12.h/.cpp is to be usable in your engine without any modification.
// IF YOU FEEL YOU NEED TO MAKE ANY CHANGE TO THIS CODE, please share them and your feedback at https://github.com/ocornut/imgui/
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
// Learn about Dear ImGui:
@ -19,8 +16,6 @@
// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// 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).
// 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.
// 2024-10-23: DirectX12: Unmap() call specify written range. The range is informational and may be used by debug tools.
// 2024-10-07: DirectX12: Changed default texture sampler to Clamp instead of Repeat/Wrap.
// 2024-10-07: DirectX12: Expose selected render state in ImGui_ImplDX12_RenderState, which you can access in 'void* platform_io.Renderer_RenderState' during draw callbacks.
@ -55,24 +50,17 @@
#pragma comment(lib, "d3dcompiler") // Automatically link with d3dcompiler.lib as we are using D3DCompile() below.
#endif
// DirectX12 data
// DirectX data
struct ImGui_ImplDX12_RenderBuffers;
struct ImGui_ImplDX12_Texture
{
ID3D12Resource* pTextureResource;
D3D12_CPU_DESCRIPTOR_HANDLE hFontSrvCpuDescHandle;
D3D12_GPU_DESCRIPTOR_HANDLE hFontSrvGpuDescHandle;
};
struct ImGui_ImplDX12_Data
{
ImGui_ImplDX12_InitInfo InitInfo;
ID3D12Device* pd3dDevice;
ID3D12RootSignature* pRootSignature;
ID3D12PipelineState* pPipelineState;
DXGI_FORMAT RTVFormat;
ImGui_ImplDX12_Texture FontTexture;
ID3D12Resource* pFontTextureResource;
D3D12_CPU_DESCRIPTOR_HANDLE hFontSrvCpuDescHandle;
D3D12_GPU_DESCRIPTOR_HANDLE hFontSrvGpuDescHandle;
ID3D12DescriptorHeap* pd3dSrvDescHeap;
UINT numFramesInFlight;
@ -322,7 +310,6 @@ static void ImGui_ImplDX12_CreateFontsTexture()
io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);
// Upload texture to graphics system
ImGui_ImplDX12_Texture* font_tex = &bd->FontTexture;
{
D3D12_HEAP_PROPERTIES props;
memset(&props, 0, sizeof(D3D12_HEAP_PROPERTIES));
@ -453,13 +440,13 @@ static void ImGui_ImplDX12_CreateFontsTexture()
srvDesc.Texture2D.MipLevels = desc.MipLevels;
srvDesc.Texture2D.MostDetailedMip = 0;
srvDesc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
bd->pd3dDevice->CreateShaderResourceView(pTexture, &srvDesc, font_tex->hFontSrvCpuDescHandle);
SafeRelease(font_tex->pTextureResource);
font_tex->pTextureResource = pTexture;
bd->pd3dDevice->CreateShaderResourceView(pTexture, &srvDesc, bd->hFontSrvCpuDescHandle);
SafeRelease(bd->pFontTextureResource);
bd->pFontTextureResource = pTexture;
}
// Store our identifier
io.Fonts->SetTexID((ImTextureID)font_tex->hFontSrvGpuDescHandle.ptr);
io.Fonts->SetTexID((ImTextureID)bd->hFontSrvGpuDescHandle.ptr);
}
bool ImGui_ImplDX12_CreateDeviceObjects()
@ -705,15 +692,8 @@ void ImGui_ImplDX12_InvalidateDeviceObjects()
ImGuiIO& io = ImGui::GetIO();
SafeRelease(bd->pRootSignature);
SafeRelease(bd->pPipelineState);
// Free SRV descriptor used by texture
ImGui_ImplDX12_Texture* font_tex = &bd->FontTexture;
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
if (bd->InitInfo.SrvDescriptorFreeFn != NULL)
#endif
bd->InitInfo.SrvDescriptorFreeFn(&bd->InitInfo, font_tex->hFontSrvCpuDescHandle, font_tex->hFontSrvGpuDescHandle);
SafeRelease(font_tex->pTextureResource);
io.Fonts->SetTexID(0); // We copied bd->hFontSrvGpuDescHandle to io.Fonts->TexID so let's clear that as well.
SafeRelease(bd->pFontTextureResource);
io.Fonts->SetTexID(0); // We copied bd->pFontTextureView to io.Fonts->TexID so let's clear that as well.
for (UINT i = 0; i < bd->numFramesInFlight; i++)
{
@ -723,7 +703,8 @@ void ImGui_ImplDX12_InvalidateDeviceObjects()
}
}
bool ImGui_ImplDX12_Init(ImGui_ImplDX12_InitInfo* init_info)
bool ImGui_ImplDX12_Init(ID3D12Device* device, int num_frames_in_flight, DXGI_FORMAT rtv_format, ID3D12DescriptorHeap* cbv_srv_heap,
D3D12_CPU_DESCRIPTOR_HANDLE font_srv_cpu_desc_handle, D3D12_GPU_DESCRIPTOR_HANDLE font_srv_gpu_desc_handle)
{
ImGuiIO& io = ImGui::GetIO();
IMGUI_CHECKVERSION();
@ -731,39 +712,21 @@ bool ImGui_ImplDX12_Init(ImGui_ImplDX12_InitInfo* init_info)
// Setup backend capabilities flags
ImGui_ImplDX12_Data* bd = IM_NEW(ImGui_ImplDX12_Data)();
bd->InitInfo = *init_info; // Deep copy
bd->pd3dDevice = init_info->Device;
bd->RTVFormat = init_info->RTVFormat;
bd->numFramesInFlight = init_info->NumFramesInFlight;
bd->pd3dSrvDescHeap = init_info->SrvDescriptorHeap;
io.BackendRendererUserData = (void*)bd;
io.BackendRendererName = "imgui_impl_dx12";
io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset; // We can honor the ImDrawCmd::VtxOffset field, allowing for large meshes.
// Allocate 1 SRV descriptor for the font texture
if (init_info->SrvDescriptorAllocFn != NULL)
{
IM_ASSERT(init_info->SrvDescriptorFreeFn != NULL);
init_info->SrvDescriptorAllocFn(&bd->InitInfo, &bd->FontTexture.hFontSrvCpuDescHandle, &bd->FontTexture.hFontSrvGpuDescHandle);
}
else
{
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
IM_ASSERT(init_info->LegacySingleSrvCpuDescriptor.ptr != 0 && init_info->LegacySingleSrvGpuDescriptor.ptr != 0);
bd->FontTexture.hFontSrvCpuDescHandle = init_info->LegacySingleSrvCpuDescriptor;
bd->FontTexture.hFontSrvGpuDescHandle = init_info->LegacySingleSrvGpuDescriptor;
#else
IM_ASSERT(init_info->SrvDescriptorAllocFn != NULL);
IM_ASSERT(init_info->SrvDescriptorFreeFn != NULL);
#endif
}
bd->pd3dDevice = device;
bd->RTVFormat = rtv_format;
bd->hFontSrvCpuDescHandle = font_srv_cpu_desc_handle;
bd->hFontSrvGpuDescHandle = font_srv_gpu_desc_handle;
bd->pFrameResources = new ImGui_ImplDX12_RenderBuffers[num_frames_in_flight];
bd->numFramesInFlight = num_frames_in_flight;
bd->pd3dSrvDescHeap = cbv_srv_heap;
bd->frameIndex = UINT_MAX;
// Create buffers with a default size (they will later be grown as needed)
bd->frameIndex = UINT_MAX;
bd->pFrameResources = new ImGui_ImplDX12_RenderBuffers[bd->numFramesInFlight];
for (int i = 0; i < (int)bd->numFramesInFlight; i++)
for (int i = 0; i < num_frames_in_flight; i++)
{
ImGui_ImplDX12_RenderBuffers* fr = &bd->pFrameResources[i];
fr->IndexBuffer = nullptr;
@ -775,22 +738,6 @@ bool ImGui_ImplDX12_Init(ImGui_ImplDX12_InitInfo* init_info)
return true;
}
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
// Legacy initialization API Obsoleted in 1.91.5
// 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'
bool ImGui_ImplDX12_Init(ID3D12Device* device, int num_frames_in_flight, DXGI_FORMAT rtv_format, ID3D12DescriptorHeap* srv_descriptor_heap, D3D12_CPU_DESCRIPTOR_HANDLE font_srv_cpu_desc_handle, D3D12_GPU_DESCRIPTOR_HANDLE font_srv_gpu_desc_handle)
{
ImGui_ImplDX12_InitInfo init_info;
init_info.Device = device;
init_info.NumFramesInFlight = num_frames_in_flight;
init_info.RTVFormat = rtv_format;
init_info.SrvDescriptorHeap = srv_descriptor_heap;
init_info.LegacySingleSrvCpuDescriptor = font_srv_cpu_desc_handle;
init_info.LegacySingleSrvGpuDescriptor = font_srv_gpu_desc_handle;;
return ImGui_ImplDX12_Init(&init_info);
}
#endif
void ImGui_ImplDX12_Shutdown()
{
ImGui_ImplDX12_Data* bd = ImGui_ImplDX12_GetBackendData();
@ -800,7 +747,6 @@ void ImGui_ImplDX12_Shutdown()
// Clean up windows and device objects
ImGui_ImplDX12_InvalidateDeviceObjects();
delete[] bd->pFrameResources;
io.BackendRendererName = nullptr;
io.BackendRendererUserData = nullptr;
io.BackendFlags &= ~ImGuiBackendFlags_RendererHasVtxOffset;

View File

@ -6,9 +6,6 @@
// [X] Renderer: Large meshes support (64k+ vertices) with 16-bit indices.
// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'.
// The aim of imgui_impl_dx12.h/.cpp is to be usable in your engine without any modification.
// IF YOU FEEL YOU NEED TO MAKE ANY CHANGE TO THIS CODE, please share them and your feedback at https://github.com/ocornut/imgui/
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
// Learn about Dear ImGui:
@ -21,42 +18,24 @@
#include "imgui.h" // IMGUI_IMPL_API
#ifndef IMGUI_DISABLE
#include <dxgiformat.h> // DXGI_FORMAT
#include <d3d12.h> // D3D12_CPU_DESCRIPTOR_HANDLE
// Initialization data, for ImGui_ImplDX12_Init()
struct ImGui_ImplDX12_InitInfo
{
ID3D12Device* Device;
ID3D12CommandQueue* CommandQueue;
int NumFramesInFlight;
DXGI_FORMAT RTVFormat;
void* UserData;
// Allocating SRV descriptors for textures is up to the application, so we provide callbacks.
// (current version of the backend will only allocate one descriptor, future versions will need to allocate more)
ID3D12DescriptorHeap* SrvDescriptorHeap;
void (*SrvDescriptorAllocFn)(ImGui_ImplDX12_InitInfo* info, D3D12_CPU_DESCRIPTOR_HANDLE* out_cpu_desc_handle, D3D12_GPU_DESCRIPTOR_HANDLE* out_gpu_desc_handle);
void (*SrvDescriptorFreeFn)(ImGui_ImplDX12_InitInfo* info, D3D12_CPU_DESCRIPTOR_HANDLE cpu_desc_handle, D3D12_GPU_DESCRIPTOR_HANDLE gpu_desc_handle);
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
D3D12_CPU_DESCRIPTOR_HANDLE LegacySingleSrvCpuDescriptor; // To facilitate transition from single descriptor to allocator callback, you may use those.
D3D12_GPU_DESCRIPTOR_HANDLE LegacySingleSrvGpuDescriptor;
#endif
ImGui_ImplDX12_InitInfo() { memset(this, 0, sizeof(*this)); }
};
struct ID3D12Device;
struct ID3D12DescriptorHeap;
struct ID3D12GraphicsCommandList;
struct D3D12_CPU_DESCRIPTOR_HANDLE;
struct D3D12_GPU_DESCRIPTOR_HANDLE;
// Follow "Getting Started" link and check examples/ folder to learn about using backends!
IMGUI_IMPL_API bool ImGui_ImplDX12_Init(ImGui_ImplDX12_InitInfo* info);
// Before calling the render function, caller must prepare the command list by resetting it and setting the appropriate
// render target and descriptor heap that contains font_srv_cpu_desc_handle/font_srv_gpu_desc_handle.
// 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.
IMGUI_IMPL_API bool ImGui_ImplDX12_Init(ID3D12Device* device, int num_frames_in_flight, DXGI_FORMAT rtv_format, ID3D12DescriptorHeap* cbv_srv_heap,
D3D12_CPU_DESCRIPTOR_HANDLE font_srv_cpu_desc_handle, D3D12_GPU_DESCRIPTOR_HANDLE font_srv_gpu_desc_handle);
IMGUI_IMPL_API void ImGui_ImplDX12_Shutdown();
IMGUI_IMPL_API void ImGui_ImplDX12_NewFrame();
IMGUI_IMPL_API void ImGui_ImplDX12_RenderDrawData(ImDrawData* draw_data, ID3D12GraphicsCommandList* graphics_command_list);
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
// Legacy initialization API Obsoleted in 1.91.5
// 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'
IMGUI_IMPL_API bool ImGui_ImplDX12_Init(ID3D12Device* device, int num_frames_in_flight, DXGI_FORMAT rtv_format, ID3D12DescriptorHeap* srv_descriptor_heap, D3D12_CPU_DESCRIPTOR_HANDLE font_srv_cpu_desc_handle, D3D12_GPU_DESCRIPTOR_HANDLE font_srv_gpu_desc_handle);
#endif
// Use if you want to reset your rendering device without losing Dear ImGui state.
IMGUI_IMPL_API bool ImGui_ImplDX12_CreateDeviceObjects();
IMGUI_IMPL_API void ImGui_ImplDX12_InvalidateDeviceObjects();

View File

@ -35,28 +35,6 @@ HOW TO UPDATE?
and API updates have been a little more frequent lately. They are documented below and in imgui.cpp and should not affect all users.
- Please report any issue!
-----------------------------------------------------------------------
VERSION 1.91.6 WIP (In Progress)
-----------------------------------------------------------------------
Breaking changes:
- Backends: DX12: Changed ImGui_ImplDX12_Init() signature to take a
ImGui_ImplDX12_InitInfo struct.
- Using the new API, application 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.
- Legacy ImGui_ImplDX12_Init() signature is still supported (will obsolete).
Other changes:
- Error Handling: fixed cases where recoverable error handling would crash when
processing errors outside of the NewFrame()..EndFrame() scope. (#1651)
- Examples: Win32+DX12: Using a basic free-list allocator to manage multiple
SRV descriptors.
-----------------------------------------------------------------------
VERSION 1.91.5 (Released 2024-11-07)
-----------------------------------------------------------------------
@ -86,11 +64,6 @@ Other changes:
between _Header and _HeaderHovered which was introduced v1.91 (#8106, #1861)
- Buttons: using ImGuiItemFlags_ButtonRepeat makes default button behavior use
PressedOnClick instead of PressedOnClickRelease when unspecified.
- This is intended to make the +/- buttons of InputInt/InputFloat react on the
initial mouse down event.
- Note that it may reveal incorrect usage if you were using InputInt/InputFloat
without persistent storage by relying solely on e.g. IsItemDeactivatedAfterEdit():
this was never supported and didn't work consistantly (see #8149).
- InputText: fixed a bug (regression in 1.91.2) where modifying text buffer within
a callback would sometimes prevents further appending to the buffer.
- Tabs, Style: made ImGuiCol_TabDimmedSelectedOverline alpha 0 (not visible) in default
@ -113,7 +86,6 @@ Other changes:
- Examples: Android+OpenGL: Using ALooper_pollOnce() instead of ALooper_pollAll()
which has been deprecated. (#8013) [@feather179]
-----------------------------------------------------------------------
VERSION 1.91.4 (Released 2024-10-18)
-----------------------------------------------------------------------

View File

@ -22,70 +22,23 @@
#pragma comment(lib, "dxguid.lib")
#endif
// Config for example app
static const int APP_NUM_FRAMES_IN_FLIGHT = 3;
static const int APP_NUM_BACK_BUFFERS = 3;
static const int APP_SRV_HEAP_SIZE = 64;
#include "imgui_internal.h"
struct FrameContext
{
ID3D12CommandAllocator* CommandAllocator;
UINT64 FenceValue;
};
// Simple free list based allocator
struct ExampleDescriptorHeapAllocator
{
ID3D12DescriptorHeap* Heap = nullptr;
D3D12_DESCRIPTOR_HEAP_TYPE HeapType = D3D12_DESCRIPTOR_HEAP_TYPE_NUM_TYPES;
D3D12_CPU_DESCRIPTOR_HANDLE HeapStartCpu;
D3D12_GPU_DESCRIPTOR_HANDLE HeapStartGpu;
UINT HeapHandleIncrement;
ImVector<int> FreeIndices;
void Create(ID3D12Device* device, ID3D12DescriptorHeap* heap)
{
IM_ASSERT(Heap == nullptr && FreeIndices.empty());
Heap = heap;
D3D12_DESCRIPTOR_HEAP_DESC desc = heap->GetDesc();
HeapType = desc.Type;
HeapStartCpu = Heap->GetCPUDescriptorHandleForHeapStart();
HeapStartGpu = Heap->GetGPUDescriptorHandleForHeapStart();
HeapHandleIncrement = device->GetDescriptorHandleIncrementSize(HeapType);
FreeIndices.reserve((int)desc.NumDescriptors);
for (int n = desc.NumDescriptors; n > 0; n--)
FreeIndices.push_back(n);
}
void Destroy()
{
Heap = NULL;
FreeIndices.clear();
}
void Alloc(D3D12_CPU_DESCRIPTOR_HANDLE* out_cpu_desc_handle, D3D12_GPU_DESCRIPTOR_HANDLE* out_gpu_desc_handle)
{
IM_ASSERT(FreeIndices.Size > 0);
int idx = FreeIndices.back();
FreeIndices.pop_back();
out_cpu_desc_handle->ptr = HeapStartCpu.ptr + (idx * HeapHandleIncrement);
out_gpu_desc_handle->ptr = HeapStartGpu.ptr + (idx * HeapHandleIncrement);
}
void Free(D3D12_CPU_DESCRIPTOR_HANDLE out_cpu_desc_handle, D3D12_GPU_DESCRIPTOR_HANDLE out_gpu_desc_handle)
{
int cpu_idx = (int)((out_cpu_desc_handle.ptr - HeapStartCpu.ptr) / HeapHandleIncrement);
int gpu_idx = (int)((out_gpu_desc_handle.ptr - HeapStartGpu.ptr) / HeapHandleIncrement);
IM_ASSERT(cpu_idx == gpu_idx);
FreeIndices.push_back(cpu_idx);
}
ID3D12CommandAllocator* CommandAllocator;
UINT64 FenceValue;
};
// Data
static FrameContext g_frameContext[APP_NUM_FRAMES_IN_FLIGHT] = {};
static int const NUM_FRAMES_IN_FLIGHT = 3;
static FrameContext g_frameContext[NUM_FRAMES_IN_FLIGHT] = {};
static UINT g_frameIndex = 0;
static int const NUM_BACK_BUFFERS = 3;
static ID3D12Device* g_pd3dDevice = nullptr;
static ID3D12DescriptorHeap* g_pd3dRtvDescHeap = nullptr;
static ID3D12DescriptorHeap* g_pd3dSrvDescHeap = nullptr;
static ExampleDescriptorHeapAllocator g_pd3dSrvDescHeapAlloc;
static ID3D12CommandQueue* g_pd3dCommandQueue = nullptr;
static ID3D12GraphicsCommandList* g_pd3dCommandList = nullptr;
static ID3D12Fence* g_fence = nullptr;
@ -94,8 +47,8 @@ static UINT64 g_fenceLastSignaledValue = 0;
static IDXGISwapChain3* g_pSwapChain = nullptr;
static bool g_SwapChainOccluded = false;
static HANDLE g_hSwapChainWaitableObject = nullptr;
static ID3D12Resource* g_mainRenderTargetResource[APP_NUM_BACK_BUFFERS] = {};
static D3D12_CPU_DESCRIPTOR_HANDLE g_mainRenderTargetDescriptor[APP_NUM_BACK_BUFFERS] = {};
static ID3D12Resource* g_mainRenderTargetResource[NUM_BACK_BUFFERS] = {};
static D3D12_CPU_DESCRIPTOR_HANDLE g_mainRenderTargetDescriptor[NUM_BACK_BUFFERS] = {};
// Forward declarations of helper functions
bool CreateDeviceD3D(HWND hWnd);
@ -140,18 +93,10 @@ int main(int, char**)
// Setup Platform/Renderer backends
ImGui_ImplWin32_Init(hwnd);
ImGui_ImplDX12_InitInfo init_info = {};
init_info.Device = g_pd3dDevice;
init_info.CommandQueue = g_pd3dCommandQueue;
init_info.NumFramesInFlight = APP_NUM_FRAMES_IN_FLIGHT;
init_info.RTVFormat = DXGI_FORMAT_R8G8B8A8_UNORM;
// Allocating SRV descriptors (for textures) is up to the application, so we provide callbacks.
// (current version of the backend will only allocate one descriptor, future versions will need to allocate more)
init_info.SrvDescriptorHeap = g_pd3dSrvDescHeap;
init_info.SrvDescriptorAllocFn = [](ImGui_ImplDX12_InitInfo*, D3D12_CPU_DESCRIPTOR_HANDLE* out_cpu_handle, D3D12_GPU_DESCRIPTOR_HANDLE* out_gpu_handle) { return g_pd3dSrvDescHeapAlloc.Alloc(out_cpu_handle, out_gpu_handle); };
init_info.SrvDescriptorFreeFn = [](ImGui_ImplDX12_InitInfo*, D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle, D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle) { return g_pd3dSrvDescHeapAlloc.Free(cpu_handle, gpu_handle); };
ImGui_ImplDX12_Init(&init_info);
ImGui_ImplDX12_Init(g_pd3dDevice, NUM_FRAMES_IN_FLIGHT,
DXGI_FORMAT_R8G8B8A8_UNORM, g_pd3dSrvDescHeap,
g_pd3dSrvDescHeap->GetCPUDescriptorHandleForHeapStart(),
g_pd3dSrvDescHeap->GetGPUDescriptorHandleForHeapStart());
// Load Fonts
// - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
@ -304,7 +249,7 @@ bool CreateDeviceD3D(HWND hWnd)
DXGI_SWAP_CHAIN_DESC1 sd;
{
ZeroMemory(&sd, sizeof(sd));
sd.BufferCount = APP_NUM_BACK_BUFFERS;
sd.BufferCount = NUM_BACK_BUFFERS;
sd.Width = 0;
sd.Height = 0;
sd.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
@ -347,7 +292,7 @@ bool CreateDeviceD3D(HWND hWnd)
{
D3D12_DESCRIPTOR_HEAP_DESC desc = {};
desc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_RTV;
desc.NumDescriptors = APP_NUM_BACK_BUFFERS;
desc.NumDescriptors = NUM_BACK_BUFFERS;
desc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE;
desc.NodeMask = 1;
if (g_pd3dDevice->CreateDescriptorHeap(&desc, IID_PPV_ARGS(&g_pd3dRtvDescHeap)) != S_OK)
@ -355,7 +300,7 @@ bool CreateDeviceD3D(HWND hWnd)
SIZE_T rtvDescriptorSize = g_pd3dDevice->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_RTV);
D3D12_CPU_DESCRIPTOR_HANDLE rtvHandle = g_pd3dRtvDescHeap->GetCPUDescriptorHandleForHeapStart();
for (UINT i = 0; i < APP_NUM_BACK_BUFFERS; i++)
for (UINT i = 0; i < NUM_BACK_BUFFERS; i++)
{
g_mainRenderTargetDescriptor[i] = rtvHandle;
rtvHandle.ptr += rtvDescriptorSize;
@ -365,11 +310,10 @@ bool CreateDeviceD3D(HWND hWnd)
{
D3D12_DESCRIPTOR_HEAP_DESC desc = {};
desc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV;
desc.NumDescriptors = APP_SRV_HEAP_SIZE;
desc.NumDescriptors = 1;
desc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE;
if (g_pd3dDevice->CreateDescriptorHeap(&desc, IID_PPV_ARGS(&g_pd3dSrvDescHeap)) != S_OK)
return false;
g_pd3dSrvDescHeapAlloc.Create(g_pd3dDevice, g_pd3dSrvDescHeap);
}
{
@ -381,7 +325,7 @@ bool CreateDeviceD3D(HWND hWnd)
return false;
}
for (UINT i = 0; i < APP_NUM_FRAMES_IN_FLIGHT; i++)
for (UINT i = 0; i < NUM_FRAMES_IN_FLIGHT; i++)
if (g_pd3dDevice->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&g_frameContext[i].CommandAllocator)) != S_OK)
return false;
@ -407,7 +351,7 @@ bool CreateDeviceD3D(HWND hWnd)
return false;
swapChain1->Release();
dxgiFactory->Release();
g_pSwapChain->SetMaximumFrameLatency(APP_NUM_BACK_BUFFERS);
g_pSwapChain->SetMaximumFrameLatency(NUM_BACK_BUFFERS);
g_hSwapChainWaitableObject = g_pSwapChain->GetFrameLatencyWaitableObject();
}
@ -420,7 +364,7 @@ void CleanupDeviceD3D()
CleanupRenderTarget();
if (g_pSwapChain) { g_pSwapChain->SetFullscreenState(false, nullptr); g_pSwapChain->Release(); g_pSwapChain = nullptr; }
if (g_hSwapChainWaitableObject != nullptr) { CloseHandle(g_hSwapChainWaitableObject); }
for (UINT i = 0; i < APP_NUM_FRAMES_IN_FLIGHT; i++)
for (UINT i = 0; i < NUM_FRAMES_IN_FLIGHT; i++)
if (g_frameContext[i].CommandAllocator) { g_frameContext[i].CommandAllocator->Release(); g_frameContext[i].CommandAllocator = nullptr; }
if (g_pd3dCommandQueue) { g_pd3dCommandQueue->Release(); g_pd3dCommandQueue = nullptr; }
if (g_pd3dCommandList) { g_pd3dCommandList->Release(); g_pd3dCommandList = nullptr; }
@ -442,7 +386,7 @@ void CleanupDeviceD3D()
void CreateRenderTarget()
{
for (UINT i = 0; i < APP_NUM_BACK_BUFFERS; i++)
for (UINT i = 0; i < NUM_BACK_BUFFERS; i++)
{
ID3D12Resource* pBackBuffer = nullptr;
g_pSwapChain->GetBuffer(i, IID_PPV_ARGS(&pBackBuffer));
@ -455,13 +399,13 @@ void CleanupRenderTarget()
{
WaitForLastSubmittedFrame();
for (UINT i = 0; i < APP_NUM_BACK_BUFFERS; i++)
for (UINT i = 0; i < NUM_BACK_BUFFERS; i++)
if (g_mainRenderTargetResource[i]) { g_mainRenderTargetResource[i]->Release(); g_mainRenderTargetResource[i] = nullptr; }
}
void WaitForLastSubmittedFrame()
{
FrameContext* frameCtx = &g_frameContext[g_frameIndex % APP_NUM_FRAMES_IN_FLIGHT];
FrameContext* frameCtx = &g_frameContext[g_frameIndex % NUM_FRAMES_IN_FLIGHT];
UINT64 fenceValue = frameCtx->FenceValue;
if (fenceValue == 0)
@ -483,7 +427,7 @@ FrameContext* WaitForNextFrameResources()
HANDLE waitableObjects[] = { g_hSwapChainWaitableObject, nullptr };
DWORD numWaitableObjects = 1;
FrameContext* frameCtx = &g_frameContext[nextFrameIndex % APP_NUM_FRAMES_IN_FLIGHT];
FrameContext* frameCtx = &g_frameContext[nextFrameIndex % NUM_FRAMES_IN_FLIGHT];
UINT64 fenceValue = frameCtx->FenceValue;
if (fenceValue != 0) // means no fence was signaled
{

View File

@ -0,0 +1,7 @@
project "imgui"
kind "StaticLib"
files { "../*.h", "../*.cpp" }
vpaths { ["imgui"] = { "../*.cpp", "../*.h", "../misc/debuggers/*.natvis" } }
filter { "toolset:msc*" }
files { "../misc/debuggers/*.natvis" }

322
examples/premake5.lua Normal file
View File

@ -0,0 +1,322 @@
-- We use Premake5 to generate project files (Visual Studio solutions, XCode solutions, Makefiles, etc.)
-- Download Premake5: at https://premake.github.io/download
-- YOU NEED PREMAKE 5.0.0-alpha10 or later
--------- HELP
-- To reduce friction for people who don't aren't used to Premake, we list some concrete usage examples.
if _ACTION == nil then
print "-----------------------------------------"
print " DEAR IMGUI EXAMPLES - PROJECT GENERATOR"
print "-----------------------------------------"
print "Usage:"
print " premake5 [generator] [options]"
print "Examples:"
print " premake5 vs2010"
print " premake5 vs2019 --with-sdl2 --with-vulkan"
print " premake5 xcode4 --with-glfw"
print " premake5 gmake2 --with-glfw --cc=clang"
print "Generators:"
print " codelite gmake gmake2 vs2008 vs2010 vs2012 vs2013 vs2015 vs2017 xcode4 etc."
print "Options:"
print " --with-dx9 Enable dear imgui DirectX 9 example"
print " --with-dx10 Enable dear imgui DirectX 10 example"
print " --with-dx11 Enable dear imgui DirectX 11 example"
print " --with-dx12 Enable dear imgui DirectX 12 example (vs2015+)"
print " --with-glfw Enable dear imgui GLFW examples"
print " --with-sdl2 Enable dear imgui SDL2 examples"
print " --with-vulkan Enable dear imgui Vulkan example"
print " --cc=clang Compile with Clang"
print " --cc=gcc Compile with GCC"
print "Project and object files will be created in the build/ folder. You can delete your build/ folder at any time."
print ""
end
---------- OPTIONS
newoption { trigger = "with-dx9", description="Enable dear imgui DirectX 9 example" }
newoption { trigger = "with-dx10", description="Enable dear imgui DirectX 10 example" }
newoption { trigger = "with-dx11", description="Enable dear imgui DirectX 11 example" }
newoption { trigger = "with-dx12", description="Enable dear imgui DirectX 12 example" }
newoption { trigger = "with-glfw", description="Enable dear imgui GLFW examples" }
newoption { trigger = "with-sdl2", description="Enable dear imgui SDL2 examples" }
newoption { trigger = "with-vulkan", description="Enable dear imgui Vulkan example" }
-- Enable/detect default options under Windows
if _ACTION ~= nil and ((os.istarget ~= nil and os.istarget("windows")) or (os.is ~= nil and os.is("windows"))) then
print("( enabling --with-dx9 )");
print("( enabling --with-dx10 )");
print("( enabling --with-dx11 )");
_OPTIONS["with-dx9"] = 1
_OPTIONS["with-dx10"] = 1
_OPTIONS["with-dx11"] = 1
if _ACTION >= "vs2015" then
print("( enabling --with-dx12 because compiler is " .. _ACTION .. " )");
_OPTIONS["with-dx12"] = 1
end
print("( enabling --with-glfw because GLFW is included in the libs/ folder )");
_OPTIONS["with-glfw"] = 1
if os.getenv("SDL2_DIR") then
print("( enabling --with-sdl2 because SDL2_DIR environment variable was found )");
_OPTIONS["with-sdl2"] = 1
end
if os.getenv("VULKAN_SDK") then
print("( enabling --with-vulkan because VULKAN_SDK environment variable was found )");
_OPTIONS["with-vulkan"] = 1
end
end
--------- HELPER FUNCTIONS
-- Helper function: add dear imgui source files into project
function imgui_as_src(fs_path, project_path)
if (project_path == nil) then project_path = fs_path; end; -- default to same virtual folder as the file system folder (in this project it would be ".." !)
files { fs_path .. "/*.cpp", fs_path .. "/*.h" }
includedirs { fs_path, fs_path .. "/backends" }
vpaths { [project_path] = { fs_path .. "/*.*", fs_path .. "/misc/debuggers/*.natvis" } } -- add in a specific folder of the Visual Studio project
filter { "toolset:msc*" }
files { fs_path .. "/misc/debuggers/*.natvis" }
filter {}
end
-- Helper function: add dear imgui as a library (uncomment the 'include "premake5-lib"' line)
--include "premake5-lib"
function imgui_as_lib(fs_path)
includedirs { fs_path, fs_path .. "/backends" }
links "imgui"
end
--------- SOLUTION, PROJECTS
workspace "imgui_examples"
configurations { "Debug", "Release" }
platforms { "x86", "x86_64" }
location "build/"
symbols "On"
warnings "Extra"
--flags { "FatalCompileWarnings"}
filter { "configurations:Debug" }
optimize "Off"
filter { "configurations:Release" }
optimize "On"
filter { "toolset:clang", "system:windows" }
buildoptions { "-Xclang", "-flto-visibility-public-std" } -- Remove "warning LNK4049: locally defined symbol ___std_terminate imported"
-- example_win32_directx11 (Win32 + DirectX 11)
-- We have DX11 as the first project because this is what Visual Studio uses
if (_OPTIONS["with-dx11"]) then
project "example_win32_directx11"
kind "ConsoleApp"
imgui_as_src ("..", "imgui")
--imgui_as_lib ("..")
files { "../backends/imgui_impl_win32.*", "../backends/imgui_impl_dx11.*", "example_win32_directx11/*.cpp", "example_win32_directx11/*.h", "README.txt" }
vpaths { ["sources"] = "./**" }
filter { "system:windows", "toolset:msc-v80 or msc-v90 or msc-v100" }
includedirs { "$(DXSDK_DIR)/Include" }
filter { "system:windows", "toolset:msc-v80 or msc-v90 or msc-v100", "platforms:x86" }
libdirs { "$(DXSDK_DIR)/Lib/x86" }
filter { "system:windows", "toolset:msc-v80 or msc-v90 or msc-v100", "platforms:x86_64" }
libdirs { "$(DXSDK_DIR)/Lib/x64" }
filter { "system:windows" }
links { "d3d11", "d3dcompiler", "dxgi" }
end
-- example_win32_directx9 (Win32 + DirectX 9)
if (_OPTIONS["with-dx9"]) then
project "example_win32_directx9"
kind "ConsoleApp"
imgui_as_src ("..", "imgui")
--imgui_as_lib ("..")
files { "../backends/imgui_impl_win32.*", "../backends/imgui_impl_dx9.*", "example_win32_directx9/*.cpp", "example_win32_directx9/*.h", "README.txt" }
vpaths { ["sources"] = "./**" }
filter { "system:windows" }
links { "d3d9" }
end
-- example_win32_directx10 (Win32 + DirectX 10)
if (_OPTIONS["with-dx10"]) then
project "example_win32_directx10"
kind "ConsoleApp"
imgui_as_src ("..", "imgui")
--imgui_as_lib ("..")
files { "../backends/imgui_impl_win32.*", "../backends/imgui_impl_dx10.*", "example_win32_directx10/*.cpp", "example_win32_directx10/*.h", "README.txt" }
vpaths { ["sources"] = "./**" }
filter { "system:windows", "toolset:msc-v80 or msc-v90 or msc-v100" }
includedirs { "$(DXSDK_DIR)/Include" }
filter { "system:windows", "toolset:msc-v80 or msc-v90 or msc-v100", "platforms:x86" }
libdirs { "$(DXSDK_DIR)/Lib/x86" }
filter { "system:windows", "toolset:msc-v80 or msc-v90 or msc-v100", "platforms:x86_64" }
libdirs { "$(DXSDK_DIR)/Lib/x64" }
filter { "system:windows" }
links { "d3d10", "d3dcompiler", "dxgi" }
end
-- example_win32_directx12 (Win32 + DirectX 12)
if (_OPTIONS["with-dx12"]) then
project "example_win32_directx12"
kind "ConsoleApp"
systemversion "10.0.16299.0"
imgui_as_src ("..", "imgui")
--imgui_as_lib ("..")
files { "../backends/imgui_impl_win32.*", "../backends/imgui_impl_dx12.*", "example_win32_directx12/*.cpp", "example_win32_directx12/*.h", "README.txt" }
vpaths { ["sources"] = "./**" }
filter { "system:windows" }
links { "d3d12", "d3dcompiler", "dxgi" }
end
-- example_glfw_opengl2 (GLFW + OpenGL2)
if (_OPTIONS["with-glfw"]) then
project "example_glfw_opengl2"
kind "ConsoleApp"
imgui_as_src ("..", "imgui")
--imgui_as_lib ("..")
files { "../backends/imgui_impl_glfw.*", "../backends/imgui_impl_opengl2.*", "example_glfw_opengl2/*.h", "example_glfw_opengl2/*.cpp", "README.txt"}
vpaths { ["sources"] = "./**" }
includedirs { "libs/glfw/include" }
filter { "system:windows", "platforms:x86" }
libdirs { "libs/glfw/lib-vc2010-32" }
filter { "system:windows", "platforms:x86_64" }
libdirs { "libs/glfw/lib-vc2010-64" }
filter { "system:windows" }
ignoredefaultlibraries { "msvcrt" }
links { "opengl32", "glfw3" }
filter { "system:linux" }
links { "glfw3" }
filter { "system:macosx" }
libdirs { "/usr/local/lib" }
links { "glfw" }
linkoptions { "-framework OpenGL" }
end
-- example_glfw_opengl3 (GLFW + OpenGL3)
if (_OPTIONS["with-glfw"]) then
project "example_glfw_opengl3"
kind "ConsoleApp"
imgui_as_src ("..", "imgui")
--imgui_as_lib ("..")
vpaths { ["sources"] = "./**" }
files { "../backends/imgui_impl_glfw.*", "../backends/imgui_impl_opengl3.*", "example_glfw_opengl3/*.h", "example_glfw_opengl3/*.cpp", "./README.txt" }
includedirs { "libs/glfw/include" }
filter { "system:windows", "platforms:x86" }
libdirs { "libs/glfw/lib-vc2010-32" }
filter { "system:windows", "platforms:x86_64" }
libdirs { "libs/glfw/lib-vc2010-64" }
filter { "system:windows" }
ignoredefaultlibraries { "msvcrt" }
links { "opengl32", "glfw3" }
filter { "system:linux" }
links { "glfw3" }
filter { "system:macosx" }
libdirs { "/usr/local/lib" }
links { "glfw" }
linkoptions { "-framework OpenGL" }
end
-- example_glfw_vulkan (GLFW + Vulkan)
if (_OPTIONS["with-vulkan"]) then
project "example_glfw_vulkan"
kind "ConsoleApp"
imgui_as_src ("..", "imgui")
--imgui_as_lib ("..")
vpaths { ["sources"] = "./**" }
files { "../backends/imgui_impl_glfw*", "../backends/imgui_impl_vulkan.*", "example_glfw_vulkan/*.h", "example_glfw_vulkan/*.cpp", "./README.txt" }
includedirs { "libs/glfw/include", "%VULKAN_SDK%/include" }
filter { "system:windows", "platforms:x86" }
libdirs { "libs/glfw/lib-vc2010-32", "%VULKAN_SDK%/lib32" }
filter { "system:windows", "platforms:x86_64" }
libdirs { "libs/glfw/lib-vc2010-64", "%VULKAN_SDK%/lib" }
filter { "system:windows" }
ignoredefaultlibraries { "msvcrt" }
links { "vulkan-1", "glfw3" }
filter { "system:linux" }
links { "glfw3" } -- FIXME: missing Vulkan. missing macosx version
end
-- example_null (no rendering)
if (true) then
project "example_null"
kind "ConsoleApp"
imgui_as_src ("..", "imgui")
--imgui_as_lib ("..")
vpaths { ["sources"] = "./**" }
files { "example_null/*.h", "example_null/*.cpp", "./README.txt" }
filter { "system:windows" }
ignoredefaultlibraries { "msvcrt" }
end
-- example_sdl2_sdlrenderer2 (SDL2 + SDL_Renderer)
if (_OPTIONS["with-sdl2"]) then
project "example_sdl2_sdlrenderer2"
kind "ConsoleApp"
imgui_as_src ("..", "imgui")
--imgui_as_lib ("..")
vpaths { ["sources"] = "./**" }
files { "../backends/imgui_impl_sdl2*", "../backends/imgui_impl_sdlrenderer2.*", "example_sdl2_sdlrenderer2/*.h", "example_sdl2_sdlrenderer2/*.cpp", "./README.txt" }
includedirs { "%SDL2_DIR%/include" }
filter { "system:windows", "platforms:x86" }
libdirs { "%SDL2_DIR%/lib/x86" }
filter { "system:windows", "platforms:x86_64" }
libdirs { "%SDL2_DIR%/lib/x64" }
filter { "system:windows" }
ignoredefaultlibraries { "msvcrt" }
links { "SDL2", "SDL2main" }
end
-- example_sdl2_opengl2 (SDL2 + OpenGL2)
if (_OPTIONS["with-sdl2"]) then
project "example_sdl2_opengl2"
kind "ConsoleApp"
imgui_as_src ("..", "imgui")
--imgui_as_lib ("..")
vpaths { ["sources"] = "./**" }
files { "../backends/imgui_impl_sdl2*", "../backends/imgui_impl_opengl2.*", "example_sdl2_opengl2/*.h", "example_sdl2_opengl2/*.cpp", "./README.txt" }
includedirs { "%SDL2_DIR%/include" }
filter { "system:windows", "platforms:x86" }
libdirs { "%SDL2_DIR%/lib/x86" }
filter { "system:windows", "platforms:x86_64" }
libdirs { "%SDL2_DIR%/lib/x64" }
filter { "system:windows" }
ignoredefaultlibraries { "msvcrt" }
links { "SDL2", "SDL2main", "opengl32" }
end
-- example_sdl2_opengl3 (SDL2 + OpenGL3)
if (_OPTIONS["with-sdl2"]) then
project "example_sdl2_opengl3"
kind "ConsoleApp"
imgui_as_src ("..", "imgui")
--imgui_as_lib ("..")
vpaths { ["sources"] = "./**" }
files { "../backends/imgui_impl_sdl2*", "../backends/imgui_impl_opengl3.*", "example_sdl2_opengl3/*.h", "example_sdl2_opengl3/*.cpp", "./README.txt" }
includedirs { "%SDL2_DIR%/include" }
filter { "system:windows", "platforms:x86" }
libdirs { "%SDL2_DIR%/lib/x86" }
filter { "system:windows", "platforms:x86_64" }
libdirs { "%SDL2_DIR%/lib/x64" }
filter { "system:windows" }
ignoredefaultlibraries { "msvcrt" }
links { "SDL2", "SDL2main", "opengl32" }
end
-- example_sdl2_vulkan (SDL2 + Vulkan)
if (_OPTIONS["with-sdl2"] and _OPTIONS["with-vulkan"]) then
project "example_sdl2_vulkan"
kind "ConsoleApp"
imgui_as_src ("..", "imgui")
--imgui_as_lib ("..")
vpaths { ["sources"] = "./**" }
files { "../backends/imgui_impl_sdl2*", "../backends/imgui_impl_vulkan.*", "example_sdl2_vulkan/*.h", "example_sdl2_vulkan/*.cpp", "./README.txt" }
includedirs { "%SDL2_DIR%/include", "%VULKAN_SDK%/include" }
filter { "system:windows", "platforms:x86" }
libdirs { "%SDL2_DIR%/lib/x86", "%VULKAN_SDK%/lib32" }
filter { "system:windows", "platforms:x86_64" }
libdirs { "%SDL2_DIR%/lib/x64", "%VULKAN_SDK%/lib" }
filter { "system:windows" }
ignoredefaultlibraries { "msvcrt" }
links { "SDL2", "SDL2main", "vulkan-1" }
end

View File

@ -1,4 +1,4 @@
// dear imgui, v1.91.6 WIP
// dear imgui, v1.91.5
// (main code and documentation)
// Help:
@ -5788,7 +5788,7 @@ bool ImGui::IsItemDeactivatedAfterEdit()
return IsItemDeactivated() && (g.ActiveIdPreviousFrameHasBeenEditedBefore || (g.ActiveId == 0 && g.ActiveIdHasBeenEditedBefore));
}
// == (GetItemID() == GetFocusID() && GetFocusID() != 0)
// == GetItemID() == GetFocusID()
bool ImGui::IsItemFocused()
{
ImGuiContext& g = *GImGui;
@ -10542,7 +10542,7 @@ bool ImGui::ErrorLog(const char* msg)
// Output to tooltip
if (g.IO.ConfigErrorRecoveryEnableTooltip)
{
if (g.WithinFrameScope && BeginErrorTooltip())
if (BeginErrorTooltip())
{
if (g.ErrorCountCurrentFrame < 20)
{
@ -10579,7 +10579,7 @@ void ImGui::ErrorCheckEndFrameFinalizeErrorTooltip()
BulletText("Code should use PushID()/PopID() in loops, or append \"##xx\" to same-label identifiers!");
BulletText("Empty label e.g. Button(\"\") == same ID as parent widget/node. Use Button(\"##xx\") instead!");
//BulletText("Code intending to use duplicate ID may use e.g. PushItemFlag(ImGuiItemFlags_AllowDuplicateId, true); ... PopItemFlag()"); // Not making this too visible for fear of it being abused.
BulletText("Set io.ConfigDebugHighlightIdConflicts=false to disable this warning in non-programmers builds.");
BulletText("Set io.ConfigDebugDetectIdConflicts=false to disable this warning in non-programmers builds.");
Separator();
Text("(Hold CTRL to: use");
SameLine();

View File

@ -1,4 +1,4 @@
// dear imgui, v1.91.6 WIP
// dear imgui, v1.91.5
// (headers)
// Help:
@ -28,8 +28,8 @@
// Library Version
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
#define IMGUI_VERSION "1.91.6 WIP"
#define IMGUI_VERSION_NUM 19151
#define IMGUI_VERSION "1.91.5"
#define IMGUI_VERSION_NUM 19150
#define IMGUI_HAS_TABLE
/*

View File

@ -1,4 +1,4 @@
// dear imgui, v1.91.6 WIP
// dear imgui, v1.91.5
// (demo code)
// Help:

View File

@ -1,4 +1,4 @@
// dear imgui, v1.91.6 WIP
// dear imgui, v1.91.5
// (drawing and font code)
/*

View File

@ -1,4 +1,4 @@
// dear imgui, v1.91.6 WIP
// dear imgui, v1.91.5
// (internal structures/api)
// You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility.

View File

@ -1,4 +1,4 @@
// dear imgui, v1.91.6 WIP
// dear imgui, v1.91.5
// (tables and columns code)
/*

View File

@ -1,4 +1,4 @@
// dear imgui, v1.91.6 WIP
// dear imgui, v1.91.5
// (widgets code)
/*