rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man2 / xhtml / glRenderMode.xml
CommitLineData
7faf1d71
AW
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
2<!-- saved from url=(0013)about:internet -->
3<?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>glRenderMode</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glRenderMode"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glRenderMode — set rasterization mode</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">GLint <b class="fsfunc">glRenderMode</b>(</code></td><td>GLenum  </td><td><var class="pdparam">mode</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>mode</code></em></span></dt><dd><p>
4 Specifies the rasterization mode.
5 Three values are accepted:
6 <code class="constant">GL_RENDER</code>,
7 <code class="constant">GL_SELECT</code>, and
8 <code class="constant">GL_FEEDBACK</code>.
9 The initial value is <code class="constant">GL_RENDER</code>.
10 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
11 <code class="function">glRenderMode</code> sets the rasterization mode.
12 It takes one argument,
13 <em class="parameter"><code>mode</code></em>,
14 which can assume one of three predefined values:
15 </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_RENDER</code></span></dt><dd><p>
16 Render mode. Primitives are rasterized,
17 producing pixel fragments,
18 which are written into the frame buffer.
19 This is the normal mode
20 and also the default mode.
21 </p></dd><dt><span class="term"><code class="constant">GL_SELECT</code></span></dt><dd><p>
22 Selection mode.
23 No pixel fragments are produced,
24 and no change to the frame buffer contents is made.
25 Instead,
26 a record of the names of primitives that would have been drawn
27 if the render mode had been <code class="constant">GL_RENDER</code> is returned in a select buffer,
28 which must be created (see <a class="citerefentry" href="glSelectBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glSelectBuffer</span></span></a>) before selection mode
29 is entered.
30 </p></dd><dt><span class="term"><code class="constant">GL_FEEDBACK</code></span></dt><dd><p>
31 Feedback mode.
32 No pixel fragments are produced,
33 and no change to the frame buffer contents is made.
34 Instead,
35 the coordinates and attributes of vertices that would have been drawn
36 if the render mode had been <code class="constant">GL_RENDER</code> is returned in a feedback buffer,
37 which must be created (see <a class="citerefentry" href="glFeedbackBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glFeedbackBuffer</span></span></a>) before feedback mode
38 is entered.
39 </p></dd></dl></div><p>
40 The return value of <code class="function">glRenderMode</code> is determined by the render mode at the time
41 <code class="function">glRenderMode</code> is called,
42 rather than by <em class="parameter"><code>mode</code></em>.
43 The values returned for the three render modes are as follows:
44 </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_RENDER</code></span></dt><dd><p>
45 0.
46 </p></dd><dt><span class="term"><code class="constant">GL_SELECT</code></span></dt><dd><p>
47 The number of hit records transferred to the select buffer.
48 </p></dd><dt><span class="term"><code class="constant">GL_FEEDBACK</code></span></dt><dd><p>
49 The number of values (not vertices) transferred to the feedback buffer.
50 </p></dd></dl></div><p>
51 See the <a class="citerefentry" href="glSelectBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glSelectBuffer</span></span></a> and <a class="citerefentry" href="glFeedbackBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glFeedbackBuffer</span></span></a> reference pages for
52 more details concerning selection and feedback operation.
53 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
54 If an error is generated,
55 <code class="function">glRenderMode</code> returns 0 regardless of the current render mode.
56 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
57 <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>mode</code></em> is not one of the three
58 accepted values.
59 </p><p>
60 <code class="constant">GL_INVALID_OPERATION</code> is generated if <a class="citerefentry" href="glSelectBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glSelectBuffer</span></span></a> is called
61 while the render mode is <code class="constant">GL_SELECT</code>,
62 or if <code class="function">glRenderMode</code> is called with argument <code class="constant">GL_SELECT</code> before
63 <a class="citerefentry" href="glSelectBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glSelectBuffer</span></span></a> is called at least once.
64 </p><p>
65 <code class="constant">GL_INVALID_OPERATION</code> is generated if <a class="citerefentry" href="glFeedbackBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glFeedbackBuffer</span></span></a> is called
66 while the render mode is <code class="constant">GL_FEEDBACK</code>,
67 or if <code class="function">glRenderMode</code> is called with argument <code class="constant">GL_FEEDBACK</code> before
68 <a class="citerefentry" href="glFeedbackBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glFeedbackBuffer</span></span></a> is called at least once.
69 </p><p>
70 <code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glRenderMode</code>
71 is executed between the execution of <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a>
72 and the corresponding execution of <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>.
73 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
74 <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_RENDER_MODE</code>
75 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
76 <a class="citerefentry" href="glFeedbackBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glFeedbackBuffer</span></span></a>,
77 <a class="citerefentry" href="glInitNames.xml"><span class="citerefentry"><span class="refentrytitle">glInitNames</span></span></a>,
78 <a class="citerefentry" href="glLoadName.xml"><span class="citerefentry"><span class="refentrytitle">glLoadName</span></span></a>,
79 <a class="citerefentry" href="glPassThrough.xml"><span class="citerefentry"><span class="refentrytitle">glPassThrough</span></span></a>,
80 <a class="citerefentry" href="glPushName.xml"><span class="citerefentry"><span class="refentrytitle">glPushName</span></span></a>,
81 <a class="citerefentry" href="glSelectBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glSelectBuffer</span></span></a>
82 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
83 Copyright <span class="trademark"></span>© 1991-2006
84 Silicon Graphics, Inc. This document is licensed under the SGI
85 Free Software B License. For details, see
86 <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
87 </p></div></div></body></html>