diff --git a/ImGui/impls/imgui_impl_opengl3.cpp b/ImGui/impls/imgui_impl_opengl3.cpp index 9585215..86eadcf 100644 --- a/ImGui/impls/imgui_impl_opengl3.cpp +++ b/ImGui/impls/imgui_impl_opengl3.cpp @@ -63,7 +63,7 @@ #define _CRT_SECURE_NO_WARNINGS #endif -#include "imgui.h" +#include "../imgui.h" #include "imgui_impl_opengl3.h" #include #if defined(_MSC_VER) && _MSC_VER <= 1500 // MSVC 2008 or earlier @@ -162,10 +162,12 @@ void ImGui_ImplOpenGL3_Shutdown() ImGui_ImplOpenGL3_DestroyDeviceObjects(); } -void ImGui_ImplOpenGL3_NewFrame() +bool ImGui_ImplOpenGL3_NewFrame() { if (!g_FontTexture) - ImGui_ImplOpenGL3_CreateDeviceObjects(); + return ImGui_ImplOpenGL3_CreateDeviceObjects(); + + return true; } static void ImGui_ImplOpenGL3_SetupRenderState(ImDrawData* draw_data, int fb_width, int fb_height, GLuint vertex_array_object) diff --git a/ImGui/impls/imgui_impl_opengl3.h b/ImGui/impls/imgui_impl_opengl3.h index 0f7eef7..49d13d8 100644 --- a/ImGui/impls/imgui_impl_opengl3.h +++ b/ImGui/impls/imgui_impl_opengl3.h @@ -37,7 +37,7 @@ IMGUI_IMPL_API bool ImGui_ImplOpenGL3_Init(const char* glsl_version = NULL); IMGUI_IMPL_API void ImGui_ImplOpenGL3_Shutdown(); -IMGUI_IMPL_API void ImGui_ImplOpenGL3_NewFrame(); +IMGUI_IMPL_API bool ImGui_ImplOpenGL3_NewFrame(); IMGUI_IMPL_API void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData* draw_data); // Called by Init/NewFrame/Shutdown diff --git a/ImGui/impls/windows/imgui_impl_dx10.cpp b/ImGui/impls/windows/imgui_impl_dx10.cpp index ee8b3d6..b68eed9 100644 --- a/ImGui/impls/windows/imgui_impl_dx10.cpp +++ b/ImGui/impls/windows/imgui_impl_dx10.cpp @@ -548,8 +548,10 @@ void ImGui_ImplDX10_Shutdown() if (g_pd3dDevice) { g_pd3dDevice->Release(); g_pd3dDevice = NULL; } } -void ImGui_ImplDX10_NewFrame() +bool ImGui_ImplDX10_NewFrame() { if (!g_pFontSampler) - ImGui_ImplDX10_CreateDeviceObjects(); + return ImGui_ImplDX10_CreateDeviceObjects(); + + return true; } diff --git a/ImGui/impls/windows/imgui_impl_dx10.h b/ImGui/impls/windows/imgui_impl_dx10.h index db156e1..bbe4090 100644 --- a/ImGui/impls/windows/imgui_impl_dx10.h +++ b/ImGui/impls/windows/imgui_impl_dx10.h @@ -15,7 +15,7 @@ struct ID3D10Device; IMGUI_IMPL_API bool ImGui_ImplDX10_Init(ID3D10Device* device); IMGUI_IMPL_API void ImGui_ImplDX10_Shutdown(); -IMGUI_IMPL_API void ImGui_ImplDX10_NewFrame(); +IMGUI_IMPL_API bool ImGui_ImplDX10_NewFrame(); IMGUI_IMPL_API void ImGui_ImplDX10_RenderDrawData(ImDrawData* draw_data); // Use if you want to reset your rendering device without losing ImGui state. diff --git a/ImGui/impls/windows/imgui_impl_dx11.cpp b/ImGui/impls/windows/imgui_impl_dx11.cpp index 641d4c8..39bc88b 100644 --- a/ImGui/impls/windows/imgui_impl_dx11.cpp +++ b/ImGui/impls/windows/imgui_impl_dx11.cpp @@ -556,8 +556,10 @@ void ImGui_ImplDX11_Shutdown() if (g_pd3dDeviceContext) { g_pd3dDeviceContext->Release(); g_pd3dDeviceContext = NULL; } } -void ImGui_ImplDX11_NewFrame() +bool ImGui_ImplDX11_NewFrame() { if (!g_pFontSampler) - ImGui_ImplDX11_CreateDeviceObjects(); + return ImGui_ImplDX11_CreateDeviceObjects(); + + return true; } diff --git a/ImGui/impls/windows/imgui_impl_dx11.h b/ImGui/impls/windows/imgui_impl_dx11.h index 1741a5d..24280b1 100644 --- a/ImGui/impls/windows/imgui_impl_dx11.h +++ b/ImGui/impls/windows/imgui_impl_dx11.h @@ -16,7 +16,7 @@ struct ID3D11DeviceContext; IMGUI_IMPL_API bool ImGui_ImplDX11_Init(ID3D11Device* device, ID3D11DeviceContext* device_context); IMGUI_IMPL_API void ImGui_ImplDX11_Shutdown(); -IMGUI_IMPL_API void ImGui_ImplDX11_NewFrame(); +IMGUI_IMPL_API bool ImGui_ImplDX11_NewFrame(); IMGUI_IMPL_API void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data); // Use if you want to reset your rendering device without losing ImGui state. diff --git a/ImGui/impls/windows/imgui_impl_dx12.cpp b/ImGui/impls/windows/imgui_impl_dx12.cpp index c529a25..7a60a1f 100644 --- a/ImGui/impls/windows/imgui_impl_dx12.cpp +++ b/ImGui/impls/windows/imgui_impl_dx12.cpp @@ -668,8 +668,10 @@ void ImGui_ImplDX12_Shutdown() g_frameIndex = UINT_MAX; } -void ImGui_ImplDX12_NewFrame() +bool ImGui_ImplDX12_NewFrame() { if (!g_pPipelineState) - ImGui_ImplDX12_CreateDeviceObjects(); + return ImGui_ImplDX12_CreateDeviceObjects(); + + return true; } diff --git a/ImGui/impls/windows/imgui_impl_dx12.h b/ImGui/impls/windows/imgui_impl_dx12.h index 8ae75e5..c570997 100644 --- a/ImGui/impls/windows/imgui_impl_dx12.h +++ b/ImGui/impls/windows/imgui_impl_dx12.h @@ -26,7 +26,7 @@ struct D3D12_GPU_DESCRIPTOR_HANDLE; IMGUI_IMPL_API bool ImGui_ImplDX12_Init(ID3D12Device* device, int num_frames_in_flight, DXGI_FORMAT rtv_format, 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 bool ImGui_ImplDX12_NewFrame(); IMGUI_IMPL_API void ImGui_ImplDX12_RenderDrawData(ImDrawData* draw_data, ID3D12GraphicsCommandList* graphics_command_list); // Use if you want to reset your rendering device without losing ImGui state. diff --git a/ImGui/impls/windows/imgui_impl_dx9.cpp b/ImGui/impls/windows/imgui_impl_dx9.cpp index 99c497e..2c3ccf3 100644 --- a/ImGui/impls/windows/imgui_impl_dx9.cpp +++ b/ImGui/impls/windows/imgui_impl_dx9.cpp @@ -277,8 +277,10 @@ void ImGui_ImplDX9_InvalidateDeviceObjects() if (g_FontTexture) { g_FontTexture->Release(); g_FontTexture = NULL; ImGui::GetIO().Fonts->TexID = NULL; } // We copied g_pFontTextureView to io.Fonts->TexID so let's clear that as well. } -void ImGui_ImplDX9_NewFrame() +bool ImGui_ImplDX9_NewFrame() { if (!g_FontTexture) - ImGui_ImplDX9_CreateDeviceObjects(); + return ImGui_ImplDX9_CreateDeviceObjects(); + + return true; } diff --git a/ImGui/impls/windows/imgui_impl_dx9.h b/ImGui/impls/windows/imgui_impl_dx9.h index 1eaea87..afc00ec 100644 --- a/ImGui/impls/windows/imgui_impl_dx9.h +++ b/ImGui/impls/windows/imgui_impl_dx9.h @@ -15,7 +15,7 @@ struct IDirect3DDevice9; IMGUI_IMPL_API bool ImGui_ImplDX9_Init(IDirect3DDevice9* device); IMGUI_IMPL_API void ImGui_ImplDX9_Shutdown(); -IMGUI_IMPL_API void ImGui_ImplDX9_NewFrame(); +IMGUI_IMPL_API bool ImGui_ImplDX9_NewFrame(); IMGUI_IMPL_API void ImGui_ImplDX9_RenderDrawData(ImDrawData* draw_data); // Use if you want to reset your rendering device without losing ImGui state.