glutInitDisplayMode

sets the initial display mode.

Signature

glutInitDisplayMode( unsigned int( mode ) )-> void
glutInitDisplayMode( displayMode )
glutInitDisplayMode( c_uint(displayMode) ) -> None

Parameters

VariablesDescription
mode
Display mode, normally the bitwise OR-ing of GLUT display mode bit masks. See values below:

Description

The initial display mode is used when creating top-level windows, subwindows, and overlays to determine the OpenGL display mode for the to-be-created window or overlay.
Note that GLUT_RGBA selects the RGBA color model, but it does not request any bits of alpha (sometimes called an alpha buffer or destination alpha) be allocated. To request alpha, specify GLUT_ALPHA . The same applies to GLUT_LUMINANCE .
Note that some bits "request" a capability and other bits "select" a capability. A requestable capability may be assigned to the created window even if the bit for the capability was not set. For example, GLUT may create a window with a depth buffer even though GLUT_DEPTH is not specified.
The glutInitDisplayString routine provides a more powerful way to select frame buffer capabilities for GLUT windows.

GLUT_LUMINANCE Implementation Notes

GLUT_LUMINANCE is not supported on most OpenGL platforms.

See Also

glutInit glutCreateWindow glutInitDisplayString

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.

glutInitDisplayMode
OpenGLContext OpenGLContext/glutcontext.py Lines: 35
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson11.py Lines: 149
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson18.py Lines: 261
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6.py Lines: 187
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson41.py Lines: 319
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson16.py Lines: 170
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson23.py Lines: 230
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson5.py Lines: 199
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson4.py Lines: 151
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson26.py Lines: 216
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson12.py Lines: 150
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson3.py Lines: 128
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson13.py Lines: 181
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson1.py Lines: 101
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson19.py Lines: 242
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson42.py Lines: 390
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson2.py Lines: 123
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6-multi.py Lines: 225
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson45.py Lines: 471
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson48/NeHeGL.py Lines: 126
OpenGL-Demo PyOpenGL-Demo/proesch/stereo/stereoDemo.py Lines: 153, 155
OpenGL-Demo PyOpenGL-Demo/proesch/nurbs/nurbs.py Lines: 200
OpenGL-Demo PyOpenGL-Demo/da/dots.py Lines: 98
OpenGL-Demo PyOpenGL-Demo/GLE/maintest.py Lines: 35
OpenGL-Demo PyOpenGL-Demo/GLUT/gears.py Lines: 264
OpenGL-Demo PyOpenGL-Demo/GLUT/shader_test.py Lines: 113
OpenGL-Demo PyOpenGL-Demo/GLUT/glutplane.py Lines: 217
OpenGL-Demo PyOpenGL-Demo/GLUT/molehill.py Lines: 60
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/conesave.py Lines: 51
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/checker.py Lines: 109
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/lorentz.py Lines: 117
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/arraytest.py Lines: 96
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/text.py Lines: 110
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/cone.py Lines: 111
OpenGL-Demo PyOpenGL-Demo/redbook/hello.py Lines: 95
OpenGL-Demo PyOpenGL-Demo/redbook/scene.py Lines: 134
OpenGL-Demo PyOpenGL-Demo/redbook/drawf.py Lines: 106
OpenGL-Demo PyOpenGL-Demo/redbook/lines.py Lines: 134
OpenGL-Demo PyOpenGL-Demo/redbook/movelight.py Lines: 132
OpenGL-Demo PyOpenGL-Demo/redbook/smooth.py Lines: 100
OpenGL-Demo PyOpenGL-Demo/redbook/fog.py Lines: 149
OpenGL-Demo PyOpenGL-Demo/redbook/double.py Lines: 106
OpenGL-Demo PyOpenGL-Demo/redbook/teapots.py Lines: 200
OpenGL-Demo PyOpenGL-Demo/redbook/cube.py Lines: 91
OpenGL-Demo py2exe-example/shader_test.py Lines: 115
{Artistic License} PymmLib pymmlib/applications/glutviewer.py Lines: 396, 398
{LGPL} PyUI2 renderers/openglGlut.py Lines: 47
{LGPL} PyUI2 system/glutdevice.py Lines: 42
{LGPL} PyMT pymt/ui/window/win_glut.py Lines: 15, 31, 33
{GPL3} OpenGL-Programmable 05-shader.py Lines: 309
{GPL3} OpenGL-Programmable 07-attrib.py Lines: 328
{GPL3} OpenGL-Programmable 03-array.py Lines: 229
{GPL3} OpenGL-Programmable 09-gles2.py Lines: 371
{GPL3} OpenGL-Programmable 06-perpixel.py Lines: 317
{GPL3} OpenGL-Programmable 10-gl3.2core.py Lines: 381
{GPL3} OpenGL-Programmable 02-displaylist.py Lines: 227
{GPL3} OpenGL-Programmable 04-vbo.py Lines: 248
{GPL3} OpenGL-Programmable 01-direct.py Lines: 218
{GPL3} OpenGL-Programmable 08-pbo.py Lines: 350