fix semi-transparent (water) rendering

This commit is contained in:
2022-01-29 22:29:27 +08:00
parent fea09c5012
commit 444697b205
11 changed files with 212 additions and 132 deletions

View File

@ -6,7 +6,9 @@ import (
"time"
"edgaru089.ml/go/gl01/internal/game"
gio "edgaru089.ml/go/gl01/internal/io"
_ "edgaru089.ml/go/gl01/internal/render/gpu_preference"
"edgaru089.ml/go/gl01/internal/util/itype"
"github.com/go-gl/gl/all-core/gl"
"github.com/go-gl/glfw/v3.3/glfw"
)
@ -50,6 +52,7 @@ func main() {
game := game.NewGame()
game.Init(win)
gio.ClearColor = itype.Vec3f{0.6, 0.8, 1.0}
gl.ClearColor(0.6, 0.8, 1.0, 1)
gl.Clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT)
win.SwapBuffers()