From 82bfbf1f459d540b0e204bb873ca5786997b24da Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 12 Nov 2022 11:38:34 +0000 Subject: Refactor for per window context and more setup to the right places --- ui/window.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ui/window.h') diff --git a/ui/window.h b/ui/window.h index 0661915..d618976 100644 --- a/ui/window.h +++ b/ui/window.h @@ -26,12 +26,18 @@ public: void swapBuffers() const; protected: - [[nodiscard]] SDL_GLContext glContext() const; virtual void render() const; + struct GlewInitHelper { + GlewInitHelper(); + }; using SDL_WindowPtr = wrapped_ptrt; + using GL_Context = std::remove_pointer_t; + using SDL_GLContextPtr = wrapped_ptrt; const glm::ivec2 size; SDL_WindowPtr m_window; + SDL_GLContextPtr glContext; + GlewInitHelper glewinithelper; Collection uiComponents; UIShader uiShader; }; -- cgit v1.2.3