Skip to content

Commit f63c49d

Browse files
committed
Fix matrix array not being updated in gl program issue
(fix cocos2d/cocos2d-html5/3511)
1 parent 5611806 commit f63c49d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: cocos2d/shaders/CCGLProgram.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ cc.GLProgram = cc.Class.extend(/** @lends cc.GLProgram# */{
6363
updated = true;
6464
} else {
6565
for (var i = 0; i < args.length; i += 1) {
66-
if (args[i] !== element[i]) {
66+
// Array and Typed Array inner values could be changed, so we must update them
67+
if (args[i] !== element[i] || typeof args[i] === 'object') {
6768
element[i] = args[i];
6869
updated = true;
6970
}

0 commit comments

Comments
 (0)