Changeset 8667f76 in opengl-game for vulkan-game.cpp
- Timestamp:
- Jul 19, 2019, 9:49:52 PM (6 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 80edd70
- Parents:
- 0e6ecf3
- git-author:
- Dmitry Portnoy <dmitry.portnoy@…> (07/19/19 21:45:27)
- git-committer:
- Dmitry Portnoy <dmitry.portnoy@…> (07/19/19 21:49:52)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-game.cpp
r0e6ecf3 r8667f76 14 14 #include <optional> 15 15 #include <set> 16 #include <vector>17 16 18 17 using namespace std; … … 125 124 bool framebufferResized = false; 126 125 127 // both SDL and GLFW create window functions return NULL on failure128 126 bool initWindow() { 129 127 if (gui->Init() == RTWO_ERROR) { … … 160 158 void recreateSwapChain() { 161 159 int width = 0, height = 0; 162 SDL_GetWindowSize(window,&width, &height);160 gui->GetWindowSize(&width, &height); 163 161 164 162 while (width == 0 || height == 0 || 165 163 (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED) != 0) { 166 164 SDL_WaitEvent(nullptr); 167 SDL_GetWindowSize(window,&width, &height);165 gui->GetWindowSize(&width, &height); 168 166 } 169 167 … … 219 217 createInfo.ppEnabledExtensionNames = extensions.data(); 220 218 221 cout << endl << " SDL extensions:" << endl;219 cout << endl << "Extensions:" << endl; 222 220 for (const char* extensionName : extensions) { 223 221 cout << extensionName << endl; … … 488 486 } else { 489 487 int width, height; 490 SDL_GetWindowSize(window,&width, &height);488 gui->GetWindowSize(&width, &height); 491 489 492 490 VkExtent2D actualExtent = { … … 511 509 512 510 vector<const char*> getRequiredExtensions() { 513 uint32_t extensionCount = 0; 514 SDL_Vulkan_GetInstanceExtensions(window, &extensionCount, nullptr); 515 516 vector<const char*> extensions(extensionCount); 517 SDL_Vulkan_GetInstanceExtensions(window, &extensionCount, extensions.data()); 511 vector<const char*> extensions = gui->GetRequiredExtensions(); 518 512 519 513 if (enableValidationLayers) {
Note:
See TracChangeset
for help on using the changeset viewer.