The WebGLRenderingContext.getProgramParameter() method of the WebGL API returns information about the given program.
Syntax
any gl.getProgramParameter(program, pname);
Parameters
- program
- A
WebGLProgramto get parameter information from. - pname
- A
Glenumspecifying the information to query. Possible values:
gl.DELETE_STATUS- Returns a
GLbooleanindicating whether or not the program is flagged for deletion. gl.LINK_STATUS: Returns aGLbooleanindicating whether or not the last link operation was successful.gl.VALIDATE_STATUS: Returns aGLbooleanindicating whether or not the last validation operation was successful.gl.ATTACHED_SHADERS: Returns aGLintindicating the number of attached shaders to a program.gl.ACTIVE_ATTRIBUTES: Returns aGLintindicating the number of active attribute variables to a program.gl.ACTIVE_UNIFORMS: Returns aGLintindicating the number of active uniform variables to a program.- When using a WebGL 2 context, the following values are available additionally:
- Returns a
gl.TRANSFORM_FEEDBACK_BUFFER_MODE- Returns a
GLenumindicating the buffer mode when transform feedback is active. May begl.SEPARATE_ATTRIBSorgl.INTERLEAVED_ATTRIBS. gl.TRANSFORM_FEEDBACK_VARYINGS: Returns aGLintindicating the number of varying variables to capture in transform feedback mode.gl.ACTIVE_UNIFORM_BLOCKS: Returns aGLintindicating the number of uniform blocks containing active uniforms.
- Returns a
Return value
Returns the requested program information (as specified with pname).
Examples
gl.getProgramParameter(program, gl.DELETE_STATUS);
Specifications
| Specification | Status | Comment |
| WebGL 1.0The definition of 'getProgramParameter' in that specification. | Recommendation | Initial definition. |
| OpenGL ES 2.0The definition of 'glGetProgramiv' in that specification. | Standard | Man page of the (similar) OpenGL API. |
| WebGL 2.0The definition of 'getProgramParameter' in that specification. | Editor's Draft | Adds new pname values:
|
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
getProgramParameter
|
Chrome
Full support 9 |
Edge
Full support 12 |
Firefox
Full support 4 |
IE
Full support 11 |
Opera
Full support 12 |
Safari
Full support 5.1 |
WebView Android
Full support Yes |
Chrome Android
Full support 25 |
Firefox Android
Full support Yes |
Opera Android
Full support 12 |
Safari iOS
Full support 8 |
Samsung Internet Android
Full support 1.5 |
WebGL2
|
Chrome
Full support 56 |
Edge
Full support 79 |
Firefox
Full support 51 |
IE
No support No |
Opera
Full support 43 |
Safari
No support No |
WebView Android
Full support 58 |
Chrome Android
Full support 58 |
Firefox Android
Full support 51 |
Opera Android
Full support 43 |
Safari iOS
No support No |
Samsung Internet Android
Full support 7.0 |
Legend
- Full support
- Full support
- No support
- No support
See also
WebGLRenderingContext.getProgramParameter() by Mozilla Contributors is licensed under CC-BY-SA 2.5.