Merge pull request #134 from DrJosh9000/patch-2

Check was missing from context_js
This commit is contained in:
Hajime Hoshi 2016-01-20 00:55:04 +09:00
commit 13537817cc

View File

@ -112,6 +112,13 @@ func (c *Context) init() {
gl.BlendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA)
}
func (c *Context) Check() {
gl := c.gl
if e := gl.GetError(); e != gl.NO_ERROR {
panic(fmt.Sprintf("check failed: %d", e))
}
}
func (c *Context) NewTexture(width, height int, pixels []uint8, filter Filter) (Texture, error) {
gl := c.gl
t := gl.CreateTexture()