Use culling to draw sea of cubes.
authorBernie Innocenti <bernie@codewiz.org>
Mon, 8 May 2017 00:34:05 +0000 (20:34 -0400)
committerBernie Innocenti <bernie@codewiz.org>
Mon, 8 May 2017 00:34:05 +0000 (20:34 -0400)
shaded_cube.rs

index 240ddbf75d336fd4a6669761f288a8be7f27a640..f334d2fbd2bad3dc16616b73170a4bcec8304c44 100644 (file)
@@ -93,7 +93,7 @@ impl<'a> ShadedCube<'a> {
                 write: true,
                 ..Default::default()
             },
-            blend: glium::Blend::alpha_blending(),
+            backface_culling: glium::draw_parameters::BackfaceCullingMode::CullCounterClockwise,
             ..Default::default()
         };
         frame.draw(&self.vertexes, &self.indices, &self.program, uniforms, &params).unwrap();