4 struct RrInstance *RrInstanceNew(Display *display,
8 struct RrInstance *inst;
10 inst = g_new(struct RrInstance, 1);
11 inst->display = display;
12 inst->screen = screen;
13 inst->visinfo = visinfo;
14 inst->cmap = XCreateColormap(display, RootWindow(display, screen),
15 RrVisual(inst), AllocNone);
16 inst->glx_context = glXCreateContext(display, &visinfo, NULL, TRUE);
18 g_assert(inst->glx_context);
23 void RrInstanceFree(struct RrInstance *inst)
26 glXDestroyContext(inst->display, inst->glx_context);
27 XFreeColormap(inst->display, inst->cmap);