1UNTITLED                             LOCAL                            UNTITLED
2

NAME

4     glutSwapBuffers — Swaps the buffers for the current window.
5

LIBRARY

7     OpenGLUT - window
8

SYNOPSIS

10     #include <openglut.h>
11
12     void
13     glutSwapBuffers(void);
14

DESCRIPTION

16     This function signals to OpenGLUT that you are done drawing to the  cur‐
17     rent window   for now.  If your window is double-buffered (  GLUT_DOUBLE
18     param to glutInitDisplayMode()), then OpenGLUT will swap the front buffer
19     with the back buffer.
20
21     This also computes your current frame-rate and prints the result on
22     stderr  if indicated by the  GLUT_FPS  environment variable.  The com‐
23     puted value is not necessarily the total frame rate, if you have multiple
24     windows, as the statistic is the total number of buffer-swaps for the
25     entire program.
26

CAVEATS

28     This function has no effect if your window is  GLUT_SINGLE  .
29
30     Frame rate is only calculated for double-buffered windows.
31

TODO

33     How does this interact with overlays?
34
35     Consider making  GLUT_FPS  keep per-window stats in a multi-window pro‐
36     gram.
37

SEE ALSO

39     glutPostRedisplay(3) glutPostOverlayRedisplay(3)
40     glutPostWindowRedisplay(3) glutPostWindowOverlayRedisplay(3)
41     glutInitDisplaymode(3)
42
43
44
45
46                                     Epoch
Impressum