rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man4 / glCompileShader.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="glCompileShader">
5 <refmeta>
6 <refentrytitle>glCompileShader</refentrytitle>
7 <manvolnum>3G</manvolnum>
8 </refmeta>
9 <refnamediv>
10 <refname>glCompileShader</refname>
11 <refpurpose>Compiles a shader object</refpurpose>
12 </refnamediv>
13 <refsynopsisdiv><title>C Specification</title>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>void <function>glCompileShader</function></funcdef>
17 <paramdef>GLuint <parameter>shader</parameter></paramdef>
18 </funcprototype>
19 </funcsynopsis>
20 </refsynopsisdiv>
21 <refsect1 id="parameters"><title>Parameters</title>
22 <variablelist>
23 <varlistentry>
24 <term><parameter>shader</parameter></term>
25 <listitem>
26 <para>Specifies the shader object to be
27 compiled.</para>
28 </listitem>
29 </varlistentry>
30 </variablelist>
31 </refsect1>
32 <refsect1 id="description"><title>Description</title>
33 <para><function>glCompileShader</function> compiles the source
34 code strings that have been stored in the shader object
35 specified by <parameter>shader</parameter>.</para>
36
37 <para>The compilation status will be stored as part of the
38 shader object's state. This value will be set to
39 <constant>GL_TRUE</constant> if the shader was compiled without
40 errors and is ready for use, and <constant>GL_FALSE</constant>
41 otherwise. It can be queried by calling
42 <citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry>
43 with arguments <parameter>shader</parameter> and
44 <constant>GL_COMPILE_STATUS</constant>.</para>
45
46 <para>Compilation of a shader can fail for a number of reasons
47 as specified by the OpenGL Shading Language Specification.
48 Whether or not the compilation was successful, information about
49 the compilation can be obtained from the shader object's
50 information log by calling
51 <citerefentry><refentrytitle>glGetShaderInfoLog</refentrytitle></citerefentry>.</para>
52 </refsect1>
53 <refsect1 id="errors"><title>Errors</title>
54 <para><constant>GL_INVALID_VALUE</constant> is generated if
55 <parameter>shader</parameter> is not a value generated by
56 OpenGL.</para>
57
58 <para><constant>GL_INVALID_OPERATION</constant> is generated if
59 <parameter>shader</parameter> is not a shader object.</para>
60
61 </refsect1>
62 <refsect1 id="associatedgets"><title>Associated Gets</title>
63 <para><citerefentry><refentrytitle>glGetShaderInfoLog</refentrytitle></citerefentry>
64 with argument <parameter>shader</parameter></para>
65
66 <para><citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry>
67 with arguments <parameter>shader</parameter> and
68 <constant>GL_COMPILE_STATUS</constant></para>
69 <para><citerefentry><refentrytitle>glIsShader</refentrytitle></citerefentry></para>
70 </refsect1>
71 <refsect1 id="seealso"><title>See Also</title>
72 <para><citerefentry><refentrytitle>glCreateShader</refentrytitle></citerefentry>,
73 <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
74 <citerefentry><refentrytitle>glShaderSource</refentrytitle></citerefentry></para>
75 </refsect1>
76 <refsect1 id="Copyright"><title>Copyright</title>
77 <para>
78 Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
79 This material may be distributed subject to the terms and conditions set forth in
80 the Open Publication License, v 1.0, 8 June 1999.
81 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
82 </para>
83 </refsect1>
84 </refentry>