rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man2 / glGetProgramInfoLog.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="glGetProgramInfoLog">
5 <refmeta>
6 <refentrytitle>glGetProgramInfoLog</refentrytitle>
7 <manvolnum>3G</manvolnum>
8 </refmeta>
9 <refnamediv>
10 <refname>glGetProgramInfoLog</refname>
11 <refpurpose>Returns the information log for a program object</refpurpose>
12 </refnamediv>
13 <refsynopsisdiv><title>C Specification</title>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>void <function>glGetProgramInfoLog</function></funcdef>
17 <paramdef>GLuint <parameter>program</parameter></paramdef>
18 <paramdef>GLsizei <parameter>maxLength</parameter></paramdef>
19 <paramdef>GLsizei *<parameter>length</parameter></paramdef>
20 <paramdef>GLchar *<parameter>infoLog</parameter></paramdef>
21 </funcprototype>
22 </funcsynopsis>
23 </refsynopsisdiv>
24 <refsect1 id="parameters"><title>Parameters</title>
25 <variablelist>
26 <varlistentry>
27 <term><parameter>program</parameter></term>
28 <listitem>
29 <para>Specifies the program object whose information
30 log is to be queried.</para>
31 </listitem>
32 </varlistentry>
33 <varlistentry>
34 <term><parameter>maxLength</parameter></term>
35 <listitem>
36 <para>Specifies the size of the character buffer for
37 storing the returned information log.</para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>length</parameter></term>
42 <listitem>
43 <para>Returns the length of the string returned in
44 <parameter>infoLog</parameter> (excluding the null
45 terminator).</para>
46 </listitem>
47 </varlistentry>
48 <varlistentry>
49 <term><parameter>infoLog</parameter></term>
50 <listitem>
51 <para>Specifies an array of characters that is used
52 to return the information log.</para>
53 </listitem>
54 </varlistentry>
55 </variablelist>
56 </refsect1>
57 <refsect1 id="description"><title>Description</title>
58 <para><function>glGetProgramInfoLog</function> returns the
59 information log for the specified program object. The
60 information log for a program object is modified when the
61 program object is linked or validated. The string that is
62 returned will be null terminated.</para>
63
64 <para><function>glGetProgramInfoLog</function> returns in
65 <parameter>infoLog</parameter> as much of the information log as
66 it can, up to a maximum of <parameter>maxLength</parameter>
67 characters. The number of characters actually returned,
68 excluding the null termination character, is specified by
69 <parameter>length</parameter>. If the length of the returned
70 string is not required, a value of <constant>NULL</constant> can
71 be passed in the <parameter>length</parameter> argument. The
72 size of the buffer required to store the returned information
73 log can be obtained by calling
74 <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
75 with the value <constant>GL_INFO_LOG_LENGTH</constant>. </para>
76
77 <para>The information log for a program object is either an
78 empty string, or a string containing information about the last
79 link operation, or a string containing information about the
80 last validation operation. It may contain diagnostic messages,
81 warning messages, and other information. When a program object
82 is created, its information log will be a string of length
83 0.</para>
84 </refsect1>
85 <refsect1 id="notes"><title>Notes</title>
86 <para><function>glGetProgramInfoLog</function> is available only
87 if the GL version is 2.0 or greater.</para>
88
89 <para>The information log for a program object is the OpenGL
90 implementer's primary mechanism for conveying information about
91 linking and validating. Therefore, the information log can be
92 helpful to application developers during the development
93 process, even when these operations are successful. Application
94 developers should not expect different OpenGL implementations to
95 produce identical information logs.</para>
96 </refsect1>
97 <refsect1 id="errors"><title>Errors</title>
98 <para><constant>GL_INVALID_VALUE</constant> is generated if
99 <parameter>program</parameter> is not a value generated by
100 OpenGL.</para>
101
102 <para><constant>GL_INVALID_OPERATION</constant> is generated if
103 <parameter>program</parameter> is not a program object.</para>
104
105 <para><constant>GL_INVALID_VALUE</constant> is generated if
106 <parameter>maxLength</parameter> is less than 0.</para>
107
108 <para><constant>GL_INVALID_OPERATION</constant> is generated if
109 <function>glGetProgramInfoLog</function> is executed between the
110 execution of
111 <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
112 and the corresponding execution of
113 <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
114 </refsect1>
115 <refsect1 id="associatedgets"><title>Associated Gets</title>
116 <para><citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
117 with argument <constant>GL_INFO_LOG_LENGTH</constant></para>
118
119 <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
120 </refsect1>
121 <refsect1 id="seealso"><title>See Also</title>
122 <para><citerefentry><refentrytitle>glCompileShader</refentrytitle></citerefentry>,
123 <citerefentry><refentrytitle>glGetShaderInfoLog</refentrytitle></citerefentry>,
124 <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
125 <citerefentry><refentrytitle>glValidateProgram</refentrytitle></citerefentry></para>
126 </refsect1>
127 <refsect1 id="Copyright"><title>Copyright</title>
128 <para>
129 Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
130 This material may be distributed subject to the terms and conditions set forth in
131 the Open Publication License, v 1.0, 8 June 1999.
132 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
133 </para>
134 </refsect1>
135 </refentry>