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

Method setUniform4fv

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

Source from the content-addressed store, hash-verified

901 }
902
903 setUniform4fv(name, value) {
904 if (this.uniform4fvCache.hasOwnProperty(name)) {
905 const cache = this.uniform4fvCache[name];
906 if (
907 value[0] === cache[0] &&
908 value[1] === cache[1] &&
909 value[2] === cache[2] &&
910 value[3] === cache[3]
911 ) {
912 return;
913 }
914 }
915 this.uniform4fvCache[name] = value;
916 const loc = this.getUniformLocation(name);
917 this.context.uniform4fv(loc, value);
918 }
919
920 setUniform4iv(name, value) {
921 if (this.uniform4ivCache.hasOwnProperty(name)) {

Callers 2

setUniform4fvTestFunction · 0.80
updateValueMethod · 0.80

Calls 1

getUniformLocationMethod · 0.95

Tested by

no test coverage detected