Browse Source

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

pull/570/head
Nick Gravelyn 9 years ago
committed by ocornut
parent
commit
8a61c0afea
  1. 5
      examples/sdl_opengl3_example/imgui_impl_sdl_gl3.cpp
  2. 6
      examples/sdl_opengl_example/imgui_impl_sdl.cpp

5
examples/sdl_opengl3_example/imgui_impl_sdl_gl3.cpp

@ -352,7 +352,10 @@ void ImGui_ImplSdlGL3_NewFrame()
int w, h; int w, h;
SDL_GetWindowSize(g_Window, &w, &h); SDL_GetWindowSize(g_Window, &w, &h);
io.DisplaySize = ImVec2((float)w, (float)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 // Setup time step
Uint32 time = SDL_GetTicks(); Uint32 time = SDL_GetTicks();

6
examples/sdl_opengl_example/imgui_impl_sdl.cpp

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

Loading…
Cancel
Save