Compare commits

..

2 Commits

Author SHA1 Message Date
901d8e2b5e Don't disable blending after ui render 2022-05-21 15:48:50 +04:00
89d04c9d24 Enable blending by default 2022-05-21 12:11:15 +04:00
3 changed files with 7 additions and 1 deletions

View File

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

View File

@ -18,6 +18,10 @@ import (
"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:
// Build simple game
// Integrate physx

View File

@ -120,7 +120,6 @@ func (i *ImguiInfo) Render(winWidth, winHeight float32, fbWidth, fbHeight int32)
}
//Reset gl state
gl.Disable(gl.BLEND)
gl.Disable(gl.SCISSOR_TEST)
gl.Enable(gl.CULL_FACE)
gl.Enable(gl.DEPTH_TEST)