]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/glcontext.h
Support forward-compatible OpenGL contexts
[libs/gui.git] / source / graphics / glcontext.h
index db9df4e0aee08e3f150c17c826f2a578e1a142d7..8c8b49968b91090809b2e746cabe2716707468d4 100644 (file)
@@ -15,6 +15,9 @@ struct GLOptions
        bool stencil;
        bool doublebuffer;
        unsigned multisample;
+       bool forward_compatible;
+       unsigned gl_version_major;
+       unsigned gl_version_minor;
 
        GLOptions();
 };
@@ -39,8 +42,13 @@ private:
 
 public:
        GLContext(Window &wnd, const GLOptions &opts = GLOptions());
+private:
+       void platform_init(const GLOptions &);
+public:
        ~GLContext();
 
+       void set_swap_interval(unsigned);
+
        void swap_buffers();
 private:
        void window_resized(unsigned, unsigned);