This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Note: This feature is available in Web Workers.
The WebGLRenderingContext.getProgramParameter() method of the WebGL API returns information about the given program.
getProgramParameter(program, pname)
programA WebGLProgram to get parameter information from.
pnameA GLenum specifying the information to query. Possible values:
gl.DELETE_STATUSReturns a GLboolean indicating whether or not the program is flagged for deletion.
gl.LINK_STATUSReturns a GLboolean indicating whether or not the last link operation was successful.
gl.VALIDATE_STATUSReturns a GLboolean indicating whether or not the last validation operation was successful.
gl.ATTACHED_SHADERSReturns a GLint indicating the number of attached shaders to a program.
gl.ACTIVE_ATTRIBUTESReturns a GLint indicating the number of active attribute variables to a program.
gl.ACTIVE_UNIFORMSReturns a GLint indicating the number of active uniform variables to a program.
When using a WebGL 2 context, the following values are available additionally:
gl.TRANSFORM_FEEDBACK_BUFFER_MODEReturns a GLenum indicating the buffer mode when transform feedback is active. May be gl.SEPARATE_ATTRIBS or gl.INTERLEAVED_ATTRIBS.
gl.TRANSFORM_FEEDBACK_VARYINGSReturns a GLint indicating the number of varying variables to capture in transform feedback mode.
gl.ACTIVE_UNIFORM_BLOCKSReturns 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);
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
getProgramParameter |
9 | 12 | 4 | 12 | 5.1 | 25 | 4 | 12 | 8 | 1.5 | 4.4.3 | 8 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getProgramParameter