commit 024bb02ea89e26dfd8b78e1f537e03357d5bceab parent 35dee0c11ef64f060d2d1ac953cd352b026c2681 Author: Michael Savage <mikejsavage@gmail.com> Date: Sat May 20 14:42:37 +0300 Don't use glCullFace in sm Diffstat:
shadow_map.cc | | | 5 | ++--- |
diff --git a/shadow_map.cc b/shadow_map.cc @@ -27,7 +27,7 @@ static const u32 SHADOW_SIZE = 1024; static v3 light_pos( -0, -10, 15 ); static v3 light_dir = v3_forward( -60, 90 ); -static void draw_scene( const RenderState & render_state, bool draw_light = false ) { +static void draw_scene( RenderState render_state, bool draw_light = false ) { immediate_init( &imm, triangles, ARRAY_COUNT( triangles ) ); m4 I = m4_identity(); @@ -58,9 +58,8 @@ static void draw_scene( const RenderState & render_state, bool draw_light = fals m4 M = m4_translation( v3( -7, -2, 0 ) ) * m4_rotx( deg_to_rad( 90 ) ); renderer_ub_easy( render_state.ubs[ UB_MODEL ], M ); - glCullFace( GL_BACK ); + render_state.cull_face = CULLFACE_FRONT; renderer_draw_mesh( tree_mesh, render_state ); - glCullFace( GL_FRONT ); } extern "C" GAME_INIT( game_init ) {