Added depth test function and 3D demo.

This commit is contained in:
Marvin Blum
2016-05-08 20:41:49 +02:00
parent 139e668233
commit 12433458cc
2 changed files with 75 additions and 0 deletions

View File

@@ -392,6 +392,15 @@ func EnableAlphaBlending(enable bool) {
}
}
// Enables/Disables depth test.
func EnableDepthTest(enable bool) {
if enable {
gl.Enable(gl.DEPTH_TEST)
} else {
gl.Disable(gl.DEPTH_TEST)
}
}
// Sets GL viewport and updates default resources and systems.
func SetViewport(x, y, width, height int32) {
viewportWidth = int(width)