//GetCurrentContext returns the window whose context is current. func GetCurrentContext() (*Window, error) { w := C.glfwGetCurrentContext() if w == nil { return nil, errors.New("Current context is not set.") } return windows.get(w), nil }
// GetCurrentContext returns the window whose context is current. func GetCurrentContext() *Window { w := C.glfwGetCurrentContext() panicError() if w == nil { return nil } return windows.get(w) }
func GetCurrentContext() *Window { windows.Lock() defer windows.Unlock() return windows.m[C.glfwGetCurrentContext()] }
func CurrentContext() Window { return Window(C.glfwGetCurrentContext()) }