File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed
Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,8 @@ -(void)dealloc
162162
163163 glDeleteBuffers (1 , &_vbo); _vbo = 0 ;
164164 glDeleteVertexArrays (1 , &_vao); _vao = 0 ;
165-
165+ ccGLBindVAO (0 );
166+
166167 [super dealloc ];
167168}
168169
Original file line number Diff line number Diff line change @@ -162,6 +162,7 @@ - (void) setTotalParticles:(NSUInteger)tp
162162 // clean VAO
163163 glDeleteBuffers (2 , &_buffersVBO[0 ]);
164164 glDeleteVertexArrays (1 , &_VAOname);
165+ ccGLBindVAO (0 );
165166
166167 [self initVAO ];
167168 }
@@ -227,6 +228,7 @@ -(void) dealloc
227228
228229 glDeleteBuffers (2 , &_buffersVBO[0 ]);
229230 glDeleteVertexArrays (1 , &_VAOname);
231+ ccGLBindVAO (0 );
230232 }
231233
232234 [super dealloc ];
@@ -489,6 +491,7 @@ -(void) setBatchNode:(CCParticleBatchNode *)batchNode
489491
490492 glDeleteBuffers (2 , &_buffersVBO[0 ]);
491493 glDeleteVertexArrays (1 , &_VAOname);
494+ ccGLBindVAO (0 );
492495 }
493496 }
494497}
Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ -(void) dealloc
140140
141141#if CC_TEXTURE_ATLAS_USE_VAO
142142 glDeleteVertexArrays (1 , &_VAOname);
143+ ccGLBindVAO (0 );
143144#endif
144145
145146 [_texture release ];
You can’t perform that action at this time.
0 commit comments