Enable blending by default

This commit is contained in:
bloeys
2022-05-21 12:11:15 +04:00
parent f1b6f3a7c0
commit 89d04c9d24
2 changed files with 7 additions and 0 deletions

View File

@ -178,6 +178,9 @@ func initOpenGL() error {
gl.CullFace(gl.BACK) gl.CullFace(gl.BACK)
gl.FrontFace(gl.CCW) gl.FrontFace(gl.CCW)
gl.Enable(gl.BLEND)
gl.BlendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA)
gl.ClearColor(0, 0, 0, 1) gl.ClearColor(0, 0, 0, 1)
return nil return nil
} }

View File

@ -18,6 +18,10 @@ import (
"github.com/veandco/go-sdl2/sdl" "github.com/veandco/go-sdl2/sdl"
) )
//BUGS:
// need to rebind the texutre if the texture (or any material values) change between draw calls
// DT handling for when it is zero is wrong! (Gives 1000 DT)
//TODO: Tasks: //TODO: Tasks:
// Build simple game // Build simple game
// Integrate physx // Integrate physx