rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man4 / glShaderBinary.xml
CommitLineData
7faf1d71
AW
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="glShaderBinary">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2010</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glShaderBinary</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glShaderBinary</refname>
17 <refpurpose>load pre-compiled shader binaries</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glShaderBinary</function></funcdef>
23 <paramdef>GLsizei <parameter>count</parameter></paramdef>
24 <paramdef>const GLuint *<parameter>shaders</parameter></paramdef>
25 <paramdef>GLenum <parameter>binaryFormat</parameter></paramdef>
26 <paramdef>const void *<parameter>binary</parameter></paramdef>
27 <paramdef>GLsizei <parameter>length</parameter></paramdef>
28 </funcprototype>
29 </funcsynopsis>
30 </refsynopsisdiv>
31 <refsect1 id="parameters"><title>Parameters</title>
32 <variablelist>
33 <varlistentry>
34 <term><parameter>count</parameter></term>
35 <listitem>
36 <para>
37 Specifies the number of shader object handles contained in <parameter>shaders</parameter>.
38 </para>
39 </listitem>
40 </varlistentry>
41 <varlistentry>
42 <term><parameter>shaders</parameter></term>
43 <listitem>
44 <para>
45 Specifies the address of an array of shader handles into which to load pre-compiled shader binaries.
46 </para>
47 </listitem>
48 </varlistentry>
49 <varlistentry>
50 <term><parameter>binaryFormat</parameter></term>
51 <listitem>
52 <para>
53 Specifies the format of the shader binaries contained in <parameter>binary</parameter>.
54 </para>
55 </listitem>
56 </varlistentry>
57 <varlistentry>
58 <term><parameter>binary</parameter></term>
59 <listitem>
60 <para>
61 Specifies the address of an array of bytes containing pre-compiled binary shader code.
62 </para>
63 </listitem>
64 </varlistentry>
65 <varlistentry>
66 <term><parameter>length</parameter></term>
67 <listitem>
68 <para>
69 Specifies the length of the array whose address is given in <parameter>binary</parameter>.
70 </para>
71 </listitem>
72 </varlistentry>
73 </variablelist>
74 </refsect1>
75 <refsect1 id="description"><title>Description</title>
76 <para>
77 <function>glShaderBinary</function> loads pre-compiled shader binary code into the <parameter>count</parameter>
78 shader objects whose handles are given in <parameter>shaders</parameter>. <parameter>binary</parameter>
79 points to <parameter>length</parameter> bytes of binary shader code stored in client memory.
80 <parameter>binaryFormat</parameter> specifies the format of the pre-compiled code.
81 </para>
82 <para>
83 The binary image contained in <parameter>binary</parameter> will be decoded according to the extension
84 specification defining the specified <parameter>binaryFormat</parameter> token. OpenGL
85 does not define any specific binary formats, but it does provide a mechanism to obtain token
86 vaues for such formats provided by such extensions.
87 </para>
88 <para>
89 Depending on the types of the shader objects in <parameter>shaders</parameter>, <function>glShaderBinary</function>
90 will individually load binary vertex or fragment shaders, or load an executable binary that contains an optimized
91 pair of vertex and fragment shaders stored in the same binary.
92 </para>
93 </refsect1>
94 <refsect1 id="errors"><title>Errors</title>
95 <para>
96 <constant>GL_INVALID_OPERATION</constant> is generated if more than one of the handles in
97 <parameter>shaders</parameter> refers to the same shader object.
98 </para>
99 <para>
100 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>binaryFormat</parameter> is not an
101 accepted value.
102 </para>
103 <para>
104 <constant>GL_INVALID_VALUE</constant> is generated if the data pointed to by <parameter>binary</parameter>
105 does not match the format specified by <parameter>binaryFormat</parameter>.
106 </para>
107 </refsect1>
108 <refsect1 id="associatedgets"><title>Associated Gets</title>
109 <para>
110 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with parameter <constant>GL_NUM_SHADER_BINARY_FORMATS</constant>.
111 </para>
112 <para>
113 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with parameter <constant>GL_SHADER_BINARY_FORMATS</constant>.
114 </para>
115 </refsect1>
116 <refsect1 id="seealso"><title>See Also</title>
117 <para>
118 <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>,
119 <citerefentry><refentrytitle>glGetProgramBinary</refentrytitle></citerefentry>,
120 <citerefentry><refentrytitle>glProgramBinary</refentrytitle></citerefentry>
121 </para>
122 </refsect1>
123 <refsect1 id="Copyright"><title>Copyright</title>
124 <para>
125 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group.
126 This material may be distributed subject to the terms and conditions set forth in
127 the Open Publication License, v 1.0, 8 June 1999.
128 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
129 </para>
130 </refsect1>
131</refentry>