---
 src/glx/x11/glxcmds.c |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index bd39a87..726ffed 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -255,6 +255,10 @@ GLXContext AllocateGLXContext( Display *dpy )
      CARD8 opcode;
     __GLXattribute *state;
 
+#ifdef USE_XCB
+    printf("USE_XCB\n");
+#endif
+
     if (!dpy)
         return NULL;
 
@@ -1400,9 +1404,18 @@ PUBLIC const char *glXQueryServerString( Display *dpy, 
int screen, int name )
 
 void __glXClientInfo (  Display *dpy, int opcode  )
 {
-    xGLXClientInfoReq *req;
-    int size;
     char * ext_str = __glXGetClientGLExtensionString();
+    int size = strlen( ext_str ) + 1;
+
+#ifdef USE_XCB
+   xcb_connection_t *c = XGetXCBConnection(dpy);
+   xcb_glx_client_info(c,
+                       GLX_MAJOR_VERSION,
+                       GLX_MINOR_VERSION,
+                       size,
+                       (const uint8_t *)ext_str);
+#else
+    xGLXClientInfoReq *req;
 
     /* Send the glXClientInfo request */
     LockDisplay(dpy);
@@ -1412,14 +1425,14 @@ void __glXClientInfo (  Display *dpy, int opcode  )
     req->major = GLX_MAJOR_VERSION;
     req->minor = GLX_MINOR_VERSION;
 
-    size = strlen( ext_str ) + 1;
     req->length += (size + 3) >> 2;
     req->numbytes = size;
     Data(dpy, ext_str, size);
 
     UnlockDisplay(dpy);
     SyncHandle();
-    
+#endif /* USE_XCB */
+
     Xfree( ext_str );
 }
 
-- 
1.6.0.2


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to