fixed matrix stack update state

This commit is contained in:
2youyouo2
2017-03-27 15:28:23 +08:00
parent 5a9d6e67a8
commit ccbfc05b96
2 changed files with 6 additions and 1 deletions
+6
View File
@@ -50,11 +50,17 @@ proto.push = function(item) {
this.stack.push(this.top);
this.top = new cc.math.Matrix4(item);
//this.top = this._getFromPool(item);
this.update();
};
proto.pop = function() {
//this._putInPool(this.top);
this.top = this.stack.pop();
this.update();
};
proto.update = function () {
this.lastUpdated ++;
};
proto.release = function(){
-1
View File
@@ -106,7 +106,6 @@ math.glMatrixMode = function (mode) {
throw new Error("Invalid matrix mode specified"); //TODO: Proper error handling
break;
}
cc.current_stack.lastUpdated = cc.director.getTotalFrames();
};
math.glLoadIdentity = function () {