Adding physx and fixing memory allocation of AssetView

This commit is contained in:
2022-12-22 17:16:09 +01:00
parent e7f1bd7d52
commit 1f1a776686
11 changed files with 95 additions and 22 deletions

View File

@ -20,7 +20,10 @@ public:
ImGui::StyleColorsDark();
ImGui_ImplGlfw_InitForOpenGL(window.GetGLFWHandle(), true);
ImGui_ImplOpenGL3_Init("#version 440");
ImGui_ImplOpenGL3_Init("#version 450");
ImGuizmo::SetOrthographic(true);
}
void Begin ()
@ -29,20 +32,19 @@ public:
ImGui_ImplOpenGL3_NewFrame();
ImGui::NewFrame();
ImGuizmo::SetOrthographic(true);
ImGuizmo::BeginFrame();
}
void End()
{
{
ImGui::EndFrame();
ImGui::Render();
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
if (ImGui::GetIO().ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
GLFWwindow* last_context = glfwGetCurrentContext();
@ -50,15 +52,19 @@ public:
ImGui::RenderPlatformWindowsDefault();
glfwMakeContextCurrent(last_context);
}
}
~GUIRenderer(){
ImGui_ImplOpenGL3_Shutdown();
ImGui_ImplGlfw_Shutdown();
ImGui::DestroyContext();
}
};