forked from joejulian/gio
3b6646933d
The rendering implementation is needed for using Gio UI with external window libraries such as GLFW. Expose it in the new package gpu. Updates #26 Signed-off-by: Elias Naur <mail@eliasnaur.com>
36 lines
583 B
Go
36 lines
583 B
Go
// +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
|
|
}
|
|
|
|
func (t Texture) Valid() bool {
|
|
return t.V != 0
|
|
}
|
|
|
|
func (t Texture) Equal(t2 Texture) bool {
|
|
return t == t2
|
|
}
|