Beispiel #1
0
//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)
	}
}
Beispiel #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))
}
Beispiel #3
0
// SetClose requests the window to close.
func (w *Window) SetClose() {
	C.glfwSetWindowShouldClose(w.glfwWin, C.GL_TRUE)
}