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">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>glProgramParameter
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glProgramParameter
</refname>
17 <refpurpose>specify a parameter for a program object
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
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>
29 <refsect1 id=
"parameters"><title>Parameters
</title>
32 <term><parameter>program
</parameter></term>
35 Specifies the name of a program object whose parameter to modify.
40 <term><parameter>pname
</parameter></term>
43 Specifies the name of the parameter to modify.
48 <term><parameter>value
</parameter></term>
51 Specifies the new value of the parameter specified by
<parameter>pname
</parameter> for
<parameter>program
</parameter>.
57 <refsect1 id=
"description"><title>Description
</title>
59 <function>glProgramParameter
</function> specifies a new value for the parameter nameed by
60 <parameter>pname
</parameter> for the program object
<parameter>program
</parameter>.
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.
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>.
84 <refsect1 id=
"errors"><title>Errors
</title>
86 <constant>GL_INVALID_OPERATION
</constant> is generated if
<parameter>program
</parameter> is not the
87 name of an existing program object.
90 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>pname
</parameter> is not one
91 of the accepted values.
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>.
98 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
100 <citerefentry><refentrytitle>glGetProgram
</refentrytitle></citerefentry>.
103 <refsect1 id=
"seealso"><title>See Also
</title>
105 <citerefentry><refentrytitle>glGetProgram
</refentrytitle></citerefentry>,
106 <citerefentry><refentrytitle>glGetProgramBinary
</refentrytitle></citerefentry>,
107 <citerefentry><refentrytitle>glProgramBinary
</refentrytitle></citerefentry>
110 <refsect1 id=
"Copyright"><title>Copyright
</title>
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>.