-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathtypes_webgl.go
52 lines (39 loc) · 1.01 KB
/
types_webgl.go
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build js
package gl
import "github.com/gopherjs/gopherjs/js"
type Enum int
type Attrib struct {
Value int
}
type Program struct {
*js.Object
}
type Shader struct {
*js.Object
}
type Buffer struct {
*js.Object
}
type Framebuffer struct {
*js.Object
}
type Renderbuffer struct {
*js.Object
}
type Texture struct {
*js.Object
}
type Uniform struct {
*js.Object
}
func (v Attrib) Valid() bool { return v.Value != 0 }
func (v Program) Valid() bool { return v.Object != nil }
func (v Shader) Valid() bool { return v.Object != nil }
func (v Buffer) Valid() bool { return v.Object != nil }
func (v Framebuffer) Valid() bool { return v.Object != nil }
func (v Renderbuffer) Valid() bool { return v.Object != nil }
func (v Texture) Valid() bool { return v.Object != nil }
func (v Uniform) Valid() bool { return v.Object != nil }