#ifndef MSP_GBASE_GLCONTEXT_H_
#define MSP_GBASE_GLCONTEXT_H_
+#ifndef WIN32
#include <GL/glx.h>
+#endif
#include "types.h"
namespace Msp {
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);