Program Introspection
Program Introspection is a mechanism for taking a program object and querying information about it, so as to be able to interface and interact with it. For example, if there is a uniform, you may need to query its location so that you can set its value.
Old style
The APIs in this section represent an older interface to this information. If GL 4.3 or ARB_program_interface_query are not available, you should use these. Be advised that the new APIs provide access to more information than can be queried here.
Attributes
Fragment Outputs
Uniforms and blocks
Subroutines
Atomic counters
Interface query
Core in version | 4.6 | |
---|---|---|
Core since version | 4.3 | |
Core ARB extension | ARB_program_interface_query |
This new interface provides a uniform mechanism for querying just about everything from a program. At least, you can query everything that external OpenGL code can interface with. You can't query information about number of functions (unless they're subroutines) or global variables or things like that. But uniforms, inputs/outputs, etc? All of those are made available through this consistent interface.
This article is a stub. You can help the OpenGL Wiki by expanding it. |