示例#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))
}