MCPcopy Index your code
hub / github.com/corbanbrook/dsp.js / uniformMatrix

Function uniformMatrix

examples/js/processing.js:1059–1071  ·  view source on GitHub ↗
(programObj, varName, transpose, matrix)

Source from the content-addressed store, hash-verified

1057 }
1058
1059 function uniformMatrix(programObj, varName, transpose, matrix) {
1060 var varLocation = curContext.getUniformLocation(programObj, varName);
1061 // the variable won't be found if it was optimized out.
1062 if (varLocation !== -1) {
1063 if (matrix.length === 16) {
1064 curContext.uniformMatrix4fv(varLocation, transpose, matrix);
1065 } else if (matrix.length === 9) {
1066 curContext.uniformMatrix3fv(varLocation, transpose, matrix);
1067 } else {
1068 curContext.uniformMatrix2fv(varLocation, transpose, matrix);
1069 }
1070 }
1071 }
1072
1073 // Wrapper to easily deal with array names changes. TODO: Don't think we need this wrapper anymore consensus has been reached.
1074 var newWebGLArray = function(data) {

Callers 5

processing.jsFile · 0.85
point3DFunction · 0.85
line3DFunction · 0.85
fill3DFunction · 0.85
text$line$3dFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected