glFlush - force execution of GL commands in finite time
void glFlush( void )
Different GL implementations buffer commands in several different locations, including network buffers and the graphics accelerator itself.
glFlush empties all of these buffers, causing all issued commands to be executed as quickly as they are accepted by the actual rendering
engine. Though this execution may not be completed in any particular time period, it does complete in finite time.
Because any GL program might be executed over a network, or on an accelerator that buffers commands, all programs should call glFlush when-
ever they count on having all of their previously issued commands completed. For example, call glFlush before waiting for user input that
depends on the generated image.
glFlush can return at any time. It does not wait until the execution of all previously issued GL commands is complete.
GL_INVALID_OPERATION is generated if glFlush is executed between the execution of glBegin and the corresponding execution of glEnd.
Check Out this Related Man Page
glXSwapBuffers - exchange front and back buffers
void glXSwapBuffers( Display *dpy,
GLXDrawable drawable )
dpy Specifies the connection to the X server.
drawable Specifies the drawable whose buffers are to be swapped.
glXSwapBuffers promotes the contents of the back buffer of drawable to become the contents of the front buffer of drawable. The contents
of the back buffer then become undefined. The update typically takes place during the vertical retrace of the monitor, rather than immedi-
ately after glXSwapBuffers is called.
glXSwapBuffers performs an implicit glFlush before it returns. Subsequent OpenGL commands may be issued immediately after calling glXSwap-
Buffers, 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.
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 consequence is that when mul-
tiple 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 rendezvous before swapping.
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 current context of the
calling thread, and drawable identifies a window that is no longer valid.
glFlush, glXBindSwapBarrierSGIX, glXJoinSwapGroupSGIX, glXSwapIntervalSGI
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)
Hi i have written the code for star shape object in opengl but i am not able to bevel the edges of the star.COULD SOMEONE KINDLY TELL ME HOW CAN I BEVEL THE EDGES OF THE STAR SHAPE.
#include... (1 Reply)