queryRenderCompatibility Function

This function returns information about the client system's level of compatibility with the iTwin.js rendering system, describing the client system's support for both optional and required features. It will also report if there is a major issue with the client system such as the browser falling back to software rendering or an inability to create a either a canvas or a WebGL rendering context.

queryRenderCompatibility(useWebGL2: boolean, createContext?: ContextCreator): WebGLRenderCompatibilityInfo

@returns A WebGLRenderCompatibilityInfo object which contains a compatibility summary.

@see WebGLRenderCompatibilityInfo

Parameter Type Description
useWebGL2 boolean A boolean which will be passed to the createContext function in order to create the desired type of context; set this to true to use WebGL2, false to use WebGL1.
createContext ContextCreator A function of type ContextCreator that returns a WebGLContext. If not specified, this by default uses canvas.getContext() to create the WebGLContext.

Returns - WebGLRenderCompatibilityInfo

A WebGLRenderCompatibilityInfo object which contains a compatibility summary.

Defined in

Last Updated: 15 March, 2024