Ejemplo n.º 1
0
func MakeContextCurrent(w *Window) {
	if w == nil {
		C.glfwMakeContextCurrent(nil)
	} else {
		C.glfwMakeContextCurrent(w.w)
	}
}
Ejemplo n.º 2
0
// DetachCurrentContext detaches the current context.
func DetachCurrentContext() {
	C.glfwMakeContextCurrent(nil)
	panicError()
}
Ejemplo n.º 3
0
// MakeContextCurrent makes the context of the window current.
// Originally GLFW 3 passes a null pointer to detach the context.
// But since we're using receievers, DetachCurrentContext should
// be used instead.
func (w *Window) MakeContextCurrent() {
	C.glfwMakeContextCurrent(w.data)
	panicError()
}
Ejemplo n.º 4
0
//DetachCurrentContext detaches the current context.
func DetachCurrentContext() {
	C.glfwMakeContextCurrent(nil)
}
Ejemplo n.º 5
0
//MakeContextCurrent makes the context of the window current.
//Originally GLFW 3 passes a null pointer to detach the context.
//But since we're using receievers, DetachCurrentContext should
//be used instead.
func (w *Window) MakeContextCurrent() {
	C.glfwMakeContextCurrent(w.data)
}
Ejemplo n.º 6
0
Archivo: glfw.go Proyecto: maun/glfw
// OpenGL support
func MakeContextCurrent(window Window) {
	C.glfwMakeContextCurrent(C.GLFWwindow(window))
}