void GLContext::platform_init(const GLOptions &opts)
{
- priv = new Private;
-
vector<unsigned> attribs;
attribs.push_back(CPF_DEPTH_SIZE);
if(!pixfmt)
throw unsupported_gl_mode(opts);
+ priv = new Private;
priv->context = create_gl_context(pixfmt);
destroy_pixel_format(pixfmt);
void GLContext::platform_init(const GLOptions &opts)
{
- priv = new Private;
-
vector<int> attribs;
attribs.push_back(GLX_RGBA);
XVisualInfo *vi = glXChooseVisual(dpy, DefaultScreen(dpy), &attribs.front());
if(!vi)
throw unsupported_gl_mode(opts);
+
+ priv = new Private;
priv->context = glXCreateContext(dpy, vi, 0, true);
XSetWindowAttributes attr;
void GLContext::platform_init(const GLOptions &opts)
{
- priv = new Private;
-
HDC dc = GetDC(window.get_private().window);
PIXELFORMATDESCRIPTOR pfd;
throw unsupported_gl_mode(opts);
SetPixelFormat(dc, pf_index, &pfd);
+ priv = new Private;
priv->context = wglCreateContext(dc);
wglMakeCurrent(dc, priv->context);