--- title: WebGLRenderingContext.getProgramParameter() slug: Web/API/WebGLRenderingContext/getProgramParameter translation_of: Web/API/WebGLRenderingContext/getProgramParameter ---
{{APIRef("WebGL")}}

WebGLRenderingContext.getProgramParameter() 方法返回WebGLProgram的信息。

语法

any gl.getProgramParameter(program, pname);

参数

program
A {{domxref("WebGLProgram")}} to get parameter information from.
pname
A {{domxref("Glenum")}} specifying the information to query. Possible values:

返回值

Returns the requested program information (as specified with pname).

例子

gl.getProgramParameter(program, gl.DELETE_STATUS);

Specifications

Specification Status Comment
{{SpecName('WebGL', "#5.14.9", "getProgramParameter")}} {{Spec2('WebGL')}} Initial definition.
{{SpecName('OpenGL ES 2.0', "glGetProgramiv.xml", "glGetProgramiv")}} {{Spec2('OpenGL ES 2.0')}} Man page of the (similar) OpenGL API.
{{SpecName('WebGL2', "#3.7.7", "getProgramParameter")}} {{Spec2('WebGL2')}} Adds new pname values:
gl.TRANSFORM_FEEDBACK_BUFFER_MODE,
gl.TRANSFORM_FEEDBACK_VARYINGS,
gl.ACTIVE_UNIFORM_BLOCKS

Browser compatibility

{{Compat("api.WebGLRenderingContext.getProgramParameter")}}

See also