include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man4 / xhtml / glGetProgramResourceIndex.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
3 <!-- saved from url=(0013)about:internet -->
4 <?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="stylesheet" type="text/css" href="opengl-man.css" /><title>glGetProgramResourceIndex - OpenGL 4 Reference Pages</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glGetProgramResourceIndex"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glGetProgramResourceIndex — query the index of a named resource within a program</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">GLuint <b class="fsfunc">glGetProgramResourceIndex</b>(</code></td><td>GLuint  </td><td><var class="pdparam">program</var>, </td></tr><tr><td> </td><td>GLenum  </td><td><var class="pdparam">programInterface</var>, </td></tr><tr><td> </td><td>const char *  </td><td><var class="pdparam">name</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>program</code></em></span></dt><dd><p>
5 The name of a program object whose resources to query.
6 </p></dd><dt><span class="term"><em class="parameter"><code>programInterface</code></em></span></dt><dd><p>
7 A token identifying the interface within <em class="parameter"><code>program</code></em> containing the resource named <em class="parameter"><code>name</code></em>.
8 </p></dd><dt><span class="term"><em class="parameter"><code>name</code></em></span></dt><dd><p>
9 The name of the resource to query the index of.
10 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
11 <code class="function">glGetProgramResourceIndex</code> returns the unsigned
12 integer index assigned to a resource named <em class="parameter"><code>name</code></em> in
13 the interface type <em class="parameter"><code>programInterface</code></em> of program object <em class="parameter"><code>program</code></em>.
14 </p><p>
15 <em class="parameter"><code>program</code></em> must be the name of an existing program object. <em class="parameter"><code>programInterface</code></em>
16 is the name of the interface within <em class="parameter"><code>program</code></em> which contains the resource named
17 <em class="parameter"><code>name</code></em>and must be one of the following
18 values:
19 </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_UNIFORM</code></span></dt><dd><p>
20 The query is targeted at the set of active uniforms within <em class="parameter"><code>program</code></em>.
21 </p></dd><dt><span class="term"><code class="constant">GL_UNIFORM_BLOCK</code></span></dt><dd><p>
22 The query is targeted at the set of active uniform blocks within <em class="parameter"><code>program</code></em>.
23 </p></dd><dt><span class="term"><code class="constant">GL_PROGRAM_INPUT</code></span></dt><dd><p>
24 The query is targeted at the set of active input variables used by the first shader stage of <em class="parameter"><code>program</code></em>.
25 If <em class="parameter"><code>program</code></em> contains multiple shader stages then input variables from any stage other than the first
26 will not be enumerated.
27 </p></dd><dt><span class="term"><code class="constant">GL_PROGRAM_OUTPUT</code></span></dt><dd><p>
28 The query is targeted at the set of active output variables produced by the last shader stage of <em class="parameter"><code>program</code></em>.
29 If <em class="parameter"><code>program</code></em> contains multiple shader stages then output variables from any stage other than the last
30 will not be enumerated.
31 </p></dd><dt><span class="term"><code class="constant">GL_VERTEX_SUBROUTINE</code>, </span><span class="term"><code class="constant">GL_TESS_CONTROL_SUBROUTINE</code>, </span><span class="term"><code class="constant">GL_TESS_EVALUATION_SUBROUTINE</code>, </span><span class="term"><code class="constant">GL_GEOMETRY_SUBROUTINE</code>, </span><span class="term"><code class="constant">GL_FRAGMENT_SUBROUTINE</code>, </span><span class="term"><code class="constant">GL_COMPUTE_SUBROUTINE</code></span></dt><dd><p>
32 The query is targeted at the set of active subroutines for the vertex, tessellation control, tessellation evaluation,
33 geometry, fragment and compute shader stages of <em class="parameter"><code>program</code></em>, respectively.
34 </p></dd><dt><span class="term"><code class="constant">GL_VERTEX_SUBROUTINE_UNIFORM</code>, </span><span class="term"><code class="constant">GL_TESS_CONTROL_SUBROUTINE_UNIFORM</code>, </span><span class="term"><code class="constant">GL_TESS_EVALUATION_SUBROUTINE_UNIFORM</code>, </span><span class="term"><code class="constant">GL_GEOMETRY_SUBROUTINE_UNIFORM</code>, </span><span class="term"><code class="constant">GL_FRAGMENT_SUBROUTINE_UNIFORM</code>, </span><span class="term"><code class="constant">GL_COMPUTE_SUBROUTINE_UNIFORM</code></span></dt><dd><p>
35 The query is targeted at the set of active subroutine uniform variables used by the vertex, tessellation control, tessellation evaluation,
36 geometry, fragment and compute shader stages of <em class="parameter"><code>program</code></em>, respectively.
37 </p></dd><dt><span class="term"><code class="constant">GL_TRANSFORM_FEEDBACK_VARYING</code></span></dt><dd><p>
38 The query is targeted at the set of output variables from the last non-fragment stage of <em class="parameter"><code>program</code></em> that would be
39 captured if transform feedback were active.
40 </p></dd><dt><span class="term"><code class="constant">GL_BUFFER_VARIABLE</code></span></dt><dd><p>
41 The query is targeted at the set of active buffer variables used by <em class="parameter"><code>program</code></em>.
42 </p></dd><dt><span class="term"><code class="constant">GL_SHADER_STORAGE_BLOCK</code></span></dt><dd><p>
43 The query is targeted at the set of active shader storage blocks used by <em class="parameter"><code>program</code></em>.
44 </p></dd></dl></div><p>
45 If <em class="parameter"><code>name</code></em> exactly matches the name string of one of the active resources
46 for <em class="parameter"><code>programInterface</code></em>, the index of the matched resource is returned.
47 Additionally, if <em class="parameter"><code>name</code></em> would exactly match the name string of an active
48 resource if "[0]" were appended to <em class="parameter"><code>name</code></em>, the index of the matched
49 resource is returned. Otherwise, <em class="parameter"><code>name</code></em> is considered not to be the name
50 of an active resource, and <code class="constant">GL_INVALID_INDEX</code> is returned.
51 </p><p>
52 For the interface <code class="constant">GL_TRANSFORM_FEEDBACK_VARYING</code>, the value <code class="constant">GL_INVALID_INDEX</code>
53 should be returned when querying the index assigned to the special names
54 <code class="code">gl_NextBuffer</code>, <code class="code">gl_SkipComponents1</code>, <code class="code">gl_SkipComponents2</code>,
55 <code class="code">gl_SkipComponents3</code>, or <code class="code">gl_SkipComponents4</code>.
56 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
57 <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>programInterface</code></em>
58 is not one of the accepted interface types.
59 </p><p>
60 Although not an error, <code class="constant">GL_INVALID_INDEX</code> is returned if <em class="parameter"><code>name</code></em>
61 is not the name of a resource within the interface identified by <em class="parameter"><code>programInterface</code></em>.
62 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
63 <a href="glGetProgramResourceName.xml"><span class="citerefentry"><span class="refentrytitle">glGetProgramResourceName</span></span></a>,
64 <a href="glGetGetProgramResource.xml"><span class="citerefentry"><span class="refentrytitle">glGetGetProgramResource</span></span></a>,
65 <a href="glGetProgramResourceLocation.xml"><span class="citerefentry"><span class="refentrytitle">glGetProgramResourceLocation</span></span></a>,
66 <a href="glGetProgramResourceLocationIndex.xml"><span class="citerefentry"><span class="refentrytitle">glGetProgramResourceLocationIndex</span></span></a>.
67 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
68 Copyright <span class="trademark"></span>© 2012 Khronos Group.
69 This material may be distributed subject to the terms and conditions set forth in
70 the Open Publication License, v 1.0, 8 June 1999.
71 <a href="http://opencontent.org/openpub/" target="_top">http://opencontent.org/openpub/</a>.
72 </p></div></div></body></html>