summaryrefslogtreecommitdiff
path: root/ui/window.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-11-14 20:30:32 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2022-11-14 23:46:14 +0000
commit5044a05aa16e6bb957fc40fca19ac8dd29c47a35 (patch)
tree8e0503413c4083ba6668b952f84a809fd24ef32a /ui/window.h
parentAdd a basic if clunky render test (diff)
downloadilt-5044a05aa16e6bb957fc40fca19ac8dd29c47a35.tar.bz2
ilt-5044a05aa16e6bb957fc40fca19ac8dd29c47a35.tar.xz
ilt-5044a05aa16e6bb957fc40fca19ac8dd29c47a35.zip
Add some tests over the behaviour of windows and contexts and glStuff
Diffstat (limited to 'ui/window.h')
-rw-r--r--ui/window.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/window.h b/ui/window.h
index 6f8ad82..cb0118a 100644
--- a/ui/window.h
+++ b/ui/window.h
@@ -10,6 +10,10 @@
#include <special_members.hpp>
#include <string>
+using SDL_WindowPtr = wrapped_ptrt<SDL_Window, SDL_CreateWindow, SDL_DestroyWindow>;
+using GL_Context = std::remove_pointer_t<SDL_GLContext>;
+using SDL_GLContextPtr = wrapped_ptrt<GL_Context, SDL_GL_CreateContext, SDL_GL_DeleteContext>;
+
class Window {
public:
Window(size_t width, size_t height, const std::string & title, Uint32 flags);
@@ -31,9 +35,6 @@ protected:
GlewInitHelper();
};
- using SDL_WindowPtr = wrapped_ptrt<SDL_Window, SDL_CreateWindow, SDL_DestroyWindow>;
- using GL_Context = std::remove_pointer_t<SDL_GLContext>;
- using SDL_GLContextPtr = wrapped_ptrt<GL_Context, SDL_GL_CreateContext, SDL_GL_DeleteContext>;
const glm::ivec2 size;
SDL_WindowPtr m_window;
SDL_GLContextPtr glContext;