MirBSD manpage: glXSwapBuffers(3)


GLXSWAPBUFFERS()    UNIX Programmer's Manual     GLXSWAPBUFFERS()

NAME

     glXSwapBuffers - exchange front and back buffers

C SPECIFICATION

     void glXSwapBuffers( Display *dpy,
                          GLXDrawable drawable )

PARAMETERS

     dpy       Specifies the connection to the X server.

     drawable  Specifies the drawable whose buffers are to be
               swapped.

DESCRIPTION

     glXSwapBuffers promotes the contents of the back buffer of
     drawable to become the contents of the front buffer of draw-
     able. The contents of the back buffer then become undefined.
     The update typically takes place during the vertical retrace
     of the monitor, rather than immediately after glXSwapBuffers
     is called.

     glXSwapBuffers performs an implicit glFlush before it
     returns. Subsequent OpenGL commands may be issued immedi-
     ately after calling glXSwapBuffers, but are not executed
     until the buffer exchange is completed.

     If drawable was not created with respect to a double-
     buffered visual, glXSwapBuffers has no effect, and no error
     is generated.

NOTES

     The contents of the back buffer become undefined after a
     swap. Note that this applies to pbuffers as well as windows.

     All GLX rendering contexts share the same notion of which
     are front buffers and which are back buffers. One conse-
     quence is that when multiple clients are rendering to the
     same double-buffered window, all of them should finish
     rendering before one of them issues the command to swap
     buffers. The clients are responsible for implementing this
     synchronization. Typically this is accomplished by executing
     glFinish and then using a semaphore in shared memory to ren-
     dezvous before swapping.

ERRORS

     GLXBadDrawable is generated if drawable is not a valid GLX
     drawable.

     GLXBadCurrentWindow is generated if dpy and drawable are
     respectively the display and drawable associated with the

MirBSD #10-current     Printed 2021-12-07                       1

GLXSWAPBUFFERS()    UNIX Programmer's Manual     GLXSWAPBUFFERS()

     current context of the calling thread, and drawable identi-
     fies a window that is no longer valid.

SEE ALSO

     glFlush, glXBindSwapBarrierSGIX, glXJoinSwapGroupSGIX,
     glXSwapIntervalSGI

MirBSD #10-current     Printed 2021-12-07                       2

Generated on 2021-12-07 11:07:08 by $MirOS: src/scripts/roff2htm,v 1.103 2021/01/23 20:24:35 tg Exp $ — This product includes material provided by mirabilos.

These manual pages and other documentation are copyrighted by their respective writers; their sources are available at the project’s CVSweb, AnonCVS and other mirrors. The rest is Copyright © 2002–2021 MirBSD.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report — diffs preferred.