Changeset cb6fabb in opengl-game for vulkan-game.cpp


Ignore:
Timestamp:
May 1, 2021, 1:52:25 AM (3 years ago)
Author:
Dmitry Portnoy <dportnoy@…>
Branches:
feature/imgui-sdl
Children:
756162f
Parents:
4a777d2
git-author:
Dmitry Portnoy <dportnoy@…> (05/01/21 01:31:53)
git-committer:
Dmitry Portnoy <dportnoy@…> (05/01/21 01:52:25)
Message:

Update the build instructions and makefile to work with OSX again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-game.cpp

    r4a777d2 rcb6fabb  
    853853      ImGui::NewFrame();
    854854
    855       (this->*currentRenderScreenFn)(gui->getWindowWidth(), gui->getWindowHeight());
     855      int w, h;
     856      SDL_GetWindowSize(((GameGui_SDL*)gui)->window, &w, &h);
     857
     858      // Probably a retina display
     859      // TODO: Find a better fix for this. Maybe I should use SDL_Vulkan_GetWindowSize here instead
     860      // of SDL_Vulkan_GetDrawableSize
     861      if (w < gui->getWindowWidth() && h < gui->getWindowHeight()) {
     862         (this->*currentRenderScreenFn)(w, h);
     863      } else {
     864         (this->*currentRenderScreenFn)(gui->getWindowWidth(), gui->getWindowHeight());
     865      }
    856866
    857867      ImGui::Render();
Note: See TracChangeset for help on using the changeset viewer.