Examples: OpenGL: skip rendering and calling glViewport() if we have a zero-fixed buffer (#486)

This commit is contained in:
ocornut
2016-02-16 09:14:38 +01:00
parent 9e86d0e225
commit 2813a44dcc
4 changed files with 10 additions and 2 deletions

View File

@ -57,6 +57,8 @@ void ImGui_ImplSdlGL3_RenderDrawLists(ImDrawData* draw_data)
ImGuiIO& io = ImGui::GetIO();
int fb_width = (int)(io.DisplaySize.x * io.DisplayFramebufferScale.x);
int fb_height = (int)(io.DisplaySize.y * io.DisplayFramebufferScale.y);
if (fb_width == 0 || fb_height == 0)
return;
draw_data->ScaleClipRects(io.DisplayFramebufferScale);
// Setup orthographic projection matrix