WebGLContextAttributes object

A dictionary object of attributes used to initialize the context for the first time.

IE11

Members

The WebGLContextAttributes object has these types of members:

Properties

The WebGLContextAttributes object has these properties.

PropertyDescription

alpha

Gets or sets whether the drawing buffer has an alpha channel for alpha compositing and operations.

depth

Gets or sets whether the drawing buffer has a depth buffer. Returns false if no depth buffer exists.

premultipliedAlpha

Gets or sets whether the colors in the drawing buffer are premultiplied alpha values. This property is ignored if the alpha property is false.

preserveDrawingBuffer

Sets or gets whether the drawing buffer's is cleared once content is presented.

 

Remarks

Attributes are a preference, and might not be configurable. To query which properties are actually used for initialization, call getContextAttributes. Not all attributes are supported. Here's how they all behave in Internet Explorer 11 version:

AttributeSupported Returns
alpha yestrue or false.
depth yestrue or false.
stencilno IE always behaves like false is set.
antialiasno IE always behaves like false is set.
premultipliedAlpha yestrue or false.
preserveDrawingBuffer yes Itrue or false.

 

 

 

Show:
© 2014 Microsoft