Use dep to vendor things

This commit is contained in:
2018-03-18 04:23:13 +00:00
parent d572a19352
commit 1ba64f2aa8
123 changed files with 34229 additions and 0 deletions

31
vendor/github.com/faiface/glhf/util.go generated vendored Normal file
View File

@@ -0,0 +1,31 @@
package glhf
import "github.com/go-gl/gl/v3.3-core/gl"
type binder struct {
restoreLoc uint32
bindFunc func(uint32)
obj uint32
prev []uint32
}
func (b *binder) bind() *binder {
var prev int32
gl.GetIntegerv(b.restoreLoc, &prev)
b.prev = append(b.prev, uint32(prev))
if b.prev[len(b.prev)-1] != b.obj {
b.bindFunc(b.obj)
}
return b
}
func (b *binder) restore() *binder {
if b.prev[len(b.prev)-1] != b.obj {
b.bindFunc(b.prev[len(b.prev)-1])
}
b.prev = b.prev[:len(b.prev)-1]
return b
}