WebGLRenderingContext: getProgramParameter() method
Baseline
Widely available
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.
Syntax
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 a
GLbooleanindicating whether or not the last link operation was successful. gl.VALIDATE_STATUS-
Returns a
GLbooleanindicating whether or not the last validation operation was successful. gl.ATTACHED_SHADERS-
Returns a
GLintindicating the number of attached shaders to a program. gl.ACTIVE_ATTRIBUTES-
Returns a
GLintindicating the number of active attribute variables to a program. gl.ACTIVE_UNIFORMS-
Returns a
GLintindicating 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_MODE-
Returns a
GLenumindicating the buffer mode when transform feedback is active. May begl.SEPARATE_ATTRIBSorgl.INTERLEAVED_ATTRIBS. gl.TRANSFORM_FEEDBACK_VARYINGS-
Returns a
GLintindicating the number of varying variables to capture in transform feedback mode. gl.ACTIVE_UNIFORM_BLOCKS-
Returns a
GLintindicating the number of uniform blocks containing active uniforms.
Return value
Returns the requested program information (as specified with pname).
Examples
gl.getProgramParameter(program, gl.DELETE_STATUS);
Specifications
| Specification |
|---|
| WebGL Specification> # 5.14.9> |
| WebGL 2.0 Specification> # 3.7.7> |
Browser compatibility
Loading…