internal/graphicsdriver/opengl: bug fix: needed to reset lastBlend

This commit is contained in:
Hajime Hoshi 2022-10-16 20:44:09 +09:00
parent 7c459c152b
commit b6987b6312
3 changed files with 3 additions and 0 deletions

View File

@ -100,6 +100,7 @@ func (c *context) reset() error {
c.lastFramebuffer = invalidFramebuffer
c.lastViewportWidth = 0
c.lastViewportHeight = 0
c.lastBlend = graphicsdriver.Blend{}
gl.Enable(gl.BLEND)
gl.Enable(gl.SCISSOR_TEST)

View File

@ -93,6 +93,7 @@ func (c *context) reset() error {
c.lastFramebuffer = invalidFramebuffer
c.lastViewportWidth = 0
c.lastViewportHeight = 0
c.lastBlend = graphicsdriver.Blend{}
c.ctx.Enable(gles.BLEND)
c.ctx.Enable(gles.SCISSOR_TEST)
c.blend(graphicsdriver.BlendSourceOver)

View File

@ -163,6 +163,7 @@ func (c *context) reset() error {
c.lastFramebuffer = framebufferNative(js.Null())
c.lastViewportWidth = 0
c.lastViewportHeight = 0
c.lastBlend = graphicsdriver.Blend{}
if err := c.initGL(); err != nil {
return err