Make backface culling ready to use
This commit is contained in:
@@ -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
@@ -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],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user