web api instance method
WebGLRenderingContext: getProgramParameter() method
Available in 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.
- : A
pname-
: A
GLenumspecifying the information to query. Possible values:gl.DELETE_STATUS- : Returns a
GLbooleanindicating whether or not the program is flagged for deletion.
- : Returns a
gl.LINK_STATUS- : Returns a
GLbooleanindicating whether or not the last link operation was successful.
- : Returns a
gl.VALIDATE_STATUS- : Returns a
GLbooleanindicating whether or not the last validation operation was successful.
- : Returns a
gl.ATTACHED_SHADERS- : Returns a
GLintindicating the number of attached shaders to a program.
- : Returns a
gl.ACTIVE_ATTRIBUTES- : Returns a
GLintindicating the number of active attribute variables to a program.
- : Returns a
gl.ACTIVE_UNIFORMS- : Returns a
GLintindicating the number of active uniform variables to a program.
- : Returns a
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.
- : Returns a
gl.TRANSFORM_FEEDBACK_VARYINGS- : Returns a
GLintindicating the number of varying variables to capture in transform feedback mode.
- : Returns a
gl.ACTIVE_UNIFORM_BLOCKS- : Returns a
GLintindicating 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
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.