mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Examples: OpenGL: fix for retina screens + io.DisplayFramebufferScale storage (#287)
This commit is contained in:
parent
a36001212f
commit
e58f99179a
6 changed files with 31 additions and 22 deletions
|
|
@ -77,7 +77,9 @@ int main(int, char**)
|
|||
}
|
||||
|
||||
// Rendering
|
||||
glViewport(0, 0, (int)ImGui::GetIO().DisplaySize.x, (int)ImGui::GetIO().DisplaySize.y);
|
||||
int display_w, display_h;
|
||||
glfwGetFramebufferSize(window, &display_w, &display_h);
|
||||
glViewport(0, 0, display_w, display_h);
|
||||
glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
ImGui::Render();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue