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

Function getSamplerSetter

docs/app/js/sanddance-app.js:64906–64916  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64904 } else uniforms[key] = value;
64905}
64906function getSamplerSetter() {
64907 var cache = null;
64908 return function(gl, location, value) {
64909 var update = cache !== value;
64910 if (update) {
64911 gl.uniform1i(location, value);
64912 cache = value;
64913 }
64914 return update;
64915 };
64916}
64917function getArraySetter(functionName, toArray, size, uniformSetter) {
64918 var cache = null;
64919 var cacheLength = null;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected