We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e06727 commit 7f45d53Copy full SHA for 7f45d53
cocos2d/progress-timer/CCProgressTimerWebGLRenderCmd.js
@@ -47,7 +47,7 @@
47
proto.rendering = function (ctx) {
48
var node = this._node;
49
var context = ctx || cc._renderContext;
50
- if (!this._vertexDataCount || !node._sprite)
+ if (this._vertexDataCount === 0 || !node._sprite)
51
return;
52
53
this._shaderProgram.use();
@@ -177,7 +177,11 @@
177
proto.releaseData = function(){
178
if (this._vertexData) {
179
//release all previous information
180
- cc._renderContext.deleteBuffer(this._vertexWebGLBuffer);
+ var webglBuffer = this._vertexWebGLBuffer;
181
+ setTimeout(function () {
182
+ cc._renderContext.deleteBuffer(webglBuffer);
183
+ }, 0.1);
184
+ this._vertexWebGLBuffer = null;
185
this._vertexData = null;
186
this._float32View = null;
187
this._vertexArrayBuffer = null;
0 commit comments