commit e62c8e4976a510072b8755d4296791c3390205bf parent c5842a09fe5a7063c626a75a5a32b1fd8d00c249 Author: Michael Savage <mikejsavage@gmail.com> Date: Tue Sep 12 22:32:53 +0300 Some renderer sanity checks Diffstat:
renderer.cc | | | 4 | ++++ |
diff --git a/renderer.cc b/renderer.cc @@ -940,6 +940,8 @@ static void set_render_state( const RenderState & state ) { } void renderer_draw_mesh( const Mesh & mesh, const RenderState & render_state ) { + ASSERT( in_frame && in_pass ); + DrawCall dc; dc.mesh = mesh; dc.render_state = render_state; @@ -949,6 +951,8 @@ void renderer_draw_mesh( const Mesh & mesh, const RenderState & render_state ) { } void renderer_draw_instances( const Mesh & mesh, const RenderState & render_state, u32 num_instances, VB instance_data ) { + ASSERT( in_frame && in_pass ); + if( num_instances == 0 ) { return; }