blob: 367e50d374a39a92487e2845c26a58c822c13149 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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
|