Skip to content

Commit 8cc2b2e

Browse files
authored
Merge pull request #3519 from pandamicro/develop
Fix infinite call stack in ArmatureWebGLRenderCmd
2 parents 805fe8f + 869af73 commit 8cc2b2e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cocos2d/core/CCDrawingPrimitivesWebGL.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ cc.DrawingPrimitiveWebGL = cc.Class.extend(/** @lends cc.DrawingPrimitiveWebGL#
6161
_t._shader = cc.shaderCache.programForKey(cc.SHADER_POSITION_UCOLOR);
6262
_t._shader._addUniformLocation(this._colorLocation);
6363
_t._shader._addUniformLocation(this._pointSizeLocation);
64-
_t._glProgramState = new cc.GLProgramState(_t._shader);
64+
_t._glProgramState = cc.GLProgramState.getOrCreateWithGLProgram(_t._shader);
6565

6666
_t._initialized = true;
6767
}

extensions/cocostudio/armature/CCArmatureWebGLRenderCmd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
};
119119

120120
proto.setShaderProgram = function (shaderProgram) {
121-
this._shaderProgram = shaderProgram;
121+
this._glProgramState = cc.GLProgramState.getOrCreateWithGLProgram(shaderProgram);
122122
};
123123

124124
proto._updateColorAndOpacity = function (skinRenderCmd, bone) {

0 commit comments

Comments
 (0)