25 #ifndef CPP3DS_GLCONTEXT_HPP
26 #define CPP3DS_GLCONTEXT_HPP
31 #include <cpp3ds/Config.hpp>
32 #include <cpp3ds/OpenGL.hpp>
33 #include <cpp3ds/Window/Context.hpp>
34 #include <cpp3ds/Window/ContextSettings.hpp>
35 #include <cpp3ds/System/NonCopyable.hpp>
47 class GlContext : NonCopyable
53 GlContext(GlContext* shared);
55 GlContext(GlContext* shared,
const ContextSettings& settings,
unsigned int width,
unsigned int height);
68 static void globalInit();
80 static void globalCleanup();
86 static void ensureContext();
97 static GlContext* create();
112 static GlContext* create(
const ContextSettings& settings,
unsigned int width,
unsigned int height);
119 virtual ~GlContext();
131 const ContextSettings& getSettings()
const;
137 GLuint getHandle()
const;
153 bool setActive(
bool active);
172 void setVerticalSyncEnabled(
bool enabled);
203 static int evaluateFormat(
unsigned int bitsPerPixel,
const ContextSettings& settings,
int colorBits,
int depthBits,
int stencilBits,
int antialiasing,
bool accelerated);
208 ContextSettings m_settings;
223 void checkSettings(
const ContextSettings& requestedSettings);
236 #endif // CPP3DS_GLCONTEXT_HPP