<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:mml="http://www.w3.org/1998/Math/MathML"
><head><title>glutInitDisplayMode</title><link rel="stylesheet" href="style.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.59.1"/><link rel="home" href="index.xml" title="PyOpenGL 2.0.1.07 Man Pages"/><link rel="up" href="reference-GLUT.xml" title="GLUT"/><link rel="previous" href="glutInit.3GLUT.xml" title="glutInit"/><link rel="next" href="glutInitDisplayString.3GLUT.xml" title="glutInitDisplayString"/></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glutInitDisplayMode</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glutInit.3GLUT.xml">Prev</a> </td><th width="60%" align="center">GLUT</th><td width="20%" align="right"> <a accesskey="n" href="glutInitDisplayString.3GLUT.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="glutInitDisplayMode.3GLUT"/><div class="titlepage"/><div class="refnamediv"><a name="glutInitDisplayMode.3GLUT-name"/><h2>Name</h2><p>glutInitDisplayMode &#8212; sets the initial display mode.</p></div><div class="refsynopsisdiv"><a name="glutInitDisplayMode.3GLUT-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void <tt>glutInitDisplayMode</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>unsigned int <i><tt>mode</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glutInitDisplayMode.3GLUT-python_spec"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>glutInitDisplayMode</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>mode</tt></i>) &#8594; <tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="glutInitDisplayMode.3GLUT-parameters"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>mode</tt></i></span></dt><dd><p>
						Display mode, normally the bitwise OR-ing of GLUT display mode bit masks. See values below:
					</p><div class="variablelist"><dl><dt><span class="term"><tt>GLUT_RGBA</tt></span></dt><dd>
									Bit mask to select an RGBA mode window. This is the default if neither
									<tt>GLUT_RGBA</tt> nor <tt>GLUT_INDEX</tt> are specified.
								</dd><dt><span class="term"><tt>GLUT_RGB</tt></span></dt><dd>
									An alias for <tt>GLUT_RGBA</tt>.
								</dd><dt><span class="term"><tt>GLUT_INDEX</tt></span></dt><dd>
									Bit mask to select a color index mode window. This overrides <tt>GLUT_RGBA</tt> if
									it is also specified.
								</dd><dt><span class="term"><tt>GLUT_SINGLE</tt></span></dt><dd>
									Bit mask to select a single buffered window. This is the default if neither
									<tt>GLUT_DOUBLE</tt> or <tt>GLUT_SINGLE</tt> are specified.
								</dd><dt><span class="term"><tt>GLUT_DOUBLE</tt></span></dt><dd>
									Bit mask to select a double buffered window. This overrides <tt>GLUT_SINGLE</tt> if
									it is also specified.
								</dd><dt><span class="term"><tt>GLUT_ACCUM</tt></span></dt><dd>
									Bit mask to request a window with an accumulation buffer.
								</dd><dt><span class="term"><tt>GLUT_ALPHA</tt></span></dt><dd>
									Bit mask to request a window with an alpha component to the color buffer(s).
								</dd><dt><span class="term"><tt>GLUT_DEPTH</tt></span></dt><dd>
									Bit mask to request a window with a depth buffer.
								</dd><dt><span class="term"><tt>GLUT_STENCIL</tt></span></dt><dd>
									Bit mask to request a window with a stencil buffer.
								</dd><dt><span class="term"><tt>GLUT_MULTISAMPLE</tt></span></dt><dd>
									Bit mask to request a window with multisampling support. If multisampling is not available, a
									non-multisampling window will automatically be chosen. Note: both the OpenGL client-side and
									server-side implementations must support the GLX_SAMPLE_SGIS extension for multisampling to be
									available.
								</dd><dt><span class="term"><tt>GLUT_STEREO</tt></span></dt><dd>
									Bit mask to select a stereo window.
								</dd><dt><span class="term"><tt>GLUT_LUMINANCE</tt></span></dt><dd>
									Bit mask to select a window with a "luminance" color model. This model provides the
									functionality of OpenGL's RGBA color model, but the green and blue components are not
									maintained in the frame buffer. Instead each pixel's red component is converted to an index
									between zero and <tt>glutGet(GLUT_WINDOW_COLORMAP_SIZE)-1</tt>
									and looked up in a per-window color map to determine the color of pixels within the window. The
									initial colormap of <tt>GLUT_LUMINANCE</tt> windows is initialized to be a linear
									gray ramp, but can be modified with GLUT's colormap routines.
								</dd></dl></div></dd></dl></div></div><div class="refsect1" lang="en"><a name="glutInitDisplayMode.3GLUT-description"/><h2>Description</h2><p>
			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.
		</p><p>
			Note that <tt>GLUT_RGBA</tt> 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
			<tt>GLUT_ALPHA</tt>. The same applies to <tt>GLUT_LUMINANCE</tt>.
		</p><p>
			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 <tt>GLUT_DEPTH</tt> is not specified.
		</p><p>
			The <a href="glutInitDisplayString.3GLUT.xml"><tt>glutInitDisplayString</tt></a> routine provides a more powerful way to select frame
			buffer capabilities for GLUT windows.
		</p></div><div class="refsect1" lang="en"><a name="glutInitDisplayMode.3GLUT-glut_luminance_implementation_notes"/><h2><tt>GLUT_LUMINANCE</tt> Implementation Notes</h2><p>
			<tt>GLUT_LUMINANCE</tt> is not supported on most OpenGL platforms.
		</p></div><div class="refsect1" lang="en"><a name="glutInitDisplayMode.3GLUT-see_also"/><h2>See Also</h2><p>
			<span class="simplelist"><a href="glutInit.3GLUT.xml">glutInit</a>, <a href="glutCreateWindow.3GLUT.xml">glutCreateWindow</a>, <a href="glutInitDisplayString.3GLUT.xml">glutInitDisplayString</a></span>
		</p></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="glutInit.3GLUT.xml">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference-GLUT.xml">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="glutInitDisplayString.3GLUT.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glutInit </td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top"> glutInitDisplayString</td></tr></table></div></body></html>