mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-12 22:17:26 +01:00
internal/graphicsdriver/opengl: bug fix: needed to reset lastBlend
This commit is contained in:
parent
7c459c152b
commit
b6987b6312
@ -100,6 +100,7 @@ func (c *context) reset() error {
|
|||||||
c.lastFramebuffer = invalidFramebuffer
|
c.lastFramebuffer = invalidFramebuffer
|
||||||
c.lastViewportWidth = 0
|
c.lastViewportWidth = 0
|
||||||
c.lastViewportHeight = 0
|
c.lastViewportHeight = 0
|
||||||
|
c.lastBlend = graphicsdriver.Blend{}
|
||||||
gl.Enable(gl.BLEND)
|
gl.Enable(gl.BLEND)
|
||||||
gl.Enable(gl.SCISSOR_TEST)
|
gl.Enable(gl.SCISSOR_TEST)
|
||||||
|
|
||||||
|
@ -93,6 +93,7 @@ func (c *context) reset() error {
|
|||||||
c.lastFramebuffer = invalidFramebuffer
|
c.lastFramebuffer = invalidFramebuffer
|
||||||
c.lastViewportWidth = 0
|
c.lastViewportWidth = 0
|
||||||
c.lastViewportHeight = 0
|
c.lastViewportHeight = 0
|
||||||
|
c.lastBlend = graphicsdriver.Blend{}
|
||||||
c.ctx.Enable(gles.BLEND)
|
c.ctx.Enable(gles.BLEND)
|
||||||
c.ctx.Enable(gles.SCISSOR_TEST)
|
c.ctx.Enable(gles.SCISSOR_TEST)
|
||||||
c.blend(graphicsdriver.BlendSourceOver)
|
c.blend(graphicsdriver.BlendSourceOver)
|
||||||
|
@ -163,6 +163,7 @@ func (c *context) reset() error {
|
|||||||
c.lastFramebuffer = framebufferNative(js.Null())
|
c.lastFramebuffer = framebufferNative(js.Null())
|
||||||
c.lastViewportWidth = 0
|
c.lastViewportWidth = 0
|
||||||
c.lastViewportHeight = 0
|
c.lastViewportHeight = 0
|
||||||
|
c.lastBlend = graphicsdriver.Blend{}
|
||||||
|
|
||||||
if err := c.initGL(); err != nil {
|
if err := c.initGL(); err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user