glfwGetVideoMode function

Pointer<GLFWvidmode> glfwGetVideoMode(
  1. Pointer<GLFWmonitor> monitor
)

! @brief Returns the current mode of the specified monitor.

This function returns the current video mode of the specified monitor. If you have created a full screen window for that monitor, the return value will depend on whether that window is iconified.

@paramin monitor The monitor to query. @return The current mode of the monitor, or NULL if an error(@ref error_handling) occurred.

@errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_PLATFORM_ERROR.

@pointer_lifetime The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected or the library is terminated.

@thread_safety This function must only be called from the main thread.

@sa @ref monitor_modes @sa @ref glfwGetVideoModes

@since Added in version 3.0. Replaces glfwGetDesktopMode.

@ingroup monitor

GLFWAPI const GLFWvidmode* glfwGetVideoMode(GLFWmonitor* monitor)

Implementation

Pointer<GLFWvidmode> glfwGetVideoMode(Pointer<GLFWmonitor> monitor) {
  final glfwGetVideoModeLookupFunction = libglfw.lookupFunction<
      Pointer<GLFWvidmode> Function(Pointer<GLFWmonitor> monitor),
      Pointer<GLFWvidmode> Function(
          Pointer<GLFWmonitor> monitor)>('glfwGetVideoMode');
  return glfwGetVideoModeLookupFunction(monitor);
}