示例#1
0
文件: window.go 项目: juturnas/glfw3
//SetShouldClose sets the value of the close flag of the window. This can be
//used to override the user's attempt to close the window, or to signal that it
//should be closed.
func (w *Window) SetShouldClose(value bool) {
	if !value {
		C.glfwSetWindowShouldClose(w.data, C.GL_FALSE)
	} else {
		C.glfwSetWindowShouldClose(w.data, C.GL_TRUE)
	}
}
示例#2
0
func (w *Window) SetShouldClose(b bool) {
	v := C.GL_FALSE
	if b {
		v = C.GL_TRUE
	}
	C.glfwSetWindowShouldClose(w.w, C.int(v))
}
示例#3
0
文件: window.go 项目: amsibamsi/three
// SetClose requests the window to close.
func (w *Window) SetClose() {
	C.glfwSetWindowShouldClose(w.glfwWin, C.GL_TRUE)
}