Changeset 81869ef in opengl-game
- Timestamp:
- Feb 14, 2021, 4:08:47 PM (4 years ago)
- Branches:
- feature/imgui-sdl
- Children:
- 8d96e95
- Parents:
- 484334e
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sdl-game.cpp
r484334e r81869ef 209 209 210 210 ImGui::Render(); 211 ImDrawData* draw_data = ImGui::GetDrawData(); 212 const bool is_minimized = (draw_data->DisplaySize.x <= 0.0f || draw_data->DisplaySize.y <= 0.0f); 213 if (!is_minimized) { 214 renderFrame(draw_data); 211 212 gui->refreshWindowSize(); 213 214 const bool isMinimized = gui->getWindowWidth() <= 0 || gui->getWindowHeight() <= 0; 215 216 if (!isMinimized) { 217 renderFrame(ImGui::GetDrawData()); 215 218 presentFrame(); 216 219 } -
vulkan-game.cpp
r484334e r81869ef 986 986 ImGui::Render(); 987 987 988 renderFrame(ImGui::GetDrawData()); 989 presentFrame(); 988 // There is already code in renderFrame to render screen-specific things 989 // The imgui code above should be moved to the renderUI function of the particular screen it's needed in 990 // and currentScreen->renderUI should be called in renderFrame. 991 // Since I am no longer drawing the UI to an sdl texture and then rendering that, I don't have to worry 992 // about calling populateVulkanImageFromSDLTexture at all. 993 // If I do ever want to do that again, I can still actually do it inside renderFrame 994 995 gui->refreshWindowSize(); 996 997 const bool isMinimized = gui->getWindowWidth() <= 0 || gui->getWindowHeight() <= 0; 998 999 if (!isMinimized) { 1000 renderFrame(ImGui::GetDrawData()); 1001 presentFrame(); 1002 } 990 1003 } 991 1004 }
Note:
See TracChangeset
for help on using the changeset viewer.