mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 09:25:38 +00:00
gpu/internal/opengl: avoid PACK/UNPACK_ROW_LENGTH on WebGL 1
Fixes gio#259 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -262,6 +262,12 @@ func (f *Functions) GetBindingi(pname Enum, idx int) Object {
|
||||
return Object(obj)
|
||||
}
|
||||
func (f *Functions) GetInteger(pname Enum) int {
|
||||
if !f.isWebGL2 {
|
||||
switch pname {
|
||||
case PACK_ROW_LENGTH, UNPACK_ROW_LENGTH:
|
||||
return 0 // PACK_ROW_LENGTH and UNPACK_ROW_LENGTH is only available on WebGL 2
|
||||
}
|
||||
}
|
||||
return paramVal(f.Ctx.Call("getParameter", int(pname)))
|
||||
}
|
||||
func (f *Functions) GetFloat(pname Enum) float32 {
|
||||
|
||||
Reference in New Issue
Block a user