diff options
author | RALOVICH, Kristóf <tade60@freemail.hu> | 2008-11-04 17:30:21 +0100 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-11-26 10:02:11 -0700 |
commit | ff3fa92eaa67579b3bd3480bc685cfc55ae1eff2 (patch) | |
tree | bcc66bee7a171dbb760a7ce730607cd4c4d01c95 | |
parent | 62688f11355cfa865d420755aa159875b425cc9b (diff) |
glx: xcbified glXSwapBuffers
-rw-r--r-- | src/glx/x11/glxcmds.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c index 93fc40c284..ec5ec4c3f0 100644 --- a/src/glx/x11/glxcmds.c +++ b/src/glx/x11/glxcmds.c @@ -865,7 +865,6 @@ PUBLIC void glXDestroyGLXPixmap(Display *dpy, GLXPixmap glxpixmap) PUBLIC void glXSwapBuffers(Display *dpy, GLXDrawable drawable) { - xGLXSwapBuffersReq *req; GLXContext gc; GLXContextTag tag; CARD8 opcode; @@ -896,6 +895,13 @@ PUBLIC void glXSwapBuffers(Display *dpy, GLXDrawable drawable) tag = 0; } +#ifdef USE_XCB + xcb_connection_t* c = XGetXCBConnection(dpy); + xcb_glx_swap_buffers(c, tag, drawable); + xcb_flush(c); +#else + xGLXSwapBuffersReq *req; + /* Send the glXSwapBuffers request */ LockDisplay(dpy); GetReq(GLXSwapBuffers,req); @@ -906,6 +912,7 @@ PUBLIC void glXSwapBuffers(Display *dpy, GLXDrawable drawable) UnlockDisplay(dpy); SyncHandle(); XFlush(dpy); +#endif /* USE_XCB */ } |