(programObj, varName, transpose, matrix)
| 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) { |
no outgoing calls
no test coverage detected