Reputation: 8847
ANGLE_instanced_arrays extension provides hardware instancing for WebGL (woohoo!).
What I'm wondering is whether this is yet supported in Chrome (not Chrome Canary) in version 31?
P.S. Look as though it's in both Chromium and Canary, but I'm not clear on whether it is in Chrome yet.
Upvotes: 4
Views: 2836
Reputation:
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 the JavaScript/Web Console in the browser. For example in Chrome pick Tools->JavaScript Console then type
document.createElement("canvas").getContext("experimental-webgl").getSupportedExtensions();
and you should see a list of extensions.
2) just try to get the extension and check if it succeeds
ext = gl.getExtension("ANGLE_instanced_arrays");
if (ext) {
// ANGLE_instanced_arrays extension exists
} else {
// ANGLE_instanced_arrays extension does not exist
}
This is the way your code should work in general. If the extension does not exist either make your code run without it or put up a message you require the extension.
Upvotes: 5