glutCreateWindow

creates a top-level window.

Signature

glutCreateWindow( char( name ) )-> int
glutCreateWindow( title ) -> <class 'ctypes.c_int'>
glutCreateWindow( STRING(title) ) -> c_int

Parameters

VariablesDescription
name
ASCII character string for use as window name.

Description

glutCreateWindow creates a top-level window. The name will be provided to the window system as the window's name. The intent is that the window system will label the window with the name.
Implicitly, the current window is set to the newly created window.
Each created window has a unique associated OpenGL context. State changes to a window's associated OpenGL context can be done immediately after the window is created.
The display state of a window is initially for the window to be shown. But the window's display state is not actually acted upon until glutMainLoop is entered. This means until glutMainLoop is called, rendering to a created window is ineffective because the window can not yet be displayed.
The value returned is a unique small integer identifier for the window. The range of allocated identifiers starts at one. This window identifier can be used when calling glutSetWindow .

X Implementation Notes

The proper X Inter-Client Communication Conventions Manual (ICCCM) top-level properties are established. The WM_COMMAND property that lists the command line used to invoke the GLUT program is only established for the first window created.

See Also

glutCreateSubWindow glutCreateMenu glutDestroyWindow

Sample Code References

The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.

glutCreateWindow
OpenGLContext OpenGLContext/glutcontext.py Lines: 40
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson11.py Lines: 160
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson18.py Lines: 272
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6.py Lines: 198
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson41.py Lines: 330
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson16.py Lines: 181
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson23.py Lines: 241
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson5.py Lines: 210
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson4.py Lines: 162
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson26.py Lines: 227
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson12.py Lines: 161
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson3.py Lines: 139
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson13.py Lines: 192
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson1.py Lines: 112
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson19.py Lines: 253
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson42.py Lines: 400
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson2.py Lines: 134
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6-multi.py Lines: 236
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson45.py Lines: 482
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson48/NeHeGL.py Lines: 137
OpenGL-Demo PyOpenGL-Demo/proesch/nurbs/nurbs.py Lines: 203
OpenGL-Demo PyOpenGL-Demo/da/dots.py Lines: 100
OpenGL-Demo PyOpenGL-Demo/GLE/maintest.py Lines: 36
OpenGL-Demo PyOpenGL-Demo/GLUT/gears.py Lines: 268
OpenGL-Demo PyOpenGL-Demo/GLUT/shader_test.py Lines: 124
OpenGL-Demo PyOpenGL-Demo/GLUT/glutplane.py Lines: 219
OpenGL-Demo PyOpenGL-Demo/GLUT/molehill.py Lines: 62
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/conesave.py Lines: 52
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/checker.py Lines: 110
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/lorentz.py Lines: 118
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/arraytest.py Lines: 97
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/text.py Lines: 111
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/cone.py Lines: 112
OpenGL-Demo PyOpenGL-Demo/redbook/hello.py Lines: 98
OpenGL-Demo PyOpenGL-Demo/redbook/scene.py Lines: 136
OpenGL-Demo PyOpenGL-Demo/redbook/drawf.py Lines: 109
OpenGL-Demo PyOpenGL-Demo/redbook/lines.py Lines: 137
OpenGL-Demo PyOpenGL-Demo/redbook/movelight.py Lines: 135
OpenGL-Demo PyOpenGL-Demo/redbook/smooth.py Lines: 103
OpenGL-Demo PyOpenGL-Demo/redbook/fog.py Lines: 151
OpenGL-Demo PyOpenGL-Demo/redbook/double.py Lines: 109
OpenGL-Demo PyOpenGL-Demo/redbook/teapots.py Lines: 203
OpenGL-Demo PyOpenGL-Demo/redbook/cube.py Lines: 94
OpenGL-Demo py2exe-example/shader_test.py Lines: 126
{Artistic License} PymmLib pymmlib/applications/glutviewer.py Lines: 402
{LGPL} PyUI2 renderers/openglGlut.py Lines: 54
{LGPL} PyUI2 system/glutdevice.py Lines: 50
{LGPL} PyMT pymt/ui/window/win_glut.py Lines: 15, 38
{GPL3} OpenGL-Programmable 05-shader.py Lines: 311
{GPL3} OpenGL-Programmable 07-attrib.py Lines: 330
{GPL3} OpenGL-Programmable 03-array.py Lines: 231
{GPL3} OpenGL-Programmable 09-gles2.py Lines: 373
{GPL3} OpenGL-Programmable 06-perpixel.py Lines: 319
{GPL3} OpenGL-Programmable 10-gl3.2core.py Lines: 383
{GPL3} OpenGL-Programmable 02-displaylist.py Lines: 229
{GPL3} OpenGL-Programmable 04-vbo.py Lines: 250
{GPL3} OpenGL-Programmable 01-direct.py Lines: 220
{GPL3} OpenGL-Programmable 08-pbo.py Lines: 352