These are the release notes for version 3.3. For a more detailed view including all fixed bugs see the version history.
Please review the caveats, deprecations and removals if your project was written against an earlier version of GLFW 3.
GLFW can now remap game controllers to a standard Xbox-like layout using a built-in copy of SDL_GameControllerDB. Call glfwJoystickIsGamepad to check if a joystick has a mapping, glfwGetGamepadState to retrieve its input state, glfwUpdateGamepadMappings to add newer mappings and glfwGetGamepadName and glfwGetJoystickGUID for mapping related information.
For more information see Gamepad input.
For more information see Vulkan guide.
Changes of the content scale of a window can be received with the window content scale callback, set with glfwSetWindowContentScaleCallback.
The GLFW_SCALE_TO_MONITOR window hint enables automatic resizing of a window by the content scale of the monitor it is placed, on platforms like Windows where this is necessary. This takes effect both on creation and when the window is moved between monitors. It is related to but different from GLFW_COCOA_RETINA_FRAMEBUFFER.
For more information see Window content scale.
For more information see Window attributes.
GLFW now supports raw (unscaled and unaccelerated) mouse motion in disabled cursor mode with the GLFW_RAW_MOUSE_MOTION input mode. Raw mouse motion input is not yet implemented on macOS. Call glfwRawMouseMotionSupported to check if GLFW can provide raw mouse motion on the current system.
For more information see Raw mouse motion.
GLFW can now return the state of hats (i.e. POVs or D-pads) of a joystick with glfwGetJoystickHats. For compatibility, hats are also exposed as buttons. This can be disabled with the GLFW_JOYSTICK_HAT_BUTTONS initialization hint.
For more information see Joystick hat states.
GLFW now supports querying the last error code for the calling thread and its human-readable description with glfwGetError. This can be used instead of or together with the error callback.
For more information see Error handling.
GLFW now supports setting library initialization hints with glfwInitHint. These must be set before initialization to take effect. Some of these hints are platform specific but are safe to set on any platform.
For more information see Initialization hints.
GLFW now supports requesting user attention with glfwRequestWindowAttention. Where possible this calls attention to the specified window. On platforms like macOS it calls attention to the whole application.
For more information see Window attention request.
GLFW now supports notifying the application that the window has been maximized glfwSetWindowMaximizeCallback. This is called both when the window was maximized by the user and when it was done with glfwMaximizeWindow.
For more information see Window maximization.
GLFW now supports querying the work area of a monitor, i.e. the area not occupied by task bars or global menu bars, with glfwGetMonitorWorkarea. On platforms that lack this concept, the whole area of the monitor is returned.
For more information see Work area.
GLFW now supports the creation of windows with transparent framebuffers on systems with desktop compositing enabled with the GLFW_TRANSPARENT_FRAMEBUFFER window hint and attribute. This hint must be set before window creation and leaves any window decorations opaque.
GLFW now also supports whole window transparency with glfwGetWindowOpacity and glfwSetWindowOpacity. This value controls the opacity of the whole window including decorations and unlike framebuffer transparency can be changed at any time after window creation.
For more information see Window transparency.
GLFW now supports querying the platform dependent scancode of any physical key with glfwGetKeyScancode.
For more information see Key input.
GLFW now supports controlling whether the cursor is centered over newly created full screen windows with the GLFW_CENTER_CURSOR window hint. It is enabled by default.
GLFW now has the GLFW_FOCUS_ON_SHOW window hint and attribute for controlling whether a window gets input focus when shown. It is enabled by default. It applies both when creating an visible window with glfwCreateWindow and when showing it with glfwShowWindow.
This is a workaround for GLFW 3.0 lacking glfwFocusWindow and will be corrected in the next major version.
For more information see Window visibility.
GLFW now supports setting and querying user pointers for connected monitors and joysticks with glfwSetMonitorUserPointer, glfwGetMonitorUserPointer, glfwSetJoystickUserPointer and glfwGetJoystickUserPointer.
GLFW will now load a
MainMenu.nib file if found in the
Contents/Resources directory of the application bundle, as a way to replace the GLFW menu bar without recompiling GLFW. This behavior can be disabled with the GLFW_COCOA_MENUBAR initialization hint.
The context hint GLFW_SRGB_CAPABLE now supports OpenGL ES via
WGL_EXT_colorspace, the context hint GLFW_CONTEXT_NO_ERROR now supports
GLX_ARB_create_context_no_error, the context hint GLFW_CONTEXT_RELEASE_BEHAVIOR now supports
EGL_KHR_context_flush_control and glfwGetProcAddress now supports
GLFW now supports creating off-screen OpenGL contexts using OSMesa by setting GLFW_CONTEXT_CREATION_API to
GLFW_OSMESA_CONTEXT_API. Native access function have been added to retrieve the OSMesa color and depth buffers.
There is also a new null backend that uses OSMesa as its native context creation API, intended for automated testing. This backend does not provide input.
The way joystick elements are arranged have changed to match SDL2 in order to support SDL_GameControllerDB mappings. The layout of joysticks may change again if required for compatibility with SDL2. If you need a known and stable layout for game controllers, see if you can switch to Gamepad input.
Existing code that depends on a specific joystick layout will likely have to be updated.
The glfwWaitEvents and glfwWaitEventsTimeout functions no longer need a window to be created to wait for events. Before version 3.3 these functions would return immediately if there were no user-created windows. On platforms where only windows can receive events, an internal helper window is used.
Existing code that depends on the earlier behavior will likely have to be updated.
The documentation for versions before 3.3 stated that a gamma ramp size of 256 would always be accepted. This was never the case on X11 and could lead to artifacts on macOS. The glfwSetGamma function has been updated to always generate a ramp of the correct size.
Existing code that hardcodes a size of 256 should be updated to use the size of the current ramp of a monitor when setting a new ramp for that monitor.
GLFW no longer applies any deadzone to the input state received from the XInput API. This was never done for any other platform joystick API so this change makes the behavior more consistent but you will need to apply your own deadzone if desired.
GLFW now supports reading clipboard text via the
INCR method, which removes the limit on how much text can be read with glfwGetClipboardString. However, writing via this method is not yet supported, so you may not be able to write a very large string with glfwSetClipboardString even if you read it from the clipboard earlier.
The exact size limit for writing to the clipboard is negotiated with each receiving application but is at least several tens of kilobytes. Note that only the read limit has changed. Any string that could be written before still can be.
GLFW now loads all X11 extension libraries at initialization. The only X11 library you need to link against is
libX11. The header files for the extension libraries are still required for compilation.
Existing projects and makefiles that link GLFW directly against the extension libraries should still build correctly but will add these libraries as load-time dependencies.
The minimum CMake version has been raised from 2.8.12 to 3.0. This is only a requirement of the GLFW CMake files. The GLFW source files do not depend on CMake.
GLFW no longer supports framebuffer transparency enabled via GLFW_TRANSPARENT_FRAMEBUFFER on Windows 7 if DWM transparency is off (the Transparency setting under Personalization > Window Color).
The character with modifiers callback set with glfwSetCharModsCallback has been deprecated and should if possible not be used.
Existing code should still work but further bug fixes will likely not be made. The callback will be removed in the next major version.
The window parameter of the clipboard functions glfwGetClipboardString and glfwSetClipboardString has been deprecated and is no longer used on any platform. On platforms where the clipboard must be owned by a specific window, an internal helper window is used.
Existing code should still work unless it depends on a specific window owning the clipboard. New code may pass
NULL as the window argument. The parameter will be removed in a future release.
GLFW_USE_MENUBAR CMake options and the
_GLFW_USE_MENUBAR compile-time macros have been removed.
Existing projects and makefiles that set these options or define these macros during compilation of GLFW will still build but it will have no effect and the default behaviors will be used.
The GLFW test programs that previously depended on the LunarG Vulkan SDK now instead uses a Vulkan loader generated by glad2. This means the GLFW CMake files no longer look for the Vulkan SDK.
Existing CMake projects that depended on the Vulkan SDK cache variables from GLFW will need to call
find_package(Vulkan) themselves. CMake 3.7 and later already comes with a Vulkan find module similar to the one GLFW previously included.
LIB_SUFFIX CMake option has been removed. GLFW now uses the GNUInstallDirs CMake package to handle platform specific details like the library directory suffix and the
LIB_SUFFIX CMake option has been removed.
Existing projects and makefiles that set the
LIB_SUFFIX option will use the suffix chosen by the GNUInstallDirs package and the option will be ignored.
The experimental Mir support has been completely removed as the Mir project has implemented support for the Wayland protocol and is recommending that applications use that instead.
Existing projects and makefiles that select Mir when compiling GLFW will fail. Use Wayland or X11 instead.
These are the release notes for version 3.2. For a more detailed view including all fixed bugs see the version history.
GLFW now supports basic integration with Vulkan with glfwVulkanSupported, glfwGetRequiredInstanceExtensions, glfwGetInstanceProcAddress, glfwGetPhysicalDevicePresentationSupport and glfwCreateWindowSurface. Vulkan header inclusion can be selected with GLFW_INCLUDE_VULKAN.
GLFW now supports switching between windowed and full screen modes and updating the monitor and desired resolution and refresh rate of full screen windows with glfwSetWindowMonitor.
GLFW now supports giving windows input focus with glfwFocusWindow.
GLFW now supports querying the localized name of printable keys with glfwGetKeyName, either by key token or by scancode.
GLFW now supports waiting for events for a set amount of time with glfwWaitEventsTimeout.
GLFW now supports setting the icon of windows with glfwSetWindowIcon.
GLFW now supports notifying when a joystick has been connected or disconnected with glfwSetJoystickCallback.
GLFW now supports creating windows without a OpenGL or OpenGL ES context by setting the GLFW_CLIENT_API hint to
GLFW now supports selecting and querying the context creation API at run-time with the GLFW_CONTEXT_CREATION_API hint and attribute.
GLFW now supports creating and querying OpenGL and OpenGL ES contexts that do not emit errors with the GLFW_CONTEXT_NO_ERROR hint, provided the machine supports the
GLFW now supports being used as a config-file package from other projects for easy linking with the library and its dependencies.
These are the release notes for version 3.1. For a more detailed view including all fixed bugs see the version history.
GLFW now supports creating and setting both custom cursor images and standard cursor shapes. They are created with glfwCreateCursor or glfwCreateStandardCursor, set with glfwSetCursor and destroyed with glfwDestroyCursor.
GLFW now provides a callback for receiving the paths of files and directories dropped onto GLFW windows. The callback is set with glfwSetDropCallback.
GLFW now supports querying the size, on each side, of the frame around the content area of a window, with glfwGetWindowFrameSize.
GLFW now supports disabling auto-iconification of full screen windows with the GLFW_AUTO_ICONIFY window hint. This is intended for people building multi-monitor installations, where you need windows to stay in full screen despite losing input focus.
GLFW now supports floating windows, also called topmost or always on top, for easier debugging with the GLFW_FLOATING window hint and attribute.
GLFW now supports preventing a windowed mode window from gaining input focus on creation, with the GLFW_FOCUSED window hint.
GLFW now queries the window input focus, visibility and iconification attributes and the cursor position directly instead of returning cached data.
GLFW now provides a callback for character events with modifier key bits. The callback is set with glfwSetCharModsCallback. Unlike the regular character callback, this will report character events that will not result in a character being input, for example if the Control key is held down.
GLFW now supports the creation of single buffered windows, with the GLFW_DOUBLEBUFFER hint.
GLFW now includes the extension header appropriate for the chosen OpenGL or OpenGL ES header when GLFW_INCLUDE_GLEXT is defined. GLFW does not provide these headers. They must be provided by your development environment or your OpenGL or OpenGL ES SDK.
GLFW now supports controlling and querying whether the pipeline is flushed when a context is made non-current, with the GLFW_CONTEXT_RELEASE_BEHAVIOR hint and attribute, provided the machine supports the
GLFW now has an experimental Wayland display protocol backend that can be selected on Linux with a CMake option.
GLFW now has an experimental Mir display server backend that can be selected on Linux with a CMake option.
These are the release notes for version 3.0. For a more detailed view including all fixed bugs see the version history.
GLFW now uses the CMake build system instead of the various makefiles and project files used by earlier versions. CMake is available for all platforms supported by GLFW, is present in most package systems and can generate makefiles and/or project files for most popular development environments.
For more information on how to use CMake, see the CMake manual.
GLFW now supports the creation of multiple windows, each with their own OpenGL or OpenGL ES context, and all window functions now take a window handle. Event callbacks are now per-window and are provided with the handle of the window that received the event. The glfwMakeContextCurrent function has been added to select which context is current on a given thread.
GLFW now explicitly supports multiple monitors. They can be enumerated with glfwGetMonitors, queried with glfwGetVideoModes, glfwGetMonitorPos, glfwGetMonitorName and glfwGetMonitorPhysicalSize, and specified at window creation to make the newly created window full screen on that specific monitor.
All string arguments to GLFW functions and all strings returned by GLFW now use the UTF-8 encoding. This includes the window title, error string, clipboard text, monitor and joystick names as well as the extension function arguments (as ASCII is a subset of UTF-8).
GLFW now supports setting and reading back the gamma ramp of monitors, with the glfwGetGammaRamp and glfwSetGammaRamp functions. There is also glfwSetGamma, which generates a ramp from a gamma value and then sets it.
GLFW now supports the creation of OpenGL ES contexts, by setting the GLFW_CLIENT_API hint to
GLFW_OPENGL_ES_API, where creation of such contexts are supported. Note that GLFW does not implement OpenGL ES, so your driver must provide support in a way usable by GLFW. Modern Nvidia and Intel drivers support creation of OpenGL ES context using the GLX and WGL APIs, while AMD provides an EGL implementation instead.
GLFW now has an experimental EGL context creation back end that can be selected through CMake options.
GLFW now supports high-DPI monitors on both Windows and macOS, giving windows full resolution framebuffers where other UI elements are scaled up. To achieve this, glfwGetFramebufferSize and glfwSetFramebufferSizeCallback have been added. These work with pixels, while the rest of the GLFW API works with screen coordinates. This is important as OpenGL uses pixels, not screen coordinates.
GLFW now has an error callback, which can provide your application with much more detailed diagnostics than was previously possible. The callback is passed an error code and a description string.
Each window now has a callback for iconification and restoration events, which is set with glfwSetWindowIconifyCallback.
Each window now has a callback for position events, which is set with glfwSetWindowPosCallback.
The position of a window can now be retrieved using glfwGetWindowPos.
Each windows now has a callback for focus events, which is set with glfwSetWindowFocusCallback.
Each window now has a callback for when the mouse cursor enters or leaves its content area, which is set with glfwSetCursorEnterCallback.
The title of a window is now specified at creation time, as one of the arguments to glfwCreateWindow.
Windows can now be hidden with glfwHideWindow, shown using glfwShowWindow and created initially hidden with the GLFW_VISIBLE window hint and attribute. This allows for off-screen rendering in a way compatible with most drivers, as well as moving a window to a specific position before showing it.
Windowed mode windows can now be created without decorations, e.g. things like a frame, a title bar, with the GLFW_DECORATED window hint and attribute. This allows for the creation of things like splash screens.
A scancode parameter has been added to the key callback. Keys that don't have a key token still get passed on with the key parameter set to
GLFW_KEY_UNKNOWN. These scancodes will vary between machines and are intended to be used for key bindings.
The name of a joystick can now be retrieved using glfwGetJoystickName.
You are reading it.
Last update on Fri Aug 13 2021 for GLFW 3.3.5