MCPcopy Index your code
hub / github.com/gpujs/gpu.js / setUniform2f

Method setUniform2f

src/backend/web-gl/kernel.js:826–839  ·  view source on GitHub ↗
(name, value1, value2)

Source from the content-addressed store, hash-verified

824 }
825
826 setUniform2f(name, value1, value2) {
827 if (this.uniform2fCache.hasOwnProperty(name)) {
828 const cache = this.uniform2fCache[name];
829 if (
830 value1 === cache[0] &&
831 value2 === cache[1]
832 ) {
833 return;
834 }
835 }
836 this.uniform2fCache[name] = [value1, value2];
837 const loc = this.getUniformLocation(name);
838 this.context.uniform2f(loc, value1, value2);
839 }
840
841 setUniform2fv(name, value) {
842 if (this.uniform2fvCache.hasOwnProperty(name)) {

Callers 2

runMethod · 0.95
setUniform2fTestFunction · 0.80

Calls 1

getUniformLocationMethod · 0.95

Tested by

no test coverage detected