MCPcopy Create free account
hub / github.com/gpujs/gpu.js / setUniform4iv

Method setUniform4iv

src/backend/web-gl/kernel.js:920–935  ·  view source on GitHub ↗
(name, value)

Source from the content-addressed store, hash-verified

918 }
919
920 setUniform4iv(name, value) {
921 if (this.uniform4ivCache.hasOwnProperty(name)) {
922 const cache = this.uniform4ivCache[name];
923 if (
924 value[0] === cache[0] &&
925 value[1] === cache[1] &&
926 value[2] === cache[2] &&
927 value[3] === cache[3]
928 ) {
929 return;
930 }
931 }
932 this.uniform4ivCache[name] = value;
933 const loc = this.getUniformLocation(name);
934 this.context.uniform4iv(loc, value);
935 }
936
937 /**
938 * @desc Return WebGlUniformLocation for various variables

Callers 1

setUniform4ivTestFunction · 0.80

Calls 1

getUniformLocationMethod · 0.95

Tested by

no test coverage detected