From 6cfb92c4c48352a54e4059f9152dcf9d912b8697 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 4 Jul 2016 00:55:04 +0900 Subject: [PATCH] opengl: Remove init (JavaScript) --- internal/graphics/opengl/context_js.go | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/internal/graphics/opengl/context_js.go b/internal/graphics/opengl/context_js.go index adc3aa119..2a073cbaa 100644 --- a/internal/graphics/opengl/context_js.go +++ b/internal/graphics/opengl/context_js.go @@ -108,25 +108,11 @@ func NewContext() (*Context, error) { webglContext := js.Global.Call("require", "gl").Invoke(16, 16, options) gl = &webgl.Context{Object: webglContext} } - - c := &Context{ - locationCache: newLocationCache(), - lastCompositeMode: CompositeModeUnknown, - } + c := &Context{} c.gl = gl - c.init() return c, nil } -func (c *Context) init() { - gl := c.gl - // Textures' pixel formats are alpha premultiplied. - gl.Enable(gl.BLEND) - c.BlendFunc(CompositeModeSourceOver) - f := gl.GetParameter(gl.FRAMEBUFFER_BINDING) - c.screenFramebuffer = Framebuffer{f} -} - func (c *Context) Reset() error { c.locationCache = newLocationCache() c.lastFramebuffer = invalidFramebuffer