Viewport, Platform: Added void* to render/swap buffer functions. Comments. (#1542, #1042)

This commit is contained in:
omar
2018-03-19 15:20:47 +01:00
parent 0e09032750
commit 2fecd332fc
24 changed files with 71 additions and 48 deletions

View File

@ -3,6 +3,7 @@
// Implemented features:
// [X] User texture binding. Use 'ID3D11ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// [X] Multi-viewport rendering (when ImGuiConfigFlags_EnableViewports is enabled).
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
@ -589,7 +590,7 @@ static void ImGui_ImplDX11_SetWindowSize(ImGuiViewport* viewport, ImVec2 size)
}
}
static void ImGui_ImplDX11_RenderWindow(ImGuiViewport* viewport)
static void ImGui_ImplDX11_RenderWindow(ImGuiViewport* viewport, void*)
{
ImGuiViewportDataDx11* data = (ImGuiViewportDataDx11*)viewport->RendererUserData;
ImVec4 clear_color = ImVec4(0.0f, 0.0f, 0.0f, 1.0f);
@ -599,7 +600,7 @@ static void ImGui_ImplDX11_RenderWindow(ImGuiViewport* viewport)
ImGui_ImplDX11_RenderDrawData(viewport->DrawData);
}
static void ImGui_ImplDX11_SwapBuffers(ImGuiViewport* viewport)
static void ImGui_ImplDX11_SwapBuffers(ImGuiViewport* viewport, void*)
{
ImGuiViewportDataDx11* data = (ImGuiViewportDataDx11*)viewport->RendererUserData;
data->SwapChain->Present(0, 0); // Present without vsync