glfwGetWindowAttrib

Returns an attribute of the specified window.

This function returns the value of an attribute of the specified window or its OpenGL or OpenGL ES context.

extern (C) @nogc nothrow __gshared
int
glfwGetWindowAttrib

Parameters

window GLFWwindow*

The window to query.

attrib int

The window attribute whose value to return.

Return Value

Type: int

The value of the attribute, or zero if an error occurred.

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

@remark Framebuffer related hints are not window attributes. See @ref window_attribs_fb for more information.

@remark Zero is a valid value for many window and context related attributes so you cannot use a return value of zero as an indication of errors. However, this function should not fail as long as it is passed valid arguments and the library has been initialized.

Thread Safety

This function must only be called from the main thread.

@sa @ref window_attribs @sa @ref glfwSetWindowAttrib

Meta

Since

Added in version 3.0. Replaces glfwGetWindowParam and glfwGetGLVersion.

Ingroup: window