Commit | Line | Data |
---|---|---|
7faf1d71 AW |
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="glProgramParameter"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>2010</year> | |
9 | <holder>Khronos Group</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glProgramParameter</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glProgramParameter</refname> | |
17 | <refpurpose>specify a parameter for a program object</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>void <function>glProgramParameteri</function></funcdef> | |
23 | <paramdef>GLuint <parameter>program</parameter></paramdef> | |
24 | <paramdef>GLenum <parameter>pname</parameter></paramdef> | |
25 | <paramdef>GLint <parameter>value</parameter></paramdef> | |
26 | </funcprototype> | |
27 | </funcsynopsis> | |
28 | </refsynopsisdiv> | |
29 | <refsect1 id="parameters"><title>Parameters</title> | |
30 | <variablelist> | |
31 | <varlistentry> | |
32 | <term><parameter>program</parameter></term> | |
33 | <listitem> | |
34 | <para> | |
35 | Specifies the name of a program object whose parameter to modify. | |
36 | </para> | |
37 | </listitem> | |
38 | </varlistentry> | |
39 | <varlistentry> | |
40 | <term><parameter>pname</parameter></term> | |
41 | <listitem> | |
42 | <para> | |
43 | Specifies the name of the parameter to modify. | |
44 | </para> | |
45 | </listitem> | |
46 | </varlistentry> | |
47 | <varlistentry> | |
48 | <term><parameter>value</parameter></term> | |
49 | <listitem> | |
50 | <para> | |
51 | Specifies the new value of the parameter specified by <parameter>pname</parameter> for <parameter>program</parameter>. | |
52 | </para> | |
53 | </listitem> | |
54 | </varlistentry> | |
55 | </variablelist> | |
56 | </refsect1> | |
57 | <refsect1 id="description"><title>Description</title> | |
58 | <para> | |
59 | <function>glProgramParameter</function> specifies a new value for the parameter nameed by | |
60 | <parameter>pname</parameter> for the program object <parameter>program</parameter>. | |
61 | </para> | |
62 | <para> | |
63 | If <parameter>pname</parameter> is <constant>GL_PROGRAM_BINARY_RETRIEVABLE_HINT</constant>, | |
64 | <parameter>value</parameter> should be <constant>GL_FALSE</constant> or <constant>GL_TRUE</constant> | |
65 | to indicate to the implementation the intention of the application to retrieve the program's | |
66 | binary representation with <citerefentry><refentrytitle>glGetProgramBinary</refentrytitle></citerefentry>. | |
67 | The implementation may use this information to store information that may be useful for a future | |
68 | query of the program's binary. It is recommended to set <constant>GL_PROGRAM_BINARY_RETRIEVABLE_HINT</constant> | |
69 | for the program to <constant>GL_TRUE</constant> before calling | |
70 | <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>, and | |
71 | using the program at run-time if the binary is to be retrieved later. | |
72 | </para> | |
73 | <para> | |
74 | If <parameter>pname</parameter> is <constant>GL_PROGRAM_SEPARABLE</constant>, <parameter>value</parameter> | |
75 | must be <constant>GL_TRUE</constant> or <constant>GL_FALSE</constant> and indicates whether | |
76 | <parameter>program</parameter> can be bound to individual pipeline stages via | |
77 | <citerefentry><refentrytitle>glUseProgramStages</refentrytitle></citerefentry>. A program's | |
78 | <constant>GL_PROGRAM_SEPARABLE</constant> parameter must be set to <constant>GL_TRUE</constant> | |
79 | <emphasis>before</emphasis> <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> | |
80 | is called in order for it to be usable with a program pipeline object. The initial state of | |
81 | <constant>GL_PROGRAM_SEPARABLE</constant> is <constant>GL_FALSE</constant>. | |
82 | </para> | |
83 | </refsect1> | |
84 | <refsect1 id="errors"><title>Errors</title> | |
85 | <para> | |
86 | <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>program</parameter> is not the | |
87 | name of an existing program object. | |
88 | </para> | |
89 | <para> | |
90 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>pname</parameter> is not one | |
91 | of the accepted values. | |
92 | </para> | |
93 | <para> | |
94 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>value</parameter> is not a valid | |
95 | value for the parameter named by <parameter>pname</parameter>. | |
96 | </para> | |
97 | </refsect1> | |
98 | <refsect1 id="associatedgets"><title>Associated Gets</title> | |
99 | <para> | |
100 | <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>. | |
101 | </para> | |
102 | </refsect1> | |
103 | <refsect1 id="seealso"><title>See Also</title> | |
104 | <para> | |
105 | <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>, | |
106 | <citerefentry><refentrytitle>glGetProgramBinary</refentrytitle></citerefentry>, | |
107 | <citerefentry><refentrytitle>glProgramBinary</refentrytitle></citerefentry> | |
108 | </para> | |
109 | </refsect1> | |
110 | <refsect1 id="Copyright"><title>Copyright</title> | |
111 | <para> | |
112 | Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. | |
113 | This material may be distributed subject to the terms and conditions set forth in | |
114 | the Open Publication License, v 1.0, 8 June 1999. | |
115 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>. | |
116 | </para> | |
117 | </refsect1> | |
118 | </refentry> |