Monday, 26 December 2016

WebGLQuery

WebGLQuery

This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes.
The WebGLQuery interface is part of the WebGL 2 API and provides ways to asynchronously query for information. By default, occlusion queries and primitive queries are available.
Another kind of queries are disjoint timer queries, which allow you to measure performance and profiling of your GPU. Disjoint timer queries are available with the EXT_disjoint_timer_queryextension only.
When working with WebGLQuery objects, the following methods of the WebGL2RenderingContext are useful:

Examples

Creating a WebGLQuery object

in this example, gl must be a WebGL2RenderingContextWebGLQuery objects are not available in WebGL 1.
var query = gl.createQuery();

Specifications

SpecificationStatusComment
WebGL 2.0
The definition of 'WebGLQuery' in that specification.
Editor's DraftInitial definition.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafariServo
Basic SupportNo support1No support51.0No supportNo supportNo supportNo support
1. To use an experimental implementation of WebGL 2 in Chrome, you have to start Chrome with the runtime flag --enable-unsafe-es3-apis.

See also




0 comments:

Post a Comment

Popular Posts

Powered by Blogger.

Translate