mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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
|
||||
webGL2 bool
|
||||
|
||||
fnGetExtension js.Value
|
||||
fnIsContextLost js.Value
|
||||
}
|
||||
|
||||
@ -70,9 +69,6 @@ func (c *context) reset() error {
|
||||
f := c.ctx.GetInteger(gl.FRAMEBUFFER_BINDING)
|
||||
c.screenFramebuffer = framebufferNative(f)
|
||||
|
||||
if !c.webGL2 {
|
||||
c.fnGetExtension.Invoke("OES_standard_derivatives")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -62,9 +62,12 @@ func NewGraphics(canvas js.Value) (graphicsdriver.Graphics, error) {
|
||||
g.context.canvas = canvas
|
||||
g.context.ctx = ctx
|
||||
g.context.webGL2 = webGL2
|
||||
g.context.fnGetExtension = glContext.Get("getExtension").Call("bind", glContext)
|
||||
g.context.fnIsContextLost = glContext.Get("isContextLost").Call("bind", glContext)
|
||||
|
||||
if !webGL2 {
|
||||
glContext.Call("getExtension", "OES_standard_derivatives")
|
||||
}
|
||||
|
||||
return g, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user