diff options
Diffstat (limited to 'src/render')
| -rw-r--r-- | src/render/gl_batch.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/render/gl_batch.h b/src/render/gl_batch.h index e7f979c..31ed0ea 100644 --- a/src/render/gl_batch.h +++ b/src/render/gl_batch.h @@ -80,15 +80,19 @@ inline GL_BATCH<VERTEX>* gl_batch_create( template <typename VERTEX> inline void gl_batch_destroy( GL_BATCH<VERTEX>* batch ) { glDeleteBuffers( 1, &batch->vbuffer ); - for( auto& it : batch->calls ) + for( auto& it : batch->calls ) { it.textures.clear(); + it.vertices.clear(); + } delete batch; } template <typename VERTEX> inline void gl_batch_empty( GL_BATCH<VERTEX>* batch ) { - for( auto& it : batch->calls ) + for( auto& it : batch->calls ) { it.textures.clear(); + it.vertices.clear(); + } batch->calls.clear(); } |
