From ee88fe8a5bbdd95c6fcaf4f972239aa418e05b0a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 13 Nov 2022 14:25:24 +0000 Subject: Pass flags to Window constructor --- ui/gameMainWindow.cpp | 2 +- ui/window.cpp | 4 ++-- ui/window.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'ui') diff --git a/ui/gameMainWindow.cpp b/ui/gameMainWindow.cpp index 1d90417..b6e0075 100644 --- a/ui/gameMainWindow.cpp +++ b/ui/gameMainWindow.cpp @@ -30,7 +30,7 @@ public: }; GameMainWindow::GameMainWindow(size_t w, size_t h) : - Window {w, h, "I Like Trains"}, SceneRenderer {size}, camera {{-1250.0F, -1250.0F, 35.0F}, quarter_pi, rdiv(w, h), + Window {w, h, "I Like Trains", SDL_WINDOW_OPENGL}, SceneRenderer {size}, camera {{-1250.0F, -1250.0F, 35.0F}, quarter_pi, rdiv(w, h), 0.1F, 10000.0F} { uiComponents.create(glm::vec2 {-1150, -1150}); diff --git a/ui/window.cpp b/ui/window.cpp index 0d4c401..51aa827 100644 --- a/ui/window.cpp +++ b/ui/window.cpp @@ -19,11 +19,11 @@ Window::GlewInitHelper::GlewInitHelper() }(); } -Window::Window(size_t width, size_t height, const std::string & title) : +Window::Window(size_t width, size_t height, const std::string & title, Uint32 flags) : size {static_cast(width), static_cast(height)}, m_window {title.c_str(), static_cast(SDL_WINDOWPOS_CENTERED), static_cast(SDL_WINDOWPOS_CENTERED), size.x, - size.y, static_cast(SDL_WINDOW_OPENGL)}, + size.y, flags}, glContext {m_window}, uiShader {width, height} { } diff --git a/ui/window.h b/ui/window.h index d618976..6f8ad82 100644 --- a/ui/window.h +++ b/ui/window.h @@ -12,7 +12,7 @@ class Window { public: - Window(size_t width, size_t height, const std::string & title); + Window(size_t width, size_t height, const std::string & title, Uint32 flags); virtual ~Window() = default; NO_COPY(Window); -- cgit v1.2.3