commit ccdd57d8674881500b5ea2f94ab171609c3775fd
parent 37dc01a237b743f0cb004c03ea2923f57d4e7df9
Author: Michael Savage <mikejsavage@gmail.com>
Date: Sun, 29 Oct 2017 19:08:46 +0200
More backface culling fixes
Diffstat:
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/hm.cc b/hm.cc
@@ -314,7 +314,6 @@ GAME_FRAME( game_frame ) {
render_state.shader = get_shader( SHADER_TREE );
render_state.uniforms[ UNIFORMS_VIEW ] = view_uniforms;
render_state.uniforms[ UNIFORMS_SUN ] = renderer_uniforms( sun_dir );
- render_state.cull_face = CULLFACE_FRONT;
renderer_draw_instances( tree_mesh, render_state, num_trees, instance_data );
}
@@ -326,26 +325,26 @@ GAME_FRAME( game_frame ) {
const v4 red( 1, 0, 0, 1 );
immediate_triangle(
- v3( -crosshair_length, -crosshair_thickness, 0 ),
v3( -crosshair_length, crosshair_thickness, 0 ),
+ v3( -crosshair_length, -crosshair_thickness, 0 ),
v3( crosshair_length, crosshair_thickness, 0 ),
red
);
immediate_triangle(
- v3( crosshair_length, crosshair_thickness, 0 ),
v3( crosshair_length, -crosshair_thickness, 0 ),
+ v3( crosshair_length, crosshair_thickness, 0 ),
v3( -crosshair_length, -crosshair_thickness, 0 ),
red
);
immediate_triangle(
- v3( -crosshair_thickness / aspect, crosshair_length * aspect, 0 ),
v3( crosshair_thickness / aspect, crosshair_length * aspect, 0 ),
+ v3( -crosshair_thickness / aspect, crosshair_length * aspect, 0 ),
v3( crosshair_thickness / aspect, -crosshair_length * aspect, 0 ),
red
);
immediate_triangle(
- v3( crosshair_thickness / aspect, -crosshair_length * aspect, 0 ),
v3( -crosshair_thickness / aspect, -crosshair_length * aspect, 0 ),
+ v3( crosshair_thickness / aspect, -crosshair_length * aspect, 0 ),
v3( -crosshair_thickness / aspect, crosshair_length * aspect, 0 ),
red
);