medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 153913ae76921f76a171a76dc207b4829f087c3f
parent 9f5b144dc656df45884f7c8f90e1482b725ea558
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Mon Oct 31 23:13:26 +0200

Cleanup a bit

Diffstat:
renderer.cc | 19++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/renderer.cc b/renderer.cc @@ -5,11 +5,12 @@ #include "log.h" // #include "nonblocking_fixed_spsc_queue.h" -/* - * TODO: rename all these functions to _impl and make them push to this pipe - * instead - */ -// static NonblockingFixedSPSCQueue< DrawCall, 512 > render_queue; +static_assert( sizeof( VB ) == sizeof( GLuint ) ); +static_assert( sizeof( IB ) == sizeof( GLuint ) ); +static_assert( sizeof( UB ) == sizeof( GLuint ) ); +static_assert( sizeof( VAO ) == sizeof( GLuint ) ); +static_assert( sizeof( Shader ) == sizeof( GLuint ) ); +static_assert( sizeof( Texture ) == sizeof( GLuint ) ); static const u32 ATTR_POSITION = 0; static const u32 ATTR_NORMAL = 1; @@ -17,12 +18,6 @@ static const u32 ATTR_TEX_COORD0 = 2; static const u32 ATTR_TEX_COORD1 = 3; static const u32 ATTR_COLOUR = 4; -static_assert( sizeof( VB ) == sizeof( GLuint ) ); -static_assert( sizeof( IB ) == sizeof( GLuint ) ); -static_assert( sizeof( UB ) == sizeof( GLuint ) ); -static_assert( sizeof( VAO ) == sizeof( GLuint ) ); -static_assert( sizeof( Shader ) == sizeof( GLuint ) ); -static_assert( sizeof( Texture ) == sizeof( GLuint ) ); void renderer_begin_frame( ClearColourBool clear_colour, ClearDepthBool clear_depth ) { if( clear_colour == CLEARCOLOUR_DO || clear_depth == CLEARDEPTH_DO ) { @@ -225,8 +220,6 @@ Mesh renderer_new_mesh( MeshConfig config ) { glBindVertexArray( 0 ); - // TODO(mike): delete the VBOs so they don't leak? - Mesh mesh; mesh.vao = vao; mesh.num_vertices = config.num_vertices;