mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 18:05:35 +00:00
app/internal/glimpl: derive version parameter in Functions.Init
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -20,8 +20,10 @@ type Functions struct {
|
||||
int32Buf js.Value
|
||||
}
|
||||
|
||||
func (f *Functions) Init(version int) error {
|
||||
if version < 2 {
|
||||
func (f *Functions) Init() error {
|
||||
webgl2Class := js.Global().Get("WebGL2RenderingContext")
|
||||
iswebgl2 := !webgl2Class.IsNull() && f.Ctx.InstanceOf(webgl2Class)
|
||||
if !iswebgl2 {
|
||||
f.EXT_disjoint_timer_query = f.getExtension("EXT_disjoint_timer_query")
|
||||
if f.getExtension("OES_texture_half_float").IsNull() && f.getExtension("OES_texture_float").IsNull() {
|
||||
return errors.New("gl: no support for neither OES_texture_half_float nor OES_texture_float")
|
||||
|
||||
Reference in New Issue
Block a user