include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man2 / glRenderMode.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4 <refentry id="glRenderMode">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glRenderMode</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glRenderMode</refname>
17 <refpurpose>set rasterization mode</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>GLint <function>glRenderMode</function></funcdef>
23 <paramdef>GLenum <parameter>mode</parameter></paramdef>
24 </funcprototype>
25 </funcsynopsis>
26 </refsynopsisdiv>
27 <refsect1 id="parameters"><title>Parameters</title>
28 <variablelist>
29 <varlistentry>
30 <term><parameter>mode</parameter></term>
31 <listitem>
32 <para>
33 Specifies the rasterization mode.
34 Three values are accepted:
35 <constant>GL_RENDER</constant>,
36 <constant>GL_SELECT</constant>, and
37 <constant>GL_FEEDBACK</constant>.
38 The initial value is <constant>GL_RENDER</constant>.
39 </para>
40 </listitem>
41 </varlistentry>
42 </variablelist>
43 </refsect1>
44 <refsect1 id="description"><title>Description</title>
45 <para>
46 <function>glRenderMode</function> sets the rasterization mode.
47 It takes one argument,
48 <parameter>mode</parameter>,
49 which can assume one of three predefined values:
50 </para>
51 <variablelist>
52 <varlistentry>
53 <term><constant>GL_RENDER</constant></term>
54 <listitem>
55 <para>
56 Render mode. Primitives are rasterized,
57 producing pixel fragments,
58 which are written into the frame buffer.
59 This is the normal mode
60 and also the default mode.
61 </para>
62 </listitem>
63 </varlistentry>
64 <varlistentry>
65 <term><constant>GL_SELECT</constant></term>
66 <listitem>
67 <para>
68 Selection mode.
69 No pixel fragments are produced,
70 and no change to the frame buffer contents is made.
71 Instead,
72 a record of the names of primitives that would have been drawn
73 if the render mode had been <constant>GL_RENDER</constant> is returned in a select buffer,
74 which must be created (see <citerefentry><refentrytitle>glSelectBuffer</refentrytitle></citerefentry>) before selection mode
75 is entered.
76 </para>
77 </listitem>
78 </varlistentry>
79 <varlistentry>
80 <term><constant>GL_FEEDBACK</constant></term>
81 <listitem>
82 <para>
83 Feedback mode.
84 No pixel fragments are produced,
85 and no change to the frame buffer contents is made.
86 Instead,
87 the coordinates and attributes of vertices that would have been drawn
88 if the render mode had been <constant>GL_RENDER</constant> is returned in a feedback buffer,
89 which must be created (see <citerefentry><refentrytitle>glFeedbackBuffer</refentrytitle></citerefentry>) before feedback mode
90 is entered.
91 </para>
92 </listitem>
93 </varlistentry>
94 </variablelist>
95 <para>
96 The return value of <function>glRenderMode</function> is determined by the render mode at the time
97 <function>glRenderMode</function> is called,
98 rather than by <parameter>mode</parameter>.
99 The values returned for the three render modes are as follows:
100 </para>
101 <variablelist>
102 <varlistentry>
103 <term><constant>GL_RENDER</constant></term>
104 <listitem>
105 <para>
106 0.
107 </para>
108 </listitem>
109 </varlistentry>
110 <varlistentry>
111 <term><constant>GL_SELECT</constant></term>
112 <listitem>
113 <para>
114 The number of hit records transferred to the select buffer.
115 </para>
116 </listitem>
117 </varlistentry>
118 <varlistentry>
119 <term><constant>GL_FEEDBACK</constant></term>
120 <listitem>
121 <para>
122 The number of values (not vertices) transferred to the feedback buffer.
123 </para>
124 </listitem>
125 </varlistentry>
126 </variablelist>
127 <para>
128 See the <citerefentry><refentrytitle>glSelectBuffer</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glFeedbackBuffer</refentrytitle></citerefentry> reference pages for
129 more details concerning selection and feedback operation.
130 </para>
131 </refsect1>
132 <refsect1 id="notes"><title>Notes</title>
133 <para>
134 If an error is generated,
135 <function>glRenderMode</function> returns 0 regardless of the current render mode.
136 </para>
137 </refsect1>
138 <refsect1 id="errors"><title>Errors</title>
139 <para>
140 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not one of the three
141 accepted values.
142 </para>
143 <para>
144 <constant>GL_INVALID_OPERATION</constant> is generated if <citerefentry><refentrytitle>glSelectBuffer</refentrytitle></citerefentry> is called
145 while the render mode is <constant>GL_SELECT</constant>,
146 or if <function>glRenderMode</function> is called with argument <constant>GL_SELECT</constant> before
147 <citerefentry><refentrytitle>glSelectBuffer</refentrytitle></citerefentry> is called at least once.
148 </para>
149 <para>
150 <constant>GL_INVALID_OPERATION</constant> is generated if <citerefentry><refentrytitle>glFeedbackBuffer</refentrytitle></citerefentry> is called
151 while the render mode is <constant>GL_FEEDBACK</constant>,
152 or if <function>glRenderMode</function> is called with argument <constant>GL_FEEDBACK</constant> before
153 <citerefentry><refentrytitle>glFeedbackBuffer</refentrytitle></citerefentry> is called at least once.
154 </para>
155 <para>
156 <constant>GL_INVALID_OPERATION</constant> is generated if <function>glRenderMode</function>
157 is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
158 and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
159 </para>
160 </refsect1>
161 <refsect1 id="associatedgets"><title>Associated Gets</title>
162 <para>
163 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_RENDER_MODE</constant>
164 </para>
165 </refsect1>
166 <refsect1 id="seealso"><title>See Also</title>
167 <para>
168 <citerefentry><refentrytitle>glFeedbackBuffer</refentrytitle></citerefentry>,
169 <citerefentry><refentrytitle>glInitNames</refentrytitle></citerefentry>,
170 <citerefentry><refentrytitle>glLoadName</refentrytitle></citerefentry>,
171 <citerefentry><refentrytitle>glPassThrough</refentrytitle></citerefentry>,
172 <citerefentry><refentrytitle>glPushName</refentrytitle></citerefentry>,
173 <citerefentry><refentrytitle>glSelectBuffer</refentrytitle></citerefentry>
174 </para>
175 </refsect1>
176 <refsect1 id="Copyright"><title>Copyright</title>
177 <para>
178 Copyright <trademark class="copyright"></trademark> 1991-2006
179 Silicon Graphics, Inc. This document is licensed under the SGI
180 Free Software B License. For details, see
181 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
182 </para>
183 </refsect1>
184 </refentry>