forked from vulkan-go/glfw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
native_linbsd.go
45 lines (37 loc) · 845 Bytes
/
native_linbsd.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
// +build linux freebsd
package glfw
//#define GLFW_EXPOSE_NATIVE_X11
//#define GLFW_EXPOSE_NATIVE_GLX
//#include "glfw/include/GLFW/glfw3.h"
//#include "glfw/include/GLFW/glfw3native.h"
import "C"
func GetX11Display() *C.Display {
ret := C.glfwGetX11Display()
panicError()
return ret
}
func (m *Monitor) GetX11Adapter() C.RRCrtc {
ret := C.glfwGetX11Adapter(m.data)
panicError()
return ret
}
func (m *Monitor) GetX11Monitor() C.RROutput {
ret := C.glfwGetX11Monitor(m.data)
panicError()
return ret
}
func (w *Window) GetX11Window() C.Window {
ret := C.glfwGetX11Window(w.data)
panicError()
return ret
}
func (w *Window) GetGLXContext() C.GLXContext {
ret := C.glfwGetGLXContext(w.data)
panicError()
return ret
}
func (w *Window) GetGLXWindow() C.GLXWindow {
ret := C.glfwGetGLXWindow(w.data)
panicError()
return ret
}