From: Derek Foreman Date: Thu, 29 May 2003 16:34:35 +0000 (+0000) Subject: make the glx context current to a window immediately so we can send X-Git-Tag: gl2~28 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=ad27702e2d52cecd27b17affe5b09364fc76408a;p=dana%2Fopenbox.git make the glx context current to a window immediately so we can send gl state changes before we manage any clients --- diff --git a/render2/instance.c b/render2/instance.c index 7d8d3286..fc76ae91 100644 --- a/render2/instance.c +++ b/render2/instance.c @@ -57,7 +57,7 @@ static int glx_rating(Display *display, XVisualInfo *v) struct RrInstance *RrInstanceNew(Display *display, int screen) { - int count, i = 0, val, best = 0, rate = 0, temp; + int count, i = 0, val, best = 0, rate = 0, temp, ok; XVisualInfo vimatch, *vilist; vimatch.screen = screen; @@ -100,6 +100,11 @@ struct RrInstance *RrInstanceNew(Display *display, int screen) inst->shape_window = XCreateSimpleWindow(display, RootWindow(display, screen), 0, 0, 1, 1, 0, 0, 0); + /* make the context current on anything we can so we can dl + textures */ + + ok = glXMakeCurrent(display, inst->shape_window, inst->glx_context); + assert(ok); inst->surface_map = g_hash_table_new(g_int_hash, g_int_equal); assert(inst->glx_context);