Changeset 7fc5e27 in opengl-game for vulkan-ref.cpp
- Timestamp:
- Sep 3, 2019, 7:07:39 PM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- b6e60b4
- Parents:
- 1ce9afe
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-ref.cpp
r1ce9afe r7fc5e27 19 19 #include <chrono> 20 20 21 #include "consts.hpp" 21 22 #include "utils.h" 22 23 … … 226 227 // TODO: Put all fonts, textures, and images in the assets folder 227 228 228 if (gui-> Init() == RTWO_ERROR) {229 if (gui->init() == RTWO_ERROR) { 229 230 cout << "UI library could not be initialized!" << endl; 230 231 cout << SDL_GetError() << endl; … … 233 234 cout << "GUI init succeeded" << endl; 234 235 235 window = (SDL_Window*) gui-> CreateWindow("Vulkan Game", SCREEN_WIDTH, SCREEN_HEIGHT);236 window = (SDL_Window*) gui->createWindow("Vulkan Game", SCREEN_WIDTH, SCREEN_HEIGHT, false); 236 237 if (window == nullptr) { 237 238 cout << "Window could not be created!" << endl; … … 459 460 460 461 vector<const char*> getRequiredExtensions() { 461 vector<const char*> extensions = gui-> GetRequiredExtensions();462 vector<const char*> extensions = gui->getRequiredExtensions(); 462 463 463 464 if (enableValidationLayers) { … … 488 489 489 490 void createSurface() { 490 if (gui-> CreateVulkanSurface(instance, &surface) == RTWO_ERROR) {491 if (gui->createVulkanSurface(instance, &surface) == RTWO_ERROR) { 491 492 throw runtime_error("failed to create window surface!"); 492 493 } … … 710 711 else { 711 712 int width, height; 712 gui-> GetWindowSize(&width, &height);713 gui->getWindowSize(&width, &height); 713 714 714 715 VkExtent2D actualExtent = { … … 1812 1813 int width = 0, height = 0; 1813 1814 1814 gui-> GetWindowSize(&width, &height);1815 gui->getWindowSize(&width, &height); 1815 1816 1816 1817 while (width == 0 || height == 0 || 1817 1818 (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED) != 0) { 1818 1819 SDL_WaitEvent(nullptr); 1819 gui-> GetWindowSize(&width, &height);1820 gui->getWindowSize(&width, &height); 1820 1821 } 1821 1822 … … 1908 1909 gRenderer = nullptr; 1909 1910 1910 gui-> DestroyWindow();1911 gui-> Shutdown();1911 gui->destroyWindow(); 1912 gui->shutdown(); 1912 1913 delete gui; 1913 1914 }
Note:
See TracChangeset
for help on using the changeset viewer.