diff options
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/x11/glxcmds.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c index ea55cc49efe..cd4aede74e4 100644 --- a/src/glx/x11/glxcmds.c +++ b/src/glx/x11/glxcmds.c @@ -398,6 +398,10 @@ CreateContext(Display * dpy, XVisualInfo * vis, _XError(dpy, &error); return None; } + if (renderType == 0) { + /* Initialize renderType now */ + renderType = mode->rgbMode ? GLX_RGBA_TYPE : GLX_COLOR_INDEX_TYPE; + } } else { mode = fbconfig; @@ -484,6 +488,8 @@ CreateContext(Display * dpy, XVisualInfo * vis, gc->imported = GL_TRUE; } + gc->renderType = renderType; + return gc; } @@ -1575,7 +1581,7 @@ GLX_ALIAS(Display *, glXGetCurrentDisplayEXT, (void), (), * This function dynamically determines whether to use the EXT_import_context * version of the protocol or the GLX 1.3 version of the protocol. */ - static int __glXQueryContextInfo(Display * dpy, GLXContext ctx) +static int __glXQueryContextInfo(Display * dpy, GLXContext ctx) { __GLXdisplayPrivate *priv = __glXInitialize(dpy); xGLXQueryContextReply reply; @@ -1713,7 +1719,7 @@ GLX_ALIAS(int, glXQueryContextInfoEXT, (Display * dpy, GLXContext ctx, int attribute, int *value), (dpy, ctx, attribute, value), glXQueryContext) - PUBLIC GLXContextID glXGetContextIDEXT(const GLXContext ctx) +PUBLIC GLXContextID glXGetContextIDEXT(const GLXContext ctx) { return ctx->xid; } @@ -2159,18 +2165,19 @@ GLX_ALIAS(int, glXGetFBConfigAttribSGIX, (Display * dpy, GLXFBConfigSGIX config, int attribute, int *value), (dpy, config, attribute, value), glXGetFBConfigAttrib) - PUBLIC GLX_ALIAS(GLXFBConfigSGIX *, glXChooseFBConfigSGIX, - (Display * dpy, int screen, int *attrib_list, - int *nelements), (dpy, screen, attrib_list, nelements), - glXChooseFBConfig) +PUBLIC GLX_ALIAS(GLXFBConfigSGIX *, glXChooseFBConfigSGIX, + (Display * dpy, int screen, int *attrib_list, + int *nelements), (dpy, screen, attrib_list, nelements), + glXChooseFBConfig) - PUBLIC GLX_ALIAS(XVisualInfo *, glXGetVisualFromFBConfigSGIX, - (Display * dpy, GLXFBConfigSGIX config), - (dpy, config), glXGetVisualFromFBConfig) +PUBLIC GLX_ALIAS(XVisualInfo *, glXGetVisualFromFBConfigSGIX, + (Display * dpy, GLXFBConfigSGIX config), + (dpy, config), glXGetVisualFromFBConfig) - PUBLIC GLXPixmap glXCreateGLXPixmapWithConfigSGIX(Display * dpy, - GLXFBConfigSGIX config, - Pixmap pixmap) +PUBLIC GLXPixmap +glXCreateGLXPixmapWithConfigSGIX(Display * dpy, + GLXFBConfigSGIX config, + Pixmap pixmap) { xGLXVendorPrivateWithReplyReq *vpreq; xGLXCreateGLXPixmapWithConfigSGIXReq *req; |