commit a30eaf1d39d04a7d384b4acd36aaaf049bbc09a9 parent 11b31ad67bcea7ed54f143b99ecc65fecce450d3 Author: Michael Savage <mikejsavage@gmail.com> Date: Sat Jun 17 13:16:58 +0300 Orphan the old buffer in renderer_ub/tb_data Diffstat:
renderer.cc | | | 2 | ++ |
diff --git a/renderer.cc b/renderer.cc @@ -163,6 +163,7 @@ void renderer_ub_data( UB ub, const void * data, u32 len ) { ASSERT( len < S32_MAX ); glBindBuffer( GL_UNIFORM_BUFFER, ub ); + glBufferData( GL_UNIFORM_BUFFER, len, NULL, GL_DYNAMIC_DRAW ); glBufferData( GL_UNIFORM_BUFFER, len, data, GL_DYNAMIC_DRAW ); } @@ -196,6 +197,7 @@ void renderer_tb_data( TB tb, const void * data, u32 len, BufferUsage usage ) { ASSERT( len < S32_MAX ); glBindBuffer( GL_TEXTURE_BUFFER, tb.tbo ); + glBufferData( GL_TEXTURE_BUFFER, len, NULL, bufferusage_to_glenum( usage ) ); glBufferData( GL_TEXTURE_BUFFER, len, data, bufferusage_to_glenum( usage ) ); }