graphicsdriver/opengl: Refactoring

This commit is contained in:
Hajime Hoshi 2020-11-21 16:44:49 +09:00
parent 4df958c9fd
commit 2097312a8b

View File

@ -94,15 +94,9 @@ const (
)
var (
isWebGL2Available bool
isWebGL2Available = js.Global().Get("WebGL2RenderingContext").Truthy()
)
func init() {
if js.Global().Get("WebGL2RenderingContext").Truthy() {
isWebGL2Available = true
}
}
type contextImpl struct {
gl js.Value
lastProgramID programID