commit eca7428ca96858d191df03f896ea7419ebe3bf61 parent 1842e1bbad39c7ccab22eea836534873f10f482e Author: Michael Savage <mikejsavage@gmail.com> Date: Thu Aug 31 00:10:35 +0300 Oops Diffstat:
bsp.cc | | | 12 | +++++++----- |
diff --git a/bsp.cc b/bsp.cc @@ -290,10 +290,12 @@ GAME_FRAME( game_frame ) { UniformBinding view_uniforms = renderer_uniforms( V, P ); - RenderState render_state; - render_state.shader = get_shader( SHADER_FLAT_VERTEX_COLOURS ); - render_state.uniforms[ UB_VIEW ] = view_uniforms; - bspr_render( &game->bspr, game->pos, render_state ); + { + RenderState render_state; + render_state.shader = get_shader( SHADER_FLAT_VERTEX_COLOURS ); + render_state.uniforms[ UB_VIEW ] = view_uniforms; + bspr_render( &game->bspr, game->pos, render_state ); + } immediate_init( &imm, triangles, ARRAY_COUNT( triangles ) ); immediate_sphere( &imm, v3( 0, 0, 0 ), 128, v4( 1, 1, 0, 1 ) ); @@ -314,7 +316,7 @@ GAME_FRAME( game_frame ) { } RenderState immediate_render_state; - render_state.shader = get_shader( SHADER_FLAT_VERTEX_COLOURS ); + immediate_render_state.shader = get_shader( SHADER_FLAT_VERTEX_COLOURS ); immediate_render_state.uniforms[ UB_VIEW ] = view_uniforms; immediate_render( &imm, immediate_render_state );