~eliasnaur/gio

gio/gpu/gl/types.go -rw-r--r-- 470 bytes
d2e06d93Elias Naur widget: update Editor dimensions after input 23 hours ago
                                                                                
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
// +build !js

package gl

type (
	Buffer       struct{ V uint }
	Framebuffer  struct{ V uint }
	Program      struct{ V uint }
	Renderbuffer struct{ V uint }
	Shader       struct{ V uint }
	Texture      struct{ V uint }
	Query        struct{ V uint }
	Uniform      struct{ V int }
	Object       struct{ V uint }
)

func (u Uniform) valid() bool {
	return u.V != -1
}

func (p Program) valid() bool {
	return p.V != 0
}

func (s Shader) valid() bool {
	return s.V != 0
}