modes.push_back(mode);
}
+ XFree(infos);
+
XF86VidModeModeLine modeline;
int dotclock;
XF86VidModeGetModeLine(display, screen, &dotclock, &modeline);
window=XCreateWindow(dpy, DefaultRootWindow(dpy), 0, 0, 1024, 768, 0, vi->depth, InputOutput, vi->visual, CWColormap, &attr);
+ XFree(vi);
+
glXMakeCurrent(dpy, window, context);
}
+GLContext::~GLContext()
+{
+ glXDestroyContext(display.get_display(), context);
+ XDestroyWindow(display.get_display(), window);
+}
+
void GLContext::attach(Window &wnd)
{
XReparentWindow(display.get_display(), window, wnd.get_handle(), 0, 0);