glfwGetWindowSize

Retrieves the size of the content area of the specified window.

This function retrieves the size, in screen coordinates, of the content area of the specified window. If you wish to retrieve the size of the framebuffer of the window in pixels, see @ref glfwGetFramebufferSize.

Any or all of the size arguments may be null. If an error occurs, all non-null size arguments will be set to zero.

extern (C) @nogc nothrow __gshared
void
glfwGetWindowSize

Parameters

window GLFWwindow*

The window whose size to retrieve.

width int*

Where to store the width, in screen coordinates, of the content area, or null.

height int*

Where to store the height, in screen coordinates, of the content area, or null.

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

Thread Safety

This function must only be called from the main thread.

@sa @ref window_size @sa @ref glfwSetWindowSize

Meta

Since

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

Ingroup: window