mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
Check was missing from context_js
Run calls Check whether or not gopherjs is used, and it was not implemented here.
This commit is contained in:
parent
7611ea82da
commit
bbeb103383
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user