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 5d1a764 commit 0e2db62Copy full SHA for 0e2db62
cocos2d/shaders/CCGLStateCache.js
@@ -38,17 +38,12 @@ if (cc.ENABLE_GL_STATE_CACHE) {
38
cc._uVAO = 0;
39
40
var _currBuffers = {};
41
- var _currBuffer;
42
43
WebGLRenderingContext.prototype.glBindBuffer = WebGLRenderingContext.prototype.bindBuffer;
44
WebGLRenderingContext.prototype.bindBuffer = function (target, buffer) {
45
if (_currBuffers[target] !== buffer) {
46
- _currBuffers[target] = buffer;
47
this.glBindBuffer(target, buffer);
48
- }
49
-
50
- if (!_currBuffer || _currBuffer !== buffer) {
51
- _currBuffer = buffer;
+ _currBuffers[target] = buffer;
52
return false;
53
}
54
else {
0 commit comments