]> git.tdb.fi Git - libs/gui.git/blobdiff - source/glcontext.h
Win32 compatibility (for most things)
[libs/gui.git] / source / glcontext.h
index f9e5f4696d9aab3cebeceed67be72049d0eeda5a..36130e1c55df8b8d048ea5a2000a12cc367724d0 100644 (file)
@@ -8,7 +8,9 @@ Distributed under the LGPL
 #ifndef MSP_GBASE_GLCONTEXT_H_
 #define MSP_GBASE_GLCONTEXT_H_
 
+#ifndef WIN32
 #include <GL/glx.h>
+#endif
 #include "types.h"
 
 namespace Msp {
@@ -29,18 +31,23 @@ struct GLOptions
 class GLContext
 {
 private:
+#ifdef WIN32
+       typedef HGLRC Context;
+#else
        typedef GLXContext Context;
+#endif
 
        Display &display;
+       Window &window;
        Context context;
-       GLXWindow glx_wnd;
-       WindowHandle window;
+#ifndef WIN32
+       WindowHandle subwnd;
+#endif
 
 public:
-       GLContext(Display &dpy, const GLOptions &opts);
+       GLContext(Window &wnd, const GLOptions &opts);
        ~GLContext();
 
-       void attach(Window &wnd);
        void swap_buffers();
 private:
        void window_resized(unsigned, unsigned);