Make backface culling ready to use

This commit is contained in:
2022-10-16 23:46:51 +02:00
parent 5236c99383
commit e4f634a441
2 changed files with 6 additions and 4 deletions
+2
View File
@@ -94,6 +94,8 @@ fn main() {
write: true,
..Default::default()
},
// Verify that it helps from the FPS point of view.
//backface_culling: glium::draw_parameters::BackfaceCullingMode::CullClockwise,
..Default::default()
};
+4 -4
View File
@@ -108,9 +108,9 @@ pub fn load_ground(display: &Display) -> VertexBufferAny {
// Second triangle.
vertex_data.push(Vertex {
position: [(lines_index + 1) as f32, column_below_right, (columns_index + 1) as f32],
position: [(lines_index + 1) as f32, column_below, columns_index as f32],
normal: [0.0, 0.0, 1.0],
tex_coords: [1.0, 1.0],
tex_coords: [1.0, 0.0],
});
vertex_data.push(Vertex {
@@ -120,9 +120,9 @@ pub fn load_ground(display: &Display) -> VertexBufferAny {
});
vertex_data.push(Vertex {
position: [(lines_index + 1) as f32, column_below, columns_index as f32],
position: [(lines_index + 1) as f32, column_below_right, (columns_index + 1) as f32],
normal: [0.0, 0.0, 1.0],
tex_coords: [1.0, 0.0],
tex_coords: [1.0, 1.0],
});
}
}