Skip to content

Commit f9ff032

Browse files
authored
add Function
add setUniformLocationWithMatrix3fv
1 parent 6c9a8f6 commit f9ff032

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cocos2d/shaders/CCGLProgram.js

+9
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,15 @@ cc.GLProgram = cc.Class.extend(/** @lends cc.GLProgram# */{
553553
var locObj = typeof location === 'string' ? this.getUniformLocationForName(location) : location;
554554
this._glContext.uniform4fv(locObj, floatArray);
555555
},
556+
/**
557+
* calls glUniformMatrix3fv
558+
* @param {WebGLUniformLocation|String} location
559+
* @param {Float32Array} matrixArray
560+
*/
561+
setUniformLocationWithMatrix3fv: function (location, matrixArray) {
562+
var locObj = typeof location === 'string' ? this.getUniformLocationForName(location) : location;
563+
this._glContext.uniformMatrix3fv(locObj, false, matrixArray);
564+
},
556565

557566
/**
558567
* calls glUniformMatrix4fv

0 commit comments

Comments
 (0)