Changes in vulkan-game.cpp [cb6fabb:e8445f0] in opengl-game
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-game.cpp
rcb6fabb re8445f0 92 92 seedRandomNums(); 93 93 94 cout << "Vulkan Game" << endl; 95 94 96 cout << "DEBUGGING IS " << (ENABLE_VALIDATION_LAYERS ? "ON" : "OFF") << endl; 95 96 cout << "Vulkan Game" << endl;97 97 98 98 if (initUI(width, height, guiFlags) == RTWO_ERROR) { … … 853 853 ImGui::NewFrame(); 854 854 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 } 855 (this->*currentRenderScreenFn)(gui->getWindowWidth(), gui->getWindowHeight()); 866 856 867 857 ImGui::Render(); … … 1059 1049 explosion_UBO.cur_time = curTime; 1060 1050 1061 VulkanUtils::copyDataToMemory(device, uniformBuffersMemory_modelPipeline[imageIndex], 0, object_VP_mats);1062 1063 VulkanUtils::copyDataToMemory(device, uniformBuffersMemory_shipPipeline[imageIndex], 0, ship_VP_mats);1064 1065 VulkanUtils::copyDataToMemory(device, uniformBuffersMemory_asteroidPipeline[imageIndex], 0, asteroid_VP_mats);1066 1067 VulkanUtils::copyDataToMemory(device, uniformBuffersMemory_laserPipeline[imageIndex], 0, laser_VP_mats);1068 1069 VulkanUtils::copyDataToMemory(device, uniformBuffersMemory_explosionPipeline[imageIndex], 0, explosion_UBO);1051 VulkanUtils::copyDataToMemory(device, object_VP_mats, uniformBuffersMemory_modelPipeline[imageIndex], 0); 1052 1053 VulkanUtils::copyDataToMemory(device, ship_VP_mats, uniformBuffersMemory_shipPipeline[imageIndex], 0); 1054 1055 VulkanUtils::copyDataToMemory(device, asteroid_VP_mats, uniformBuffersMemory_asteroidPipeline[imageIndex], 0); 1056 1057 VulkanUtils::copyDataToMemory(device, laser_VP_mats, uniformBuffersMemory_laserPipeline[imageIndex], 0); 1058 1059 VulkanUtils::copyDataToMemory(device, explosion_UBO, uniformBuffersMemory_explosionPipeline[imageIndex], 0); 1070 1060 } 1071 1061
Note:
See TracChangeset
for help on using the changeset viewer.