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=
"glIsProgram">
6 <refentrytitle>glIsProgram
</refentrytitle>
7 <manvolnum>3G
</manvolnum>
10 <refname>glIsProgram
</refname>
11 <refpurpose>Determines if a name corresponds to a program object
</refpurpose>
13 <refsynopsisdiv><title>C Specification
</title>
16 <funcdef>GLboolean
<function>glIsProgram
</function></funcdef>
17 <paramdef>GLuint
<parameter>program
</parameter></paramdef>
21 <refsect1 id=
"parameters"><title>Parameters
</title>
24 <term><parameter>program
</parameter></term>
26 <para>Specifies a potential program object.
</para>
31 <refsect1 id=
"description"><title>Description
</title>
32 <para><function>glIsProgram
</function> returns
33 <constant>GL_TRUE
</constant> if
<parameter>program
</parameter>
34 is the name of a program object previously created with
35 <citerefentry><refentrytitle>glCreateProgram
</refentrytitle></citerefentry>
36 and not yet deleted with
<citerefentry><refentrytitle>glDeleteProgram
</refentrytitle></citerefentry>.
37 If
<parameter>program
</parameter> is zero or a non-zero value that
38 is not the name of a program object, or if an error occurs,
39 <function>glIsProgram
</function> returns
<constant>GL_FALSE
</constant>.
</para>
41 <refsect1 id=
"notes"><title>Notes
</title>
42 <para><function>glIsProgram
</function> is available only if the
43 GL version is
2.0 or greater.
</para>
45 <para>No error is generated if
<parameter>program
</parameter> is
46 not a valid program object name.
</para>
48 <para>A program object marked for deletion with
<citerefentry><refentrytitle>glDeleteProgram
</refentrytitle></citerefentry>
49 but still in use as part of current rendering state is still considered
50 a program object and
<function>glIsProgram
</function> will return
<constant>GL_TRUE
</constant>.
</para>
52 <refsect1 id=
"errors"><title>Errors
</title>
53 <para><constant>GL_INVALID_OPERATION
</constant> is generated if
54 <function>glIsProgram
</function> is executed between the
56 <citerefentry><refentrytitle>glBegin
</refentrytitle></citerefentry>
57 and the corresponding execution of
58 <citerefentry><refentrytitle>glEnd
</refentrytitle></citerefentry>.
</para>
60 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
61 <para><citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry>
62 with the argument
<constant>GL_CURRENT_PROGRAM
</constant></para>
64 <para><citerefentry><refentrytitle>glGetActiveAttrib
</refentrytitle></citerefentry>
65 with arguments
<parameter>program
</parameter> and the index of
66 an active attribute variable
</para>
68 <para><citerefentry><refentrytitle>glGetActiveUniform
</refentrytitle></citerefentry>
69 with arguments
<parameter>program
</parameter> and the index of
70 an active uniform variable
</para>
72 <para><citerefentry><refentrytitle>glGetAttachedShaders
</refentrytitle></citerefentry>
73 with argument
<parameter>program
</parameter></para>
75 <para><citerefentry><refentrytitle>glGetAttribLocation
</refentrytitle></citerefentry>
76 with arguments
<parameter>program
</parameter> and the name of an
77 attribute variable
</para>
79 <para><citerefentry><refentrytitle>glGetProgram
</refentrytitle></citerefentry>
80 with arguments
<parameter>program
</parameter> and the parameter
83 <para><citerefentry><refentrytitle>glGetProgramInfoLog
</refentrytitle></citerefentry>
84 with argument
<parameter>program
</parameter></para>
86 <para><citerefentry><refentrytitle>glGetUniform
</refentrytitle></citerefentry>
87 with arguments
<parameter>program
</parameter> and the location
88 of a uniform variable
</para>
90 <para><citerefentry><refentrytitle>glGetUniformLocation
</refentrytitle></citerefentry>
91 with arguments
<parameter>program
</parameter> and the name of a
92 uniform variable
</para>
94 <refsect1 id=
"seealso"><title>See Also
</title>
95 <para><citerefentry><refentrytitle>glAttachShader
</refentrytitle></citerefentry>,
96 <citerefentry><refentrytitle>glBindAttribLocation
</refentrytitle></citerefentry>,
97 <citerefentry><refentrytitle>glCreateProgram
</refentrytitle></citerefentry>,
98 <citerefentry><refentrytitle>glDeleteProgram
</refentrytitle></citerefentry>,
99 <citerefentry><refentrytitle>glDetachShader
</refentrytitle></citerefentry>,
100 <citerefentry><refentrytitle>glLinkProgram
</refentrytitle></citerefentry>,
101 <citerefentry><refentrytitle>glUniform
</refentrytitle></citerefentry>,
102 <citerefentry><refentrytitle>glUseProgram
</refentrytitle></citerefentry>,
103 <citerefentry><refentrytitle>glValidateProgram
</refentrytitle></citerefentry></para>
105 <refsect1 id=
"Copyright"><title>Copyright
</title>
107 Copyright
<trademark class=
"copyright"></trademark> 2003-
2005 3Dlabs Inc. Ltd.
108 This material may be distributed subject to the terms and conditions set forth in
109 the Open Publication License, v
1.0,
8 June
1999.
110 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.