mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
opengl: Remove Pause
This commit is contained in:
parent
bd60f6eb9b
commit
870ce85615
@ -106,9 +106,6 @@ func (c *graphicsContext) flush() error {
|
|||||||
|
|
||||||
func (c *graphicsContext) Resume() error {
|
func (c *graphicsContext) Resume() error {
|
||||||
ui.GLContext().Resume()
|
ui.GLContext().Resume()
|
||||||
if !c.initialized {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
if err := graphics.Initialize(ui.GLContext()); err != nil {
|
if err := graphics.Initialize(ui.GLContext()); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -104,15 +104,12 @@ func (c *Context) Init() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Context) Pause() {
|
func (c *Context) Resume() {
|
||||||
c.locationCache = newLocationCache()
|
c.locationCache = newLocationCache()
|
||||||
c.lastFramebuffer = ZeroFramebuffer
|
c.lastFramebuffer = ZeroFramebuffer
|
||||||
c.lastViewportWidth = 0
|
c.lastViewportWidth = 0
|
||||||
c.lastViewportHeight = 0
|
c.lastViewportHeight = 0
|
||||||
c.lastCompositeMode = CompositeModeUnknown
|
c.lastCompositeMode = CompositeModeUnknown
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Context) Resume() {
|
|
||||||
gl.Enable(gl.BLEND)
|
gl.Enable(gl.BLEND)
|
||||||
c.BlendFunc(CompositeModeSourceOver)
|
c.BlendFunc(CompositeModeSourceOver)
|
||||||
}
|
}
|
||||||
|
@ -118,15 +118,12 @@ func (c *Context) init() {
|
|||||||
c.BlendFunc(CompositeModeSourceOver)
|
c.BlendFunc(CompositeModeSourceOver)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Context) Pause() {
|
func (c *Context) Resume() {
|
||||||
c.locationCache = newLocationCache()
|
c.locationCache = newLocationCache()
|
||||||
c.lastFramebuffer = ZeroFramebuffer
|
c.lastFramebuffer = ZeroFramebuffer
|
||||||
c.lastViewportWidth = 0
|
c.lastViewportWidth = 0
|
||||||
c.lastViewportHeight = 0
|
c.lastViewportHeight = 0
|
||||||
c.lastCompositeMode = CompositeModeUnknown
|
c.lastCompositeMode = CompositeModeUnknown
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Context) Resume() {
|
|
||||||
gl := c.gl
|
gl := c.gl
|
||||||
gl.Enable(gl.BLEND)
|
gl.Enable(gl.BLEND)
|
||||||
c.BlendFunc(CompositeModeSourceOver)
|
c.BlendFunc(CompositeModeSourceOver)
|
||||||
|
@ -80,15 +80,12 @@ func NewContext() (*Context, error) {
|
|||||||
return c, nil
|
return c, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Context) Pause() {
|
func (c *Context) Resume() {
|
||||||
c.locationCache = newLocationCache()
|
c.locationCache = newLocationCache()
|
||||||
c.lastFramebuffer = ZeroFramebuffer
|
c.lastFramebuffer = ZeroFramebuffer
|
||||||
c.lastViewportWidth = 0
|
c.lastViewportWidth = 0
|
||||||
c.lastViewportHeight = 0
|
c.lastViewportHeight = 0
|
||||||
c.lastCompositeMode = CompositeModeUnknown
|
c.lastCompositeMode = CompositeModeUnknown
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Context) Resume() {
|
|
||||||
c.gl.Enable(mgl.BLEND)
|
c.gl.Enable(mgl.BLEND)
|
||||||
c.BlendFunc(CompositeModeSourceOver)
|
c.BlendFunc(CompositeModeSourceOver)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user