Next: 2.1 glutInit Up: GLUT APIversion 3 Previous: 1.6 Terminology

# 2 Initialization

Routines beginning with the `glutInit`- prefix are used to initialize GLUT state. The primary initialization routine is `glutInit` that should only be called exactly once in a GLUT program. No non-`glutInit`- prefixed GLUT or OpenGL routines should be called before `glutInit`.

The other `glutInit`- routines may be called before `glutInit`. The reason is these routines can be used to set default window initialization state that might be modified by the command processing done in `glutInit`. For example, `glutInitWindowSize(400, 400)` can be called before `glutInit` to indicate 400 by 400 is the program's default window size. Setting the initial window size or position before `glutInit` allows the GLUT program user to specify the initial size or position using command line arguments.

- 2.1 glutInit
- 2.2 glutInitWindowPosition, glutInitWindowSize
- 2.3 glutInitDisplayMode

Next: 2.1 glutInit Up: GLUT APIversion 3 Previous: 1.6 Terminology