<p>For whatever reason, the text for that function documentation was copied from the GL_ARB_program_interface_query extension. Extensions in OpenGL are always defined relative to a specific version of the OpenGL specification. So if an extension references something in a specification, it's talking about that version of the spec.</p>
<p>However, the OpenGL specification was <em>massively</em> restructured between 4.2 and 4.3, with whole chapters moved around. This means that table references in 4.2 become completely wrong relative to 4.3 and above.</p>
<p>Program interface query was written against the 4.2 specification. Oddly enough, there is no table 2.16 in that spec; the correct number for that table is 2.13 (so it's likely a typo, since 3 is right below 6 on a number-pad). But even if the extension did mention the right table number, that table moved to a whole different chapter in 4.3+ versions. It's been renumbered and moved since then, so you'll have to look at a particular specification's definition of <code>glGetProgramResourceiv</code> to find it.</p>
<p>In general, if you find something incongruous in the documentation pages, you should look at the <a href="https://www.khronos.org/registry/OpenGL/index_gl.php" rel="nofollow noreferrer">actual OpenGL specification</a> to see what it says about the function's behavior.</p>

CC BY-SA 4.0
2019-10-20T04:54:41.093Z
Perfect, the wiki has got it.   Looks like it also appears on the "resource" page for `glGetActiveUniform`.  But the 4.2 core specification only has 2.1 through 2.15, oddly.  Maybe we're looking at different versions of the document?   Weird.
BadZen
CC BY-SA 4.0
2021-11-13T02:25:16.993Z
Can you update the link? It does not point to the wiki anymore
Guillaume Racicot
CC BY-SA 4.0
2021-11-13T04:34:47.633Z
@GuillaumeRacicot: The wiki automatically redirects to the man page.
Nicol Bolas
CC BY-SA 4.0
2021-11-14T13:28:19.450Z
@NicolBolas the problem is that the man page don't show the table 2.16, which this question is all about. Also the answer don't contain the table, so the answer has become useless because of the redirect.
Guillaume Racicot
CC BY-SA 4.0
2019-10-19T05:02:39.043Z
2021-11-14T14:23:00.320Z
2021-11-14T14:23:00.320Z
Nicol Bolas
<p>Quoting the Khronos OpenGL <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGetProgramResource.xhtml" rel="nofollow noreferrer">documentation pages</a> for the <code>glGetProgramResourceiv()</code> function:</p>

<blockquote>
  <p>For the property GL_TYPE, a single integer identifying the type of an
  active variable is written to params. The integer returned is one of
  the values found in table 2.16.</p>
</blockquote>

<p>But, there is no "table 2.16" in that page, there is no "table 2.16" in the specification document (where the language also appears), and several search engines failed to return any other references to such a table.</p>

<p>So, where is it?   What are the full list of type codes that can be returned by this introspection function (which can presumably represent all GLSL types)?</p>

<p>(I'm using GL core 4.3)</p>

CC BY-SA 4.0
2019-10-19T04:54:05.003Z
"*there is no "table 2.16" in the specification document (where the language also appears)*" What "specification document" are you looking at? Because that language does not appear in the GL 4.3 specification; it cites a different table.
Nicol Bolas
CC BY-SA 4.0
2019-10-20T04:56:06.283Z
https://www.khronos.org/registry/OpenGL/specs/gl/glspec43.core.pdf

4.2 Core also doesn't seem to have it (though Nicol evidently saw some version of it that does...)
BadZen
CC BY-SA 4.0
2021-11-15T08:11:08.817Z
As with most documentation, the OpenGL reference pages are not always correct. If you find a mistake, you can open an issue in the [corresponding GitHub repository](https://github.com/KhronosGroup/OpenGL-Refpages). It is better if the issue gets fixed at the source, so I think you should do that.
wychmaster
<opengl><shader>
What are the type constants that the documentation for glGetProgramResourceiv() refers to?
BadZen
# What are the type constants that the documentation for glGetProgramResourceiv() refers to?

(Asked by: username_0 on 2019-10-19)

Quoting the Khronos OpenGL [documentation pages](https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGetProgramResource.xhtml) for the `glGetProgramResourceiv()` function:

> For the property GL\_TYPE, a single integer identifying the type of an
> active variable is written to params. The integer returned is one of
> the values found in table 2.16.

But, there is no "table 2.16" in that page, there is no "table 2.16" in the specification document (where the language also appears), and several search engines failed to return any other references to such a table.

So, where is it? What are the full list of type codes that can be returned by this introspection function (which can presumably represent all GLSL types)?

(I'm using GL core 4.3)

**Tags:** opengl, shader

> **Comments:**
> **username_1**: "*there is no "table 2.16" in the specification document (where the language also appears)*" What "specification document" are you looking at? Because that language does not appear in the GL 4.3 specification; it cites a different table.  
> **username_0**: https://www.khronos.org/registry/OpenGL/specs/gl/glspec43.core.pdf  4.2 Core also doesn't seem to have it (though username_1 evidently saw some version of it that does...)  
> **username_2**: As with most documentation, the OpenGL reference pages are not always correct. If you find a mistake, you can open an issue in the [corresponding GitHub repository](https://github.com/KhronosGroup/OpenGL-Refpages). It is better if the issue gets fixed at the source, so I think you should do that.  

---

## 1 answers

### Answer by username_1 on 2019-10-19. Score: 2 | Accepted answer

For whatever reason, the text for that function documentation was copied from the GL\_ARB\_program\_interface\_query extension. Extensions in OpenGL are always defined relative to a specific version of the OpenGL specification. So if an extension references something in a specification, it's talking about that version of the spec.

However, the OpenGL specification was *massively* restructured between 4.2 and 4.3, with whole chapters moved around. This means that table references in 4.2 become completely wrong relative to 4.3 and above.

Program interface query was written against the 4.2 specification. Oddly enough, there is no table 2.16 in that spec; the correct number for that table is 2.13 (so it's likely a typo, since 3 is right below 6 on a number-pad). But even if the extension did mention the right table number, that table moved to a whole different chapter in 4.3+ versions. It's been renumbered and moved since then, so you'll have to look at a particular specification's definition of `glGetProgramResourceiv` to find it.

In general, if you find something incongruous in the documentation pages, you should look at the [actual OpenGL specification](https://www.khronos.org/registry/OpenGL/index_gl.php) to see what it says about the function's behavior.

> **Comments:**
> **username_0**: Perfect, the wiki has got it.   Looks like it also appears on the "resource" page for `glGetActiveUniform`.  But the 4.2 core specification only has 2.1 through 2.15, oddly.  Maybe we're looking at different versions of the document?   Weird.  
> **username_3**: Can you update the link? It does not point to the wiki anymore  
> **username_1**: @username_3: The wiki automatically redirects to the man page.  
> **username_3**: @username_1 the problem is that the man page don't show the table 2.16, which this question is all about. Also the answer don't contain the table, so the answer has become useless because of the redirect.  

---

