mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
internal/graphicsdriver/opengl: remove fnGetExtension
This commit is contained in:
parent
bae5aa7732
commit
c768860f3f
@ -49,7 +49,6 @@ type contextImpl struct {
|
|||||||
canvas js.Value
|
canvas js.Value
|
||||||
webGL2 bool
|
webGL2 bool
|
||||||
|
|
||||||
fnGetExtension js.Value
|
|
||||||
fnIsContextLost js.Value
|
fnIsContextLost js.Value
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,9 +69,6 @@ func (c *context) reset() error {
|
|||||||
f := c.ctx.GetInteger(gl.FRAMEBUFFER_BINDING)
|
f := c.ctx.GetInteger(gl.FRAMEBUFFER_BINDING)
|
||||||
c.screenFramebuffer = framebufferNative(f)
|
c.screenFramebuffer = framebufferNative(f)
|
||||||
|
|
||||||
if !c.webGL2 {
|
|
||||||
c.fnGetExtension.Invoke("OES_standard_derivatives")
|
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,9 +62,12 @@ func NewGraphics(canvas js.Value) (graphicsdriver.Graphics, error) {
|
|||||||
g.context.canvas = canvas
|
g.context.canvas = canvas
|
||||||
g.context.ctx = ctx
|
g.context.ctx = ctx
|
||||||
g.context.webGL2 = webGL2
|
g.context.webGL2 = webGL2
|
||||||
g.context.fnGetExtension = glContext.Get("getExtension").Call("bind", glContext)
|
|
||||||
g.context.fnIsContextLost = glContext.Get("isContextLost").Call("bind", glContext)
|
g.context.fnIsContextLost = glContext.Get("isContextLost").Call("bind", glContext)
|
||||||
|
|
||||||
|
if !webGL2 {
|
||||||
|
glContext.Call("getExtension", "OES_standard_derivatives")
|
||||||
|
}
|
||||||
|
|
||||||
return g, nil
|
return g, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user