MCPcopy Create free account
hub / github.com/microsoft/SandDance / getFeature

Function getFeature

docs/app/js/sanddance-app.js:68528–68535  ·  view source on GitHub ↗
(gl, cap)

Source from the content-addressed store, hash-verified

68526 return canCompile;
68527}
68528function getFeature(gl, cap) {
68529 var feature = WEBGL_FEATURES[cap];
68530 (0, _assertDefault.default)(feature, cap);
68531 var extensionName = isWebGL2(gl) ? feature[1] || feature[0] : feature[0];
68532 var value = typeof extensionName === "string" ? Boolean(gl.getExtension(extensionName)) : extensionName;
68533 (0, _assertDefault.default)(value === false || value === true);
68534 return value;
68535}
68536function hasFeatures(gl, features) {
68537 features = Array.isArray(features) ? features : [
68538 features

Callers 1

hasFeaturesFunction · 0.70

Calls 1

isWebGL2Function · 0.70

Tested by

no test coverage detected