Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

isEnabled method

Returns whether or not a WebGL capability is enabled for this context.

IE11

 

Syntax

var retVal = WebGLRenderingContext.isEnabled(capability);

Parameters

capability [in]

Type: Number

One of the following:

ConstantCapability
gl.BLEND blendFunc
gl.CULL_FACE cullFace
gl.DEPTH_TEST depthFunc
gl.DITHERNot supported
gl.POLYGON_OFFSET_FILL polygonOffset
gl.SAMPLE_ALPHA_TO_COVERAGENot supported
gl.SAMPLE_COVERAGENot supported
gl.SCISSOR_TEST scissor
gl.STENCIL_TESTNot supported

 

Return value

Type: Boolean

  • Returns true if supported, otherwise false.
  • Returns false if the context lost flag is set.
  • Returns false if the value for capability is invalid.

Returns undefined rather than false when function is called with an unsupported capability value

Remarks

WebGL errorDescription
gl.INVALID_ENUMcapablity isn't a listed value.

 

See also

WebGLRenderingContext

 

 

Show:
© 2015 Microsoft