The WebGLRenderingContext.getProgramParameter() method of the WebGL API returns information about the given program.
any gl.getProgramParameter(program, pname);
WebGLProgram to get parameter information from.Glenum specifying the information to query. Possible values: gl.DELETE_STATUS: Returns a GLboolean indicating whether or not the program is flagged for deletion.gl.LINK_STATUS: Returns a GLboolean indicating whether or not the last link operation was successful.gl.VALIDATE_STATUS: Returns a GLboolean indicating whether or not the last validation operation was successful.gl.ATTACHED_SHADERS: Returns a GLint indicating the number of attached shaders to a program.gl.ACTIVE_ATTRIBUTES: Returns a GLint indicating the number of active attribute variables to a program.gl.ACTIVE_UNIFORMS: Returns a GLint indicating the number of active uniform variables to a program.gl.TRANSFORM_FEEDBACK_BUFFER_MODE: Returns a GLenum indicating the buffer mode when transform feedback is active. May be gl.SEPARATE_ATTRIBS or gl.INTERLEAVED_ATTRIBS.gl.TRANSFORM_FEEDBACK_VARYINGS: Returns a GLint indicating the number of varying variables to capture in transform feedback mode.gl.ACTIVE_UNIFORM_BLOCKS: Returns a GLint indicating the number of uniform blocks containing active uniforms.Returns the requested program information (as specified with pname).
gl.getProgramParameter(program, gl.DELETE_STATUS);
| Specification | Status | Comment |
|---|---|---|
| WebGL 1.0 The definition of 'getProgramParameter' in that specification. | Recommendation | Initial definition. |
| OpenGL ES 2.0 The definition of 'glGetProgramiv' in that specification. | Standard | Man page of the (similar) OpenGL API. |
| WebGL 2.0 The definition of 'getProgramParameter' in that specification. | Editor's Draft | Adds new pname values:gl.TRANSFORM_FEEDBACK_BUFFER_MODE,gl.TRANSFORM_FEEDBACK_VARYINGS,gl.ACTIVE_UNIFORM_BLOCKS
|
| Desktop | ||||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
| Basic support | 9 | 12 | 4 | 11 | 12 | 5.1 |
WebGL2 |
56 | No | 51 | No | 43 | No |
| Mobile | |||||||
|---|---|---|---|---|---|---|---|
| Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
| Basic support | Yes | 25 | Yes | Yes | 12 | 8.1 | Yes |
WebGL2 |
58 | 58 | No | 51 | 43 | No | 7.0 |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getProgramParameter