mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-23 20:38:07 +01:00
Put back the if new frame for overlay.
This commit is contained in:
parent
671277a154
commit
cfff531a23
15 changed files with 26 additions and 25 deletions
|
@ -221,10 +221,11 @@ void ImGui_ImplOpenGL3_Shutdown()
|
|||
ImGui_ImplOpenGL3_DestroyDeviceObjects();
|
||||
}
|
||||
|
||||
void ImGui_ImplOpenGL3_NewFrame()
|
||||
bool ImGui_ImplOpenGL3_NewFrame()
|
||||
{
|
||||
if (!g_ShaderHandle)
|
||||
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)
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
// Backend API
|
||||
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);
|
||||
|
||||
// (Optional) Called by Init/NewFrame/Shutdown
|
||||
|
|
|
@ -467,8 +467,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;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,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 Dear ImGui state.
|
||||
|
|
|
@ -595,8 +595,9 @@ 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;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,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 Dear ImGui state.
|
||||
|
|
|
@ -634,8 +634,9 @@ 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;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ struct D3D12_GPU_DESCRIPTOR_HANDLE;
|
|||
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 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 Dear ImGui state.
|
||||
|
|
|
@ -277,8 +277,9 @@ 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;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,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 Dear ImGui state.
|
||||
|
|
|
@ -80,8 +80,7 @@ void DX10_Hook::prepareForOverlay(IDXGISwapChain* pSwapChain)
|
|||
initialized = true;
|
||||
}
|
||||
|
||||
ImGui_ImplDX10_NewFrame();
|
||||
|
||||
if (ImGui_ImplDX10_NewFrame())
|
||||
{
|
||||
Windows_Hook::Inst()->prepareForOverlay(desc.OutputWindow);
|
||||
|
||||
|
|
|
@ -121,8 +121,7 @@ void DX11_Hook::prepareForOverlay(IDXGISwapChain* pSwapChain)
|
|||
initialized = true;
|
||||
}
|
||||
|
||||
ImGui_ImplDX11_NewFrame();
|
||||
|
||||
if (ImGui_ImplDX11_NewFrame())
|
||||
{
|
||||
Windows_Hook::Inst()->prepareForOverlay(desc.OutputWindow);
|
||||
|
||||
|
|
|
@ -176,8 +176,7 @@ void DX12_Hook::prepareForOverlay(IDXGISwapChain* pSwapChain)
|
|||
pDevice->Release();
|
||||
}
|
||||
|
||||
ImGui_ImplDX12_NewFrame();
|
||||
|
||||
if (ImGui_ImplDX12_NewFrame())
|
||||
{
|
||||
Windows_Hook::Inst()->prepareForOverlay(sc_desc.OutputWindow);
|
||||
|
||||
|
|
|
@ -75,8 +75,7 @@ void DX9_Hook::prepareForOverlay(IDirect3DDevice9 *pDevice)
|
|||
initialized = true;
|
||||
}
|
||||
|
||||
ImGui_ImplDX9_NewFrame();
|
||||
|
||||
if (ImGui_ImplDX9_NewFrame())
|
||||
{
|
||||
Windows_Hook::Inst()->prepareForOverlay(param.hFocusWindow);
|
||||
|
||||
|
|
|
@ -84,8 +84,7 @@ void OpenGL_Hook::prepareForOverlay(HDC hDC)
|
|||
initialized = true;
|
||||
}
|
||||
|
||||
ImGui_ImplOpenGL3_NewFrame();
|
||||
|
||||
if (ImGui_ImplOpenGL3_NewFrame())
|
||||
{
|
||||
Windows_Hook::Inst()->prepareForOverlay(hWnd);
|
||||
|
||||
|
|
Loading…
Reference in a new issue