glFinish function

The glFinish function blocks until all OpenGL execution is complete.

Syntax

void WINAPI glFinish(void);

Parameters

This function has no parameters.

Return value

This function does not return a value.

Error codes

The following error code can be retrieved by the glGetError function.

Name Meaning
GL_INVALID_OPERATION
The function was called between a call to glBegin and the corresponding call to glEnd.

Remarks

The glFinish function does not return until the effects of all previously called OpenGL functions are complete. Such effects include all changes to the OpenGL state, all changes to the connection state, and all changes to the framebuffer contents.

The glFinish function requires a round trip to the server.

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Gl.h
Library
Opengl32.lib
DLL
Opengl32.dll

See also

glBegin

glEnd

glFlush