mirror of
https://github.com/Kugelschieber/go-game.git
synced 2026-01-18 06:40:28 +00:00
Added depth test function and 3D demo.
This commit is contained in:
9
game.go
9
game.go
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user