Firefox Tomorrow

web api instance method

WebGLRenderingContext: getParameter() method

View on MDN ↗

Available in workers

The WebGLRenderingContext.getParameter() method of the WebGL API returns a value for the passed parameter name.

Syntax

getParameter(pname)

Parameters

  • pname
    • : A GLenum specifying which parameter value to return. See below for possible values.

Return value

Depends on the parameter.

Parameter names

WebGL 1

You can query the following pname parameters when using a WebGLRenderingContext.

Constant Returned type Description
gl.ACTIVE_TEXTURE [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.ALIASED_LINE_WIDTH_RANGE [`Float32Array`](/firefox/mdn/javascript/reference/global_objects/float32array/) (with 2 elements)
gl.ALIASED_POINT_SIZE_RANGE [`Float32Array`](/firefox/mdn/javascript/reference/global_objects/float32array/) (with 2 elements)
gl.ALPHA_BITS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.ARRAY_BUFFER_BINDING [`WebGLBuffer`](/firefox/mdn/api/webglbuffer/)
gl.BLEND [`GLboolean`](/firefox/mdn/api/webgl_api/types/)
gl.BLEND_COLOR [`Float32Array`](/firefox/mdn/javascript/reference/global_objects/float32array/) (with 4 values)
gl.BLEND_DST_ALPHA [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.BLEND_DST_RGB [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.BLEND_EQUATION [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.BLEND_EQUATION_ALPHA [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.BLEND_EQUATION_RGB [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.BLEND_SRC_ALPHA [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.BLEND_SRC_RGB [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.BLUE_BITS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.COLOR_CLEAR_VALUE [`Float32Array`](/firefox/mdn/javascript/reference/global_objects/float32array/) (with 4 values)
gl.COLOR_WRITEMASK sequence<[`GLboolean`](/firefox/mdn/api/webgl_api/types/)> (with 4 values)
gl.COMPRESSED_TEXTURE_FORMATS [`Uint32Array`](/firefox/mdn/javascript/reference/global_objects/uint32array/) Returns the compressed texture formats.

When using the [`WEBGL_compressed_texture_s3tc`](/firefox/mdn/api/webgl_compressed_texture_s3tc/) extension:
  • ext.COMPRESSED_RGB_S3TC_DXT1_EXT
  • ext.COMPRESSED_RGBA_S3TC_DXT1_EXT
  • ext.COMPRESSED_RGBA_S3TC_DXT3_EXT
  • ext.COMPRESSED_RGBA_S3TC_DXT5_EXT

When using the [`WEBGL_compressed_texture_s3tc_srgb`](/firefox/mdn/api/webgl_compressed_texture_s3tc_srgb/) extension:

  • ext.COMPRESSED_SRGB_S3TC_DXT1_EXT
  • ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT
  • ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT
  • ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT
When using the [`WEBGL_compressed_texture_etc`](/firefox/mdn/api/webgl_compressed_texture_etc/) extension:
  • ext.COMPRESSED_R11_EAC
  • ext.COMPRESSED_SIGNED_R11_EAC
  • ext.COMPRESSED_RG11_EAC
  • ext.COMPRESSED_SIGNED_RG11_EAC
  • ext.COMPRESSED_RGB8_ETC2
  • ext.COMPRESSED_RGBA8_ETC2_EAC
  • ext.COMPRESSED_SRGB8_ETC2
  • ext.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC
  • ext.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2
  • ext.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2
When using the [`WEBGL_compressed_texture_pvrtc`](/firefox/mdn/api/webgl_compressed_texture_pvrtc/) extension:
  • ext.COMPRESSED_RGB_PVRTC_4BPPV1_IMG
  • ext.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG
  • ext.COMPRESSED_RGB_PVRTC_2BPPV1_IMG
  • ext.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG
When using the [`WEBGL_compressed_texture_etc1`](/firefox/mdn/api/webgl_compressed_texture_etc1/) extension:
  • ext.COMPRESSED_RGB_ETC1_WEBGL
When using the [`WEBGL_compressed_texture_astc`](/firefox/mdn/api/webgl_compressed_texture_astc/) extension:
  • ext.COMPRESSED_RGBA_ASTC_4x4_KHR
  • ext.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR
  • ext.COMPRESSED_RGBA_ASTC_5x4_KHR
  • ext.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR
  • ext.COMPRESSED_RGBA_ASTC_5x5_KHR
  • ext.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR
  • ext.COMPRESSED_RGBA_ASTC_6x5_KHR
  • ext.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR
  • ext.COMPRESSED_RGBA_ASTC_6x6_KHR
  • ext.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR
  • ext.COMPRESSED_RGBA_ASTC_8x5_KHR
  • ext.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR
  • ext.COMPRESSED_RGBA_ASTC_8x6_KHR
  • ext.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR
  • ext.COMPRESSED_RGBA_ASTC_8x8_KHR
  • ext.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR
  • ext.COMPRESSED_RGBA_ASTC_10x5_KHR
  • ext.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR
  • ext.COMPRESSED_RGBA_ASTC_10x6_KHR
  • ext.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR
  • ext.COMPRESSED_RGBA_ASTC_10x6_KHR
  • ext.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR
  • ext.COMPRESSED_RGBA_ASTC_10x10_KHR
  • ext.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR
  • ext.COMPRESSED_RGBA_ASTC_12x10_KHR
  • ext.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR
  • ext.COMPRESSED_RGBA_ASTC_12x12_KHR
  • ext.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR
gl.CULL_FACE [`GLboolean`](/firefox/mdn/api/webgl_api/types/)
gl.CULL_FACE_MODE [`GLenum`](/firefox/mdn/api/webgl_api/types/) gl.FRONT, gl.BACK or gl.FRONT_AND_BACK. See also [`cullFace`](/firefox/mdn/api/webglrenderingcontext/cullface/)
gl.CURRENT_PROGRAM [`WebGLProgram`](/firefox/mdn/api/webglprogram/) or null See [`useProgram`](/firefox/mdn/api/webglrenderingcontext/useprogram/).
gl.DEPTH_BITS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.DEPTH_CLEAR_VALUE [`GLfloat`](/firefox/mdn/api/webgl_api/types/)
gl.DEPTH_FUNC [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.DEPTH_RANGE [`Float32Array`](/firefox/mdn/javascript/reference/global_objects/float32array/) (with 2 elements)
gl.DEPTH_TEST [`GLboolean`](/firefox/mdn/api/webgl_api/types/)
gl.DEPTH_WRITEMASK [`GLboolean`](/firefox/mdn/api/webgl_api/types/)
gl.DITHER [`GLboolean`](/firefox/mdn/api/webgl_api/types/)
gl.ELEMENT_ARRAY_BUFFER_BINDING [`WebGLBuffer`](/firefox/mdn/api/webglbuffer/)
gl.FRAMEBUFFER_BINDING [`WebGLFramebuffer`](/firefox/mdn/api/webglframebuffer/) or null null corresponds to a binding to the default framebuffer. See also [`bindFramebuffer`](/firefox/mdn/api/webglrenderingcontext/bindframebuffer/).
gl.FRONT_FACE [`GLenum`](/firefox/mdn/api/webgl_api/types/) gl.CW or gl.CCW. See also [`frontFace`](/firefox/mdn/api/webglrenderingcontext/frontface/).
gl.GENERATE_MIPMAP_HINT [`GLenum`](/firefox/mdn/api/webgl_api/types/) gl.FASTEST, gl.NICEST or gl.DONT_CARE. See also [`hint`](/firefox/mdn/api/webglrenderingcontext/hint/).
gl.GREEN_BITS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.IMPLEMENTATION_COLOR_READ_FORMAT [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.IMPLEMENTATION_COLOR_READ_TYPE [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.LINE_WIDTH [`GLfloat`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_CUBE_MAP_TEXTURE_SIZE [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_FRAGMENT_UNIFORM_VECTORS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_RENDERBUFFER_SIZE [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_TEXTURE_IMAGE_UNITS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_TEXTURE_SIZE [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_VARYING_VECTORS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_VERTEX_ATTRIBS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_VERTEX_UNIFORM_VECTORS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_VIEWPORT_DIMS [`Int32Array`](/firefox/mdn/javascript/reference/global_objects/int32array/) (with 2 elements)
gl.PACK_ALIGNMENT [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.POLYGON_OFFSET_FACTOR [`GLfloat`](/firefox/mdn/api/webgl_api/types/)
gl.POLYGON_OFFSET_FILL [`GLboolean`](/firefox/mdn/api/webgl_api/types/)
gl.POLYGON_OFFSET_UNITS [`GLfloat`](/firefox/mdn/api/webgl_api/types/)
gl.RED_BITS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.RENDERBUFFER_BINDING [`WebGLRenderbuffer`](/firefox/mdn/api/webglrenderbuffer/) or null See [`bindRenderbuffer`](/firefox/mdn/api/webglrenderingcontext/bindrenderbuffer/).
gl.RENDERER string
gl.SAMPLE_BUFFERS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.SAMPLE_COVERAGE_INVERT [`GLboolean`](/firefox/mdn/api/webgl_api/types/)
gl.SAMPLE_COVERAGE_VALUE [`GLfloat`](/firefox/mdn/api/webgl_api/types/)
gl.SAMPLES [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.SCISSOR_BOX [`Int32Array`](/firefox/mdn/javascript/reference/global_objects/int32array/) (with 4 elements)
gl.SCISSOR_TEST [`GLboolean`](/firefox/mdn/api/webgl_api/types/)
gl.SHADING_LANGUAGE_VERSION string
gl.STENCIL_BACK_FAIL [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.STENCIL_BACK_FUNC [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.STENCIL_BACK_PASS_DEPTH_FAIL [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.STENCIL_BACK_PASS_DEPTH_PASS [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.STENCIL_BACK_REF [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.STENCIL_BACK_VALUE_MASK [`GLuint`](/firefox/mdn/api/webgl_api/types/)
gl.STENCIL_BACK_WRITEMASK [`GLuint`](/firefox/mdn/api/webgl_api/types/)
gl.STENCIL_BITS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.STENCIL_CLEAR_VALUE [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.STENCIL_FAIL [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.STENCIL_FUNC [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.STENCIL_PASS_DEPTH_FAIL [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.STENCIL_PASS_DEPTH_PASS [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.STENCIL_REF [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.STENCIL_TEST [`GLboolean`](/firefox/mdn/api/webgl_api/types/)
gl.STENCIL_VALUE_MASK [`GLuint`](/firefox/mdn/api/webgl_api/types/)
gl.STENCIL_WRITEMASK [`GLuint`](/firefox/mdn/api/webgl_api/types/)
gl.SUBPIXEL_BITS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.TEXTURE_BINDING_2D [`WebGLTexture`](/firefox/mdn/api/webgltexture/) or null
gl.TEXTURE_BINDING_CUBE_MAP [`WebGLTexture`](/firefox/mdn/api/webgltexture/) or null
gl.UNPACK_ALIGNMENT [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.UNPACK_COLORSPACE_CONVERSION_WEBGL [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.UNPACK_FLIP_Y_WEBGL [`GLboolean`](/firefox/mdn/api/webgl_api/types/)
gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL [`GLboolean`](/firefox/mdn/api/webgl_api/types/)
gl.VENDOR string
gl.VERSION string
gl.VIEWPORT [`Int32Array`](/firefox/mdn/javascript/reference/global_objects/int32array/) (with 4 elements)

WebGL 2

You can query the following pname parameters when using a WebGL2RenderingContext.

Constant Returned type Description
gl.COPY_READ_BUFFER_BINDING [`WebGLBuffer`](/firefox/mdn/api/webglbuffer/) or null See [`bindBuffer`](/firefox/mdn/api/webglrenderingcontext/bindbuffer/).
gl.COPY_WRITE_BUFFER_BINDING [`WebGLBuffer`](/firefox/mdn/api/webglbuffer/) or null See [`bindBuffer`](/firefox/mdn/api/webglrenderingcontext/bindbuffer/).
gl.DRAW_BUFFERi [`GLenum`](/firefox/mdn/api/webgl_api/types/) gl.BACK, gl.NONE or gl.COLOR_ATTACHMENT{0-15}. See also [`drawBuffers`](/firefox/mdn/api/webgl2renderingcontext/drawbuffers/).
gl.DRAW_FRAMEBUFFER_BINDING [`WebGLFramebuffer`](/firefox/mdn/api/webglframebuffer/) or null null corresponds to a binding to the default framebuffer. See also [`bindFramebuffer`](/firefox/mdn/api/webglrenderingcontext/bindframebuffer/).
gl.FRAGMENT_SHADER_DERIVATIVE_HINT [`GLenum`](/firefox/mdn/api/webgl_api/types/) gl.FASTEST, gl.NICEST or gl.DONT_CARE. See also [`hint`](/firefox/mdn/api/webglrenderingcontext/hint/).
gl.MAX_3D_TEXTURE_SIZE [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_ARRAY_TEXTURE_LAYERS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_CLIENT_WAIT_TIMEOUT_WEBGL [`GLint64`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_COLOR_ATTACHMENTS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS [`GLint64`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_COMBINED_UNIFORM_BLOCKS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS [`GLint64`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_DRAW_BUFFERS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_ELEMENT_INDEX [`GLint64`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_ELEMENTS_INDICES [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_ELEMENTS_VERTICES [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_FRAGMENT_INPUT_COMPONENTS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_FRAGMENT_UNIFORM_BLOCKS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_FRAGMENT_UNIFORM_COMPONENTS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_PROGRAM_TEXEL_OFFSET [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_SAMPLES [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_SERVER_WAIT_TIMEOUT [`GLint64`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_TEXTURE_LOD_BIAS [`GLfloat`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_UNIFORM_BLOCK_SIZE [`GLint64`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_UNIFORM_BUFFER_BINDINGS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_VARYING_COMPONENTS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_VERTEX_OUTPUT_COMPONENTS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_VERTEX_UNIFORM_BLOCKS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MAX_VERTEX_UNIFORM_COMPONENTS [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.MIN_PROGRAM_TEXEL_OFFSET [`GLint`](/firefox/mdn/api/webgl_api/types/)
gl.PACK_ROW_LENGTH [`GLint`](/firefox/mdn/api/webgl_api/types/) See [`pixelStorei`](/firefox/mdn/api/webglrenderingcontext/pixelstorei/).
gl.PACK_SKIP_PIXELS [`GLint`](/firefox/mdn/api/webgl_api/types/) See [`pixelStorei`](/firefox/mdn/api/webglrenderingcontext/pixelstorei/).
gl.PACK_SKIP_ROWS [`GLint`](/firefox/mdn/api/webgl_api/types/) See [`pixelStorei`](/firefox/mdn/api/webglrenderingcontext/pixelstorei/).
gl.PIXEL_PACK_BUFFER_BINDING [`WebGLBuffer`](/firefox/mdn/api/webglbuffer/) or null See [`bindBuffer`](/firefox/mdn/api/webglrenderingcontext/bindbuffer/).
gl.PIXEL_UNPACK_BUFFER_BINDING [`WebGLBuffer`](/firefox/mdn/api/webglbuffer/) or null See [`bindBuffer`](/firefox/mdn/api/webglrenderingcontext/bindbuffer/).
gl.RASTERIZER_DISCARD [`GLboolean`](/firefox/mdn/api/webgl_api/types/)
gl.READ_BUFFER [`GLenum`](/firefox/mdn/api/webgl_api/types/)
gl.READ_FRAMEBUFFER_BINDING [`WebGLFramebuffer`](/firefox/mdn/api/webglframebuffer/) or null null corresponds to a binding to the default framebuffer. See also [`bindFramebuffer`](/firefox/mdn/api/webglrenderingcontext/bindframebuffer/).
gl.SAMPLE_ALPHA_TO_COVERAGE [`GLboolean`](/firefox/mdn/api/webgl_api/types/)
gl.SAMPLE_COVERAGE [`GLboolean`](/firefox/mdn/api/webgl_api/types/)
gl.SAMPLER_BINDING [`WebGLSampler`](/firefox/mdn/api/webglsampler/) or null See [`bindSampler`](/firefox/mdn/api/webgl2renderingcontext/bindsampler/).
gl.TEXTURE_BINDING_2D_ARRAY [`WebGLTexture`](/firefox/mdn/api/webgltexture/) or null See [`bindTexture`](/firefox/mdn/api/webglrenderingcontext/bindtexture/).
gl.TEXTURE_BINDING_3D [`WebGLTexture`](/firefox/mdn/api/webgltexture/) or null See [`bindTexture`](/firefox/mdn/api/webglrenderingcontext/bindtexture/).
gl.TRANSFORM_FEEDBACK_ACTIVE [`GLboolean`](/firefox/mdn/api/webgl_api/types/)
gl.TRANSFORM_FEEDBACK_BINDING [`WebGLTransformFeedback`](/firefox/mdn/api/webgltransformfeedback/) or null See [`bindTransformFeedback`](/firefox/mdn/api/webgl2renderingcontext/bindtransformfeedback/).
gl.TRANSFORM_FEEDBACK_BUFFER_BINDING [`WebGLBuffer`](/firefox/mdn/api/webglbuffer/) or null See [`bindBuffer`](/firefox/mdn/api/webglrenderingcontext/bindbuffer/).
gl.TRANSFORM_FEEDBACK_PAUSED [`GLboolean`](/firefox/mdn/api/webgl_api/types/)
gl.UNIFORM_BUFFER_BINDING [`WebGLBuffer`](/firefox/mdn/api/webglbuffer/) or null See [`bindBuffer`](/firefox/mdn/api/webglrenderingcontext/bindbuffer/).
gl.UNIFORM_BUFFER_OFFSET_ALIGNMENT [`GLint`](/firefox/mdn/api/webgl_api/types/) See [`pixelStorei`](/firefox/mdn/api/webglrenderingcontext/pixelstorei/).
gl.UNPACK_IMAGE_HEIGHT [`GLint`](/firefox/mdn/api/webgl_api/types/) See [`pixelStorei`](/firefox/mdn/api/webglrenderingcontext/pixelstorei/).
gl.UNPACK_ROW_LENGTH [`GLint`](/firefox/mdn/api/webgl_api/types/) See [`pixelStorei`](/firefox/mdn/api/webglrenderingcontext/pixelstorei/).
gl.UNPACK_SKIP_IMAGES [`GLint`](/firefox/mdn/api/webgl_api/types/) See [`pixelStorei`](/firefox/mdn/api/webglrenderingcontext/pixelstorei/).
gl.UNPACK_SKIP_PIXELS [`GLint`](/firefox/mdn/api/webgl_api/types/) See [`pixelStorei`](/firefox/mdn/api/webglrenderingcontext/pixelstorei/).
gl.UNPACK_SKIP_ROWS [`GLint`](/firefox/mdn/api/webgl_api/types/) See [`pixelStorei`](/firefox/mdn/api/webglrenderingcontext/pixelstorei/).
gl.VERTEX_ARRAY_BINDING [`WebGLVertexArrayObject`](/firefox/mdn/api/webglvertexarrayobject/) or null See [`bindVertexArray`](/firefox/mdn/api/webgl2renderingcontext/bindvertexarray/).

WebGL extensions

You can query the following pname parameters when using WebGL extensions:

Constant Returned type Extension Description
ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT [`GLfloat`](/firefox/mdn/api/webgl_api/types/) [`EXT_texture_filter_anisotropic`](/firefox/mdn/api/ext_texture_filter_anisotropic/) Maximum available anisotropy.
ext.FRAGMENT_SHADER_DERIVATIVE_HINT_OES [`GLenum`](/firefox/mdn/api/webgl_api/types/) [`OES_standard_derivatives`](/firefox/mdn/api/oes_standard_derivatives/) Accuracy of the derivative calculation for the GLSL built-in functions: dFdx, dFdy, and fwidth.
ext.MAX_COLOR_ATTACHMENTS_WEBGL [`GLint`](/firefox/mdn/api/webgl_api/types/) [`WEBGL_draw_buffers`](/firefox/mdn/api/webgl_draw_buffers/) The maximum number of framebuffer color attachment points.
ext.MAX_DRAW_BUFFERS_WEBGL [`GLint`](/firefox/mdn/api/webgl_api/types/) [`WEBGL_draw_buffers`](/firefox/mdn/api/webgl_draw_buffers/) The maximum number of draw buffers.
ext.DRAW_BUFFER0_WEBGL
ext.DRAW_BUFFER1_WEBGL
ext.DRAW_BUFFER2_WEBGL
ext.DRAW_BUFFER3_WEBGL
ext.DRAW_BUFFER4_WEBGL
ext.DRAW_BUFFER5_WEBGL
ext.DRAW_BUFFER6_WEBGL
ext.DRAW_BUFFER7_WEBGL
ext.DRAW_BUFFER8_WEBGL
ext.DRAW_BUFFER9_WEBGL
ext.DRAW_BUFFER10_WEBGL
ext.DRAW_BUFFER11_WEBGL
ext.DRAW_BUFFER12_WEBGL
ext.DRAW_BUFFER13_WEBGL
ext.DRAW_BUFFER14_WEBGL
ext.DRAW_BUFFER15_WEBGL
[`GLenum`](/firefox/mdn/api/webgl_api/types/) [`WEBGL_draw_buffers`](/firefox/mdn/api/webgl_draw_buffers/) Drawing buffers.
ext.VERTEX_ARRAY_BINDING_OES [`WebGLVertexArrayObjectOES`](/firefox/mdn/api/webglvertexarrayobject/) [`OES_vertex_array_object`](/firefox/mdn/api/oes_vertex_array_object/) Bound vertex array object (VAO).
ext.TIMESTAMP_EXT [`GLuint64EXT`](/firefox/mdn/api/webgl_api/types/)

[`EXT_disjoint_timer_query`](/firefox/mdn/api/ext_disjoint_timer_query/)

The current time.
ext.GPU_DISJOINT_EXT [`GLboolean`](/firefox/mdn/api/webgl_api/types/) [`EXT_disjoint_timer_query`](/firefox/mdn/api/ext_disjoint_timer_query/)

Returns whether or not the GPU performed any disjoint operation.

ext.MAX_VIEWS_OVR [`GLint`](/firefox/mdn/api/webgl_api/types/) [`OVR_multiview2`](/firefox/mdn/api/ovr_multiview2/) Maximum number of views.

Examples

gl.getParameter(gl.DITHER);
gl.getParameter(gl.VERSION);
gl.getParameter(gl.VIEWPORT);

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also