|
|
@ -62,6 +62,8 @@ void ImGui_ImplGlfwGL3_RenderDrawLists(ImDrawData* draw_data)
|
|
|
|
ImGuiIO& io = ImGui::GetIO();
|
|
|
|
ImGuiIO& io = ImGui::GetIO();
|
|
|
|
int fb_width = (int)(io.DisplaySize.x * io.DisplayFramebufferScale.x);
|
|
|
|
int fb_width = (int)(io.DisplaySize.x * io.DisplayFramebufferScale.x);
|
|
|
|
int fb_height = (int)(io.DisplaySize.y * io.DisplayFramebufferScale.y);
|
|
|
|
int fb_height = (int)(io.DisplaySize.y * io.DisplayFramebufferScale.y);
|
|
|
|
|
|
|
|
if (fb_width == 0 || fb_height == 0)
|
|
|
|
|
|
|
|
return;
|
|
|
|
draw_data->ScaleClipRects(io.DisplayFramebufferScale);
|
|
|
|
draw_data->ScaleClipRects(io.DisplayFramebufferScale);
|
|
|
|
|
|
|
|
|
|
|
|
// Setup viewport, orthographic projection matrix
|
|
|
|
// Setup viewport, orthographic projection matrix
|
|
|
@ -353,7 +355,7 @@ void ImGui_ImplGlfwGL3_NewFrame()
|
|
|
|
glfwGetWindowSize(g_Window, &w, &h);
|
|
|
|
glfwGetWindowSize(g_Window, &w, &h);
|
|
|
|
glfwGetFramebufferSize(g_Window, &display_w, &display_h);
|
|
|
|
glfwGetFramebufferSize(g_Window, &display_w, &display_h);
|
|
|
|
io.DisplaySize = ImVec2((float)w, (float)h);
|
|
|
|
io.DisplaySize = ImVec2((float)w, (float)h);
|
|
|
|
io.DisplayFramebufferScale = ImVec2((float)display_w / w, (float)display_h / h);
|
|
|
|
io.DisplayFramebufferScale = ImVec2(w > 0 ? ((float)display_w / w) : 0, h > 0 ? ((float)display_h / h) : 0);
|
|
|
|
|
|
|
|
|
|
|
|
// Setup time step
|
|
|
|
// Setup time step
|
|
|
|
double current_time = glfwGetTime();
|
|
|
|
double current_time = glfwGetTime();
|
|
|
|