rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man4 / glPatchParameter.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="glPatchParameter">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2010</year>
9 <holder>Khronos Group.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glPatchParameter</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glPatchParameter</refname>
17 <refpurpose>specifies the parameters for patch primitives</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glPatchParameteri</function></funcdef>
23 <paramdef>GLenum <parameter>pname</parameter></paramdef>
24 <paramdef>GLint <parameter>value</parameter></paramdef>
25 </funcprototype>
26 </funcsynopsis>
27 <funcsynopsis>
28 <funcprototype>
29 <funcdef>void <function>glPatchParameterfv</function></funcdef>
30 <paramdef>GLenum <parameter>pname</parameter></paramdef>
31 <paramdef>const GLfloat *<parameter>values</parameter></paramdef>
32 </funcprototype>
33 </funcsynopsis>
34 </refsynopsisdiv>
35 <!-- eqn: ignoring delim $$ -->
36 <refsect1 id="parameters"><title>Parameters</title>
37 <variablelist>
38 <varlistentry>
39 <term><parameter>pname</parameter></term>
40 <listitem>
41 <para>
42 Specifies the name of the parameter to set. The symbolc constants <constant>GL_PATCH_VERTICES</constant>,
43 <constant>GL_PATCH_DEFAULT_OUTER_LEVEL</constant>, and <constant>GL_PATCH_DEFAULT_INNER_LEVEL</constant> are accepted.
44 </para>
45 </listitem>
46 </varlistentry>
47 <varlistentry>
48 <term><parameter>value</parameter></term>
49 <listitem>
50 <para>
51 Specifies the new value for the parameter given by <parameter>pname</parameter>.
52 </para>
53 </listitem>
54 </varlistentry>
55 <varlistentry>
56 <term><parameter>values</parameter></term>
57 <listitem>
58 <para>
59 Specifies the address of an array containing the new values for the parameter given by <parameter>pname</parameter>.
60 </para>
61 </listitem>
62 </varlistentry>
63 </variablelist>
64 </refsect1>
65 <refsect1 id="description"><title>Description</title>
66 <para>
67 <function>glPatchParameter</function> specifies the parameters that will be used for patch primitives. <parameter>pname</parameter>
68 specifies the parameter to modify and must be either <constant>GL_PATCH_VERTICES</constant>, <constant>GL_PATCH_DEFAULT_OUTER_LEVEL</constant>
69 or <constant>GL_PATCH_DEFAULT_INNER_LEVEL</constant>. For <function>glPatchParameteri</function>, <parameter>value</parameter> specifies
70 the new value for the parameter specified by <parameter>pname</parameter>. For <function>glPatchParameterfv</function>, <parameter>values</parameter>
71 specifies the address of an array containing the new values for the parameter specified by <parameter>pname</parameter>.
72 </para>
73 <para>
74 When <parameter>pname</parameter> is <constant>GL_PATCH_VERTICES</constant>, <parameter>value</parameter> specifies the number
75 of vertices that will be used to make up a single patch primitive. Patch primitives are consumed by the tessellation control
76 shader (if present) and subsequently used for tessellation. When primitives are specified using
77 <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry> or a similar function, each patch will be made
78 from <parameter>parameter</parameter> control points, each represented by a vertex taken from the enabeld vertex arrays.
79 <parameter>parameter</parameter> must be greater than zero, and less than or equal to the value of <constant>GL_MAX_PATCH_VERTICES</constant>.
80 </para>
81 <para>
82 When <parameter>pname</parameter> is <constant>GL_PATCH_DEFAULT_OUTER_LEVEL</constant> or <constant>GL_PATCH_DEFAULT_INNER_LEVEL</constant>,
83 <parameter>values</parameter> contains the address of an array contiaining the default outer or inner tessellation levels, respectively,
84 to be used when no tessellation control shader is present.
85 </para>
86 </refsect1>
87 <refsect1 id="errors"><title>Errors</title>
88 <para>
89 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>pname</parameter> is not an accepted value.
90 </para>
91 <para>
92 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>pname</parameter> is <constant>GL_PATCH_VERTICES</constant>
93 and <parameter>value</parameter> is less than or equal to zero, or greater than the value of <constant>GL_MAX_PATCH_VERTICES</constant>.
94 </para>
95 </refsect1>
96 <refsect1 id="seealso"><title>See Also</title>
97 <para>
98 <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
99 <citerefentry><refentrytitle>glDrawArraysInstanced</refentrytitle></citerefentry>,
100 <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
101 <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
102 </para>
103 </refsect1>
104 <refsect1 id="Copyright"><title>Copyright</title>
105 <para>
106 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group.
107 This material may be distributed subject to the terms and conditions set forth in
108 the Open Publication License, v 1.0, 8 June 1999.
109 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
110 </para>
111 </refsect1>
112 </refentry>