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

Function isFeatureSupported

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

Source from the content-addressed store, hash-verified

64111 return gl.luma.caps;
64112}
64113function isFeatureSupported(gl, cap) {
64114 gl.luma = gl.luma || {};
64115 gl.luma.caps = gl.luma.caps || {};
64116 if (gl.luma.caps[cap] === undefined) gl.luma.caps[cap] = queryFeature(gl, cap);
64117 if (!gl.luma.caps[cap]) (0, _gltools.log).log(LOG_UNSUPPORTED_FEATURE, "Feature: ".concat(cap, " not supported"))();
64118 return gl.luma.caps[cap];
64119}
64120function queryFeature(gl, cap) {
64121 var feature = (0, _webglFeaturesTableDefault.default)[cap];
64122 (0, _utils.assert)(feature, cap);

Callers 2

hasFeaturesFunction · 0.70
getFeaturesFunction · 0.70

Calls 2

queryFeatureFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected