aboutsummaryrefslogtreecommitdiff
path: root/vendor/gioui.org/gpu/gl/types_js.go
blob: 16e3a713a862cf95919655c1e2036af4303fc864 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// SPDX-License-Identifier: Unlicense OR MIT

package gl

import "syscall/js"

type (
	Buffer       js.Value
	Framebuffer  js.Value
	Program      js.Value
	Renderbuffer js.Value
	Shader       js.Value
	Texture      js.Value
	Query        js.Value
	Uniform      js.Value
	Object       js.Value
)

func (p Program) valid() bool {
	return !js.Value(p).IsUndefined() && !js.Value(p).IsNull()
}

func (s Shader) valid() bool {
	return !js.Value(s).IsUndefined() && !js.Value(s).IsNull()
}

func (u Uniform) valid() bool {
	return !js.Value(u).IsUndefined() && !js.Value(u).IsNull()
}