glutSwapBuffers(3GLUT) GLUT glutSwapBuffers(3GLUT)NAME
glutSwapBuffers - swaps the buffers of the current window if double buffered.
SYNTAX
#include <GLUT/glut.h>
void glutSwapBuffers(void);
DESCRIPTION
Performs a buffer swap on the layer in use for the current window. Specifically, glutSwapBuffers promotes the contents of the back buffer
of the layer in use of the current window to become the contents of the front buffer. The contents of the back buffer then become unde-
fined. The update typically takes place during the vertical retrace of the monitor, rather than immediately after glutSwapBuffers is
called.
An implicit glFlush is done by glutSwapBuffers before it returns. Subsequent OpenGL commands can be issued immediately after calling
glutSwapBuffers, but are not executed until the buffer exchange is completed.
If the layer in use is not double buffered, glutSwapBuffers has no effect.
SEE ALSO
glutPostRedisplay, glutDisplayFunc
AUTHOR
Mark J. Kilgard (mjk@nvidia.com)
GLUT 3.7 glutSwapBuffers(3GLUT)
Check Out this Related Man Page
UNTITLED LOCAL UNTITLED
NAME
glutSwapBuffers -- Swaps the buffers for the current window.
LIBRARY
OpenGLUT - window
SYNOPSIS
#include <openglut.h>
void
glutSwapBuffers(void);
DESCRIPTION
This function signals to OpenGLUT that you are done drawing to the current window for now. If your window is double-buffered ( GLUT_DOU-
BLE param to glutInitDisplayMode()), then OpenGLUT will swap the front buffer with the back buffer.
This also computes your current frame-rate and prints the result on stderr if indicated by the GLUT_FPS environment variable. The com-
puted value is not necessarily the total frame rate, if you have multiple windows, as the statistic is the total number of buffer-swaps for
the entire program.
CAVEATS
This function has no effect if your window is GLUT_SINGLE .
Frame rate is only calculated for double-buffered windows.
TODO
How does this interact with overlays?
Consider making GLUT_FPS keep per-window stats in a multi-window program.
SEE ALSO glutPostRedisplay(3)glutPostOverlayRedisplay(3)glutPostWindowRedisplay(3)glutPostWindowOverlayRedisplay(3)glutInitDisplaymode(3)
Epoch
hi,
I get this error when I compile my source on mac Leopard.
is because I need to configure openGL path ?
Monitor.h:15:60: error: GL/glut.h: No such file or directory
Monitor.h:16:60: error: GL/gl.h: No such file or directory
Monitor.C: In function 'void display2()':
Monitor.C:77:... (0 Replies)
Hi,
how to insert JPEG on each side of the cube using OpenGL in C language..
i have a program for cube..
guide me ,,,
any answer will valuable.. (3 Replies)
Hi,
How to decode an image using openGL library libjpeg ..
which are the steps needed to do this using C language..
actually my work is to decode the image, store it on the buffer,
and place it on cube surface..
please guide me,,any answer will appreciated .. (8 Replies)