예제 #1
0
파일: glfw.go 프로젝트: gordonklaus/glfw
func MakeContextCurrent(w *Window) {
	if w == nil {
		C.glfwMakeContextCurrent(nil)
	} else {
		C.glfwMakeContextCurrent(w.w)
	}
}
예제 #2
0
파일: context.go 프로젝트: godispy/glfw
// DetachCurrentContext detaches the current context.
func DetachCurrentContext() {
	C.glfwMakeContextCurrent(nil)
	panicError()
}
예제 #3
0
파일: context.go 프로젝트: godispy/glfw
// 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()
}
예제 #4
0
파일: context.go 프로젝트: godispy/glfw
//DetachCurrentContext detaches the current context.
func DetachCurrentContext() {
	C.glfwMakeContextCurrent(nil)
}
예제 #5
0
파일: context.go 프로젝트: godispy/glfw
//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)
}
예제 #6
0
파일: glfw.go 프로젝트: maun/glfw
// OpenGL support
func MakeContextCurrent(window Window) {
	C.glfwMakeContextCurrent(C.GLFWwindow(window))
}