示例#1
0
//SetErrorCallback sets the error callback, which is called with an error code
//and a human-readable description each time a GLFW error occurs.
//
//This function may be called before Init.
func SetErrorCallback(cbfun func(code ErrorCode, desc string)) {
	if cbfun == nil {
		C.glfwSetErrorCallback(nil)
	} else {
		fErrorHolder = cbfun
		C.glfwSetErrorCallbackCB()
	}
}
示例#2
0
文件: error.go 项目: godispy/glfw
// Set the glfw callback internally
func init() {
	C.glfwSetErrorCallbackCB()
}