Added depth buffer handling

This was originally supposed to be in there.
This commit is contained in:
Michael H. Gimle
2020-09-08 06:44:49 +02:00
committed by GitHub
parent 8b22b76286
commit b45bf8d2d0

View File

@@ -77,6 +77,8 @@ fn main() {
// Set up openGL
unsafe {
gl::Enable(gl::DEPTH);
gl::DepthFunc(gl::LESS);
gl::Enable(gl::CULL_FACE);
gl::Disable(gl::MULTISAMPLE);
gl::Enable(gl::BLEND);
@@ -141,7 +143,7 @@ fn main() {
unsafe {
gl::ClearColor(0.163, 0.163, 0.163, 1.0);
gl::Clear(gl::COLOR_BUFFER_BIT);
gl::Clear(gl::COLOR_BUFFER_BIT | gl::DEPTH_BUFFER_BIT);
// Issue the necessary commands to draw your scene here