Show / Hide Table of Contents

Enum WindowHintBool

Context related boolean attributes.

Namespace: OpenTK.Windowing.GraphicsLibraryFramework
Assembly: OpenTK.Windowing.GraphicsLibraryFramework.dll
Syntax
public enum WindowHintBool

Fields

Name Description
AutoIconify

Specifies whether the full screen window will automatically iconify and restore the previous video mode on input focus loss. Possible values are true and false. This hint is ignored for windowed mode windows.

CenterCursor

Specifies whether the cursor should be centered over newly created full screen windows. Possible values are true and false. This hint is ignored for windowed mode windows.

CocoaGraphicsSwitching

Specifies whether to in Automatic Graphics Switching, i.e. to allow the system to choose the integrated GPU for the OpenGL context and move it between GPUs if necessary or whether to force it to always run on the discrete GPU. This only affects systems with both integrated and discrete GPUs. Possible values are GLFW_TRUE and GLFW_FALSE. This is ignored on other platforms.

Simpler programs and tools may want to enable this to save power, while games and other applications performing advanced rendering will want to leave it disabled.

A bundled application that wishes to participate in Automatic Graphics Switching should also declare this in its Info.plist by setting the NSSupportsAutomaticGraphicsSwitching key to true.

CocoaRetinaFramebuffer

Specifies whether to use full resolution framebuffers on Retina displays. Possible values are GLFW_TRUE and GLFW_FALSE. This is ignored on other platforms.

ContextNoError

Specifies whether errors should be generated by the context. If enabled, situations that would have generated errors instead cause undefined behavior.

Decorated

Indicates whether the specified window has decorations such as a border,a close widget, etc. This is set on creation with the window hint with the same name.

DoubleBuffer

Specifies whether the framebuffer should be double buffered. You nearly always want to use double buffering. This is a hard constraint.

Floating

Indicates whether the specified window is floating, also called topmost or always-on-top. This is controlled by the window hint with the same name.

Focused

Indicates whether the specified window has input focus. Initial input focus is controlled by the window hint with the same name

FocusOnShow

Specifies whether the window will be given input focus when ShowWindow(Window*) is called. Possible values are true and false.

Hovered

Indicates whether the cursor is currently directly over the client area of the window, with no other windows between. See Cursor enter/leave events for details.

Iconified

Indicates whether the specified window is iconified, whether by the user or with IconifyWindow(Window*).

Maximized

Indicates whether the specified window is maximized, whether by the user or with MaximizeWindow(Window*).

MousePassthrough

Specifies whether the window is transparent to mouse input, letting any mouse events pass through to whatever window is behind it. Possible values are true and false.

OpenGLDebugContext

Specifies whether the window's context is an OpenGL debug context. Possible values are true and false.

OpenGLForwardCompat

Specifies whether the window's context is an OpenGL forward-compatible one. Possible values are true and false.

Resizable

Indicates whether the specified window is resizable by the user. This is set on creation with the window hint with the same name.

ScaleFramebuffer

Specifies whether the framebuffer should be resized based on content scale changes. This can be because of a global user settings change or because the window was moved to a monitor with different scale settings.

This hint only has an effect on platforms where screen coordinates can be scaled relative to pixel coordinates, such as macOS and Wayland. On platforms like Windows and X11 the framebuffer and window content area sizes always map 1:1.

This is the new name, introduced in GLFW 3.4. The older CocoaRetinaFramebuffer name is also available for compatibility. Both names modify the same hint value.

ScaleToMonitor

Specifies whether the window content area should be resized based on content scale changes. This can be because of a global user settings change or because the window was moved to a monitor with different scale settings.

This hint only has an effect on platforms where screen coordinates and pixels always map 1:1, such as Windows and X11. On platforms like macOS the resolution of the framebuffer can change independently of the window size.

SrgbCapable

Specifies whether the framebuffer should be sRGB capable. If supported, a created OpenGL context will support the GL_FRAMEBUFFER_SRGB enable( also called GL_FRAMEBUFFER_SRGB_EXT) for controlling sRGB rendering and a created OpenGL ES context will always have sRGB rendering enabled.

Stereo

Specifies whether to use stereoscopic rendering. This is a hard constraint.

TransparentFramebuffer

Specifies whether the window framebuffer will be transparent. If enabled and supported by the system, the window framebuffer alpha channel will be used to combine the framebuffer with the background. This does not affect window decorations. Possible values are true and false.

Visible

Indicates whether the specified window is visible. Window visibility can be controlled with ShowWindow(Window*) and HideWindow(Window*) and initial visibility is controlled by the window hint with the same name.

Win32KeyboardMenu

Specifies whether to allow access to the window menu via the Alt+Space and Alt-and-then-Space keyboard shortcuts. This is ignored on other platforms.

Win32ShowDefault

Specifies whether to show the window the way specified in the program's STARTUPINFO when it is shown for the first time. This is the same information as the Run option in the shortcut properties window. If this information was not specified when the program was started, GLFW behaves as if this hint was set to GLFW_FALSE. Possible values are GLFW_TRUE and GLFW_FALSE. This is ignored on other platforms.

See Also
WindowHint(WindowHintBool, bool)
In This Article
Back to top Generated by DocFX