Applying same fix to OpenGL 3 example. Fixing spaces/tabs.

This commit is contained in:
Nick Gravelyn 2016-01-20 06:11:28 -08:00 committed by ocornut
parent a9b0abe493
commit 8a61c0afea
2 changed files with 7 additions and 4 deletions

View File

@ -352,7 +352,10 @@ void ImGui_ImplSdlGL3_NewFrame()
int w, h;
SDL_GetWindowSize(g_Window, &w, &h);
io.DisplaySize = ImVec2((float)w, (float)h);
io.DisplayFramebufferScale = ImVec2(1.0f, 1.0f);
int glW, glH;
SDL_GL_GetDrawableSize(window, &glW, &glH);
io.DisplayFramebufferScale = ImVec2(glW / io.DisplaySize.x, glH / io.DisplaySize.y);
// Setup time step
Uint32 time = SDL_GetTicks();

View File

@ -240,9 +240,9 @@ void ImGui_ImplSdl_NewFrame(SDL_Window *window)
SDL_GetWindowSize(window, &w, &h);
io.DisplaySize = ImVec2((float)w, (float)h);
int glW, glH;
SDL_GL_GetDrawableSize(window, &glW, &glH);
io.DisplayFramebufferScale = ImVec2(glW / io.DisplaySize.x, glH / io.DisplaySize.y);
int glW, glH;
SDL_GL_GetDrawableSize(window, &glW, &glH);
io.DisplayFramebufferScale = ImVec2(glW / io.DisplaySize.x, glH / io.DisplaySize.y);
// Setup time step
Uint32 time = SDL_GetTicks();