-
Notifications
You must be signed in to change notification settings - Fork 0
/
gospout.go
44 lines (36 loc) · 1.14 KB
/
gospout.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
package gospout
import (
"github.com/vizicist/gospout/internal/libspout"
)
// Config returns a config string
func Config() string {
return "gospout config"
}
// Sender is a spout sender
type Sender struct {
sender libspout.Sender
}
// CreateSender returns a Sender
func CreateSender(name string, width int, height int) Sender {
var s Sender
s.sender = libspout.CreateSender(name, width, height)
return s
}
// SendTexture sends a texture
func SendTexture(s Sender, texture uint32, width int, height int) bool {
return libspout.SendTexture(s.sender, texture, width, height)
}
// CreateReceiver creates a Receiver
func CreateReceiver(sendername string, width *int, height *int, bUseActive bool) bool {
b := libspout.CreateReceiver(sendername, width, height, bUseActive)
return b
}
// ReleaseReceiver releases things
func ReleaseReceiver() {
libspout.ReleaseReceiver()
}
// ReceiveTexture receives a texture
func ReceiveTexture(sendername string, width *int, height *int, textureID int, textureTarget int, bInvert bool, hostFBO int) bool {
b := libspout.ReceiveTexture(sendername, width, height, textureID, textureTarget, bInvert, hostFBO)
return b
}