forked from fyne-io/gl-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
38 lines (30 loc) · 959 Bytes
/
types.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
//go:build !wasm
// +build !wasm
package gl
func (v Attrib) IsValid() bool { return v != NoAttrib }
func (v Program) IsValid() bool { return v != NoProgram }
func (v Shader) IsValid() bool { return v != NoShader }
func (v Buffer) IsValid() bool { return v != NoBuffer }
func (v Framebuffer) IsValid() bool { return v != NoFramebuffer }
func (v Renderbuffer) IsValid() bool { return v != NoRenderbuffer }
func (v Texture) IsValid() bool { return v != NoTexture }
func (v Uniform) IsValid() bool { return v != NoUniform }
// Implement Identifier() for the Object interface
func (p Program) Identifier() Enum {
return PROGRAM
}
func (s Shader) Identifier() Enum {
return SHADER
}
func (b Buffer) Identifier() Enum {
return BUFFER
}
func (fb Framebuffer) Identifier() Enum {
return FRAMEBUFFER
}
func (rb Renderbuffer) Identifier() Enum {
return RENDERBUFFER
}
func (t Texture) Identifier() Enum {
return TEXTURE
}