opengl: Remove Pause

This commit is contained in:
Hajime Hoshi 2016-06-12 18:18:43 +09:00
parent bd60f6eb9b
commit 870ce85615
4 changed files with 3 additions and 15 deletions

View File

@ -106,9 +106,6 @@ func (c *graphicsContext) flush() error {
func (c *graphicsContext) Resume() error {
ui.GLContext().Resume()
if !c.initialized {
return nil
}
if err := graphics.Initialize(ui.GLContext()); err != nil {
return err
}

View File

@ -104,15 +104,12 @@ func (c *Context) Init() error {
return nil
}
func (c *Context) Pause() {
func (c *Context) Resume() {
c.locationCache = newLocationCache()
c.lastFramebuffer = ZeroFramebuffer
c.lastViewportWidth = 0
c.lastViewportHeight = 0
c.lastCompositeMode = CompositeModeUnknown
}
func (c *Context) Resume() {
gl.Enable(gl.BLEND)
c.BlendFunc(CompositeModeSourceOver)
}

View File

@ -118,15 +118,12 @@ func (c *Context) init() {
c.BlendFunc(CompositeModeSourceOver)
}
func (c *Context) Pause() {
func (c *Context) Resume() {
c.locationCache = newLocationCache()
c.lastFramebuffer = ZeroFramebuffer
c.lastViewportWidth = 0
c.lastViewportHeight = 0
c.lastCompositeMode = CompositeModeUnknown
}
func (c *Context) Resume() {
gl := c.gl
gl.Enable(gl.BLEND)
c.BlendFunc(CompositeModeSourceOver)

View File

@ -80,15 +80,12 @@ func NewContext() (*Context, error) {
return c, nil
}
func (c *Context) Pause() {
func (c *Context) Resume() {
c.locationCache = newLocationCache()
c.lastFramebuffer = ZeroFramebuffer
c.lastViewportWidth = 0
c.lastViewportHeight = 0
c.lastCompositeMode = CompositeModeUnknown
}
func (c *Context) Resume() {
c.gl.Enable(mgl.BLEND)
c.BlendFunc(CompositeModeSourceOver)
}