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

Function isLinearFilteringSupported

docs/tests/v2/es6/js/sanddance.js:6226–6241  ·  view source on GitHub ↗
(gl, format)

Source from the content-addressed store, hash-verified

6224}
6225
6226function isLinearFilteringSupported(gl, format) {
6227 var info = TEXTURE_FORMATS[format];
6228
6229 switch (info && info.types[0]) {
6230 // Both WebGL1 and WebGL2?
6231 case 5126:
6232 return gl.getExtension('OES_texture_float_linear');
6233 // Not in WebGL2?
6234
6235 case 5131:
6236 return gl.getExtension('OES_texture_half_float_linear');
6237
6238 default:
6239 return true;
6240 }
6241}
6242
6243var Texture =
6244/*#__PURE__*/

Callers 1

sanddance.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected