Checking for WebGL Extension Support?

The ANGLE_instanced_arrays extension provides hardware acceleration for WebGL (woohoo!).

I am wondering if this is supported in Chrome (not Chrome Canary) in version 31?

PS It looks like this is in both Chromium and Canary, but I don’t know if it is in Chrome yet.

+4
source share
1 answer

To check which extensions are available, you have 2 options

1) call gl.getSupportedExtensions(). It returns a list of available extensions.

Note: you can do this from a JavaScript / web console in a browser. For example, in Chrome, select Tools-> JavaScript Console, then type

document.createElement("canvas").getContext("experimental-webgl").getSupportedExtensions(); 

.

2) ,

ext = gl.getExtension("ANGLE_instanced_arrays");
if (ext) {
   // ANGLE_instanced_arrays extension exists
} else {
   // ANGLE_instanced_arrays extension does not exist
}

. , , , .

+4

All Articles