Example #1
0
//GetVideoMode returns the current video mode of the monitor. If you
//are using a full screen window, the return value will therefore depend on
//whether it is focused.
func (m *Monitor) GetVideoMode() (*VideoMode, error) {
	t := C.glfwGetVideoMode(m.data)

	if t == nil {
		return nil, errors.New("Can't get the video mode.")
	}
	return &VideoMode{int(t.width), int(t.height), int(t.redBits), int(t.greenBits), int(t.blueBits), int(t.refreshRate)}, nil
}
Example #2
0
// GetVideoMode returns the current video mode of the monitor. If you
// are using a full screen window, the return value will therefore depend on
// whether it is focused.
func (m *Monitor) GetVideoMode() *VidMode {
	t := C.glfwGetVideoMode(m.data)
	if t == nil {
		return nil
	}
	panicError()
	return &VidMode{int(t.width), int(t.height), int(t.redBits), int(t.greenBits), int(t.blueBits), int(t.refreshRate)}
}