summaryrefslogtreecommitdiff
path: root/src/gl_context.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gl_context.hpp')
-rw-r--r--src/gl_context.hpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/gl_context.hpp b/src/gl_context.hpp
new file mode 100644
index 0000000..367e50d
--- /dev/null
+++ b/src/gl_context.hpp
@@ -0,0 +1,31 @@
+#ifndef GL_CONTEXT_HPP
+#define GL_CONTEXT_HPP
+
+#include "sdl_main_window.hpp"
+
+#include <SDL_video.h>
+
+namespace bookmouse {
+
+class GlContext {
+ public:
+ explicit GlContext(SdlMainWindow& mainWindow);
+ GlContext(const GlContext&) = delete;
+ GlContext(GlContext&&) = delete;
+ ~GlContext();
+
+ GlContext& operator=(const GlContext&) = delete;
+ GlContext& operator=(GlContext&&) = delete;
+
+ constexpr SDL_GLContext context()
+ {
+ return m_context;
+ }
+
+ private:
+ SDL_GLContext m_context{nullptr};
+};
+
+} // namespace bookmouse
+
+#endif