rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man2 / glIsProgram.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="glIsProgram">
5 <refmeta>
6 <refentrytitle>glIsProgram</refentrytitle>
7 <manvolnum>3G</manvolnum>
8 </refmeta>
9 <refnamediv>
10 <refname>glIsProgram</refname>
11 <refpurpose>Determines if a name corresponds to a program object</refpurpose>
12 </refnamediv>
13 <refsynopsisdiv><title>C Specification</title>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>GLboolean <function>glIsProgram</function></funcdef>
17 <paramdef>GLuint <parameter>program</parameter></paramdef>
18 </funcprototype>
19 </funcsynopsis>
20 </refsynopsisdiv>
21 <refsect1 id="parameters"><title>Parameters</title>
22 <variablelist>
23 <varlistentry>
24 <term><parameter>program</parameter></term>
25 <listitem>
26 <para>Specifies a potential program object.</para>
27 </listitem>
28 </varlistentry>
29 </variablelist>
30 </refsect1>
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>
40 </refsect1>
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>
44
45 <para>No error is generated if <parameter>program</parameter> is
46 not a valid program object name.</para>
47
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>
51 </refsect1>
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
55 execution of
56 <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
57 and the corresponding execution of
58 <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
59 </refsect1>
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>
63
64 <para><citerefentry><refentrytitle>glGetActiveAttrib</refentrytitle></citerefentry>
65 with arguments <parameter>program</parameter> and the index of
66 an active attribute variable</para>
67
68 <para><citerefentry><refentrytitle>glGetActiveUniform</refentrytitle></citerefentry>
69 with arguments <parameter>program</parameter> and the index of
70 an active uniform variable</para>
71
72 <para><citerefentry><refentrytitle>glGetAttachedShaders</refentrytitle></citerefentry>
73 with argument <parameter>program</parameter></para>
74
75 <para><citerefentry><refentrytitle>glGetAttribLocation</refentrytitle></citerefentry>
76 with arguments <parameter>program</parameter> and the name of an
77 attribute variable</para>
78
79 <para><citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
80 with arguments <parameter>program</parameter> and the parameter
81 to be queried</para>
82
83 <para><citerefentry><refentrytitle>glGetProgramInfoLog</refentrytitle></citerefentry>
84 with argument <parameter>program</parameter></para>
85
86 <para><citerefentry><refentrytitle>glGetUniform</refentrytitle></citerefentry>
87 with arguments <parameter>program</parameter> and the location
88 of a uniform variable</para>
89
90 <para><citerefentry><refentrytitle>glGetUniformLocation</refentrytitle></citerefentry>
91 with arguments <parameter>program</parameter> and the name of a
92 uniform variable</para>
93 </refsect1>
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>
104 </refsect1>
105 <refsect1 id="Copyright"><title>Copyright</title>
106 <para>
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>.
111 </para>
112 </refsect1>
113 </refentry>