mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 03:58:55 +01:00
opengl: Bug fix: return error when error occurs
This commit is contained in:
parent
a5f80c3716
commit
90ec2c79ce
@ -95,7 +95,7 @@ func (c *Context) Reset() error {
|
|||||||
c.init = true
|
c.init = true
|
||||||
return nil
|
return nil
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
c.locationCache = newLocationCache()
|
c.locationCache = newLocationCache()
|
||||||
c.lastTexture = invalidTexture
|
c.lastTexture = invalidTexture
|
||||||
@ -103,21 +103,17 @@ func (c *Context) Reset() error {
|
|||||||
c.lastViewportWidth = 0
|
c.lastViewportWidth = 0
|
||||||
c.lastViewportHeight = 0
|
c.lastViewportHeight = 0
|
||||||
c.lastCompositeMode = CompositeModeUnknown
|
c.lastCompositeMode = CompositeModeUnknown
|
||||||
if err := c.runOnContextThread(func() error {
|
_ = c.runOnContextThread(func() error {
|
||||||
gl.Enable(gl.BLEND)
|
gl.Enable(gl.BLEND)
|
||||||
return nil
|
return nil
|
||||||
}); err != nil {
|
})
|
||||||
return err
|
|
||||||
}
|
|
||||||
c.BlendFunc(CompositeModeSourceOver)
|
c.BlendFunc(CompositeModeSourceOver)
|
||||||
if err := c.runOnContextThread(func() error {
|
_ = c.runOnContextThread(func() error {
|
||||||
f := int32(0)
|
f := int32(0)
|
||||||
gl.GetIntegerv(gl.FRAMEBUFFER_BINDING, &f)
|
gl.GetIntegerv(gl.FRAMEBUFFER_BINDING, &f)
|
||||||
c.screenFramebuffer = Framebuffer(f)
|
c.screenFramebuffer = Framebuffer(f)
|
||||||
return nil
|
return nil
|
||||||
}); err != nil {
|
})
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user