glfwSetWindowSize function

void glfwSetWindowSize(
  1. Pointer<GLFWwindow> window,
  2. int width,
  3. int height
)

! @brief Sets the size of the content area of the specified window.

This function sets the size, in screen coordinates, of the content area of the specified window.

For full screen windows, this function updates the resolution of its desired video mode and switches to the video mode closest to it, without affecting the window's context. As the context is unaffected, the bit depths of the framebuffer remain unchanged.

If you wish to update the refresh rate of the desired video mode in addition to its resolution, see @ref glfwSetWindowMonitor.

The window manager may put limits on what sizes are allowed. GLFW cannot and should not override these limits.

@paramin window The window to resize. @paramin width The desired width, in screen coordinates, of the window content area. @paramin height The desired height, in screen coordinates, of the window content area.

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

@remark @wayland A full screen window will not attempt to change the mode, no matter what the requested size.

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

@sa @ref window_size @sa @ref glfwGetWindowSize @sa @ref glfwSetWindowMonitor

@since Added in version 1.0. @glfw3 Added window handle parameter.

@ingroup window

GLFWAPI void glfwSetWindowSize(GLFWwindow* window, int width, int height)

Implementation

void glfwSetWindowSize(Pointer<GLFWwindow> window, int width, int height) {
  final glfwSetWindowSizeLookupFunction = libglfw.lookupFunction<
      Void Function(Pointer<GLFWwindow> window, Int32 width, Int32 height),
      void Function(Pointer<GLFWwindow> window, int width,
          int height)>('glfwSetWindowSize');
  return glfwSetWindowSizeLookupFunction(window, width, height);
}