I'm trying to understand the behaviour of getContext() if I specify antialias: true, but the device doesn't support antialiasing. For example:
const gl = canvas.getContext('webgl', {
antialias: true
})
Will a context still be returned in this case?
The
depth,stencilandantialiasattributes, when set to true, are requests, not requirements. The WebGL implementation should make a best effort to honor them. When any of these attributes is set to false, however, the WebGL implementation must not provide the associated functionality. Combinations of attributes not supported by the WebGL implementation or graphics hardware shall not cause a failure to create a WebGLRenderingContext.