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 { 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
} }

View File

@ -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)
} }

View File

@ -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)

View File

@ -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)
} }