Release notes

Release notes for 3.3

GLFW_FOCUS_ON_SHOW window hint and attribute

GLFW now supports the GLFW_FOCUS_ON_SHOW window hint and attribute for controlling input focus when calling glfwShowWindow

See also
Window visibility

Error query

GLFW now supports querying the last error code for the calling thread and its human-readable description with glfwGetError.

See also
Error handling

SDL_GameControllerDB support and gamepad input

GLFW now supports remapping of gamepads and controllers to a 360-like controller layout with glfwJoystickIsGamepad, glfwGetJoystickGUID, glfwGetGamepadName, glfwGetGamepadState and glfwUpdateGamepadMappings, and the input state struct GLFWgamepadstate.

See also
Gamepad input

User attention request

GLFW now supports requesting user attention to a specific window (on macOS to the application as a whole) with glfwRequestWindowAttention.

See also
Window attention request

Window maximization callback

GLFW now supports notifying the application that the window has been maximized glfwSetWindowMaximizeCallback.

See also
Window maximization

Platform-specific key scancode query

GLFW now supports querying the platform dependent scancode of any physical key with glfwGetKeyScancode.

See also
Key input

Support for updating window attributes

GLFW now supports changing the GLFW_DECORATED, GLFW_RESIZABLE, GLFW_FLOATING and GLFW_AUTO_ICONIFY attributes for existing windows with glfwSetWindowAttrib.

See also
Window attributes

Content scale queries for DPI-aware rendering

GLFW now supports querying the window and monitor content scale, i.e. the ratio between the current DPI and the platform's default DPI, with glfwGetWindowContentScale and glfwGetMonitorContentScale.

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 and X11 where this is necessary.

See also
Window content scale

Support for initialization hints

GLFW now supports setting library initialization hints with glfwInitHint. These must be set before initialization to take effect.

See also
Initialization hints

Support for platform specific hints

GLFW now supports platform specific init and window hints to control system features that are only available on a single platform.

See also
macOS specific init hints
macOS specific window hints

Support for joystick hats

GLFW now supports querying the hats (or POVs or D-pads) of a joystick with glfwGetJoystickHats. Hats are by default also exposed as buttons, but this can be disabled with the GLFW_JOYSTICK_HAT_BUTTONS init hint.

See also
Joystick hat states

Support for transparent windows and framebuffers

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.

Cursor centering window hint

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.

Mouse cursor hover window attribute

GLFW now supports polling whether the cursor is hovering over the window client area with the GLFW_HOVERED window attribute. This attribute corresponds to the cursor enter/leave event.

Support for raw mouse motion

GLFW now uses raw (unscaled and unaccelerated) mouse motion in disabled cursor mode on platforms where this is available, specifically Windows and X11.

Support for Vulkan on macOS via MoltenVK

GLFW now supports the VK_MVK_macos_surface window surface creation extension provided by MoltenVK in the LunarG Vulkan SDK.

See also
Vulkan guide

OSMesa backend for headless software rendering

GLFW now supports creating offscreen OpenGL contexts using OSMesa by setting GLFW_CONTEXT_CREATION_API to GLFW_OSMESA_CONTEXT_API.

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.

Monitor and joystick user pointers

GLFW now supports setting and querying user pointers for connected monitors and joysticks with glfwSetMonitorUserPointer, glfwGetMonitorUserPointer, glfwSetJoystickUserPointer and glfwGetJoystickUserPointer.

X11 primary selection access

GLFW now supports querying and setting the X11 primary selection via the native access functions glfwGetX11SelectionString and glfwSetX11SelectionString.

Experimental Mir support has been removed

As per the release of Mir 1.0, the recommended API is now Wayland, the experimental Mir display server backend introduced in GLFW 3.1 has thus been removed. To use the experimental Wayland backend, pass -DGLFW_USE_WAYLAND=ON to cmake where you previously passed the now-removed -DGLFW_USE_MIR=ON.

Release notes for 3.2

Support for Vulkan

GLFW now supports basic integration with Vulkan with glfwVulkanSupported, glfwGetRequiredInstanceExtensions, glfwGetInstanceProcAddress, glfwGetPhysicalDevicePresentationSupport and glfwCreateWindowSurface. Vulkan header inclusion can be selected with GLFW_INCLUDE_VULKAN.

Window mode switching

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.

Window maxmimization support

GLFW now supports window maximization with glfwMaximizeWindow and the GLFW_MAXIMIZED window hint and attribute.

Window input focus control

GLFW now supports giving windows input focus with glfwFocusWindow.

Window size limit support

GLFW now supports setting both absolute and relative window size limits with glfwSetWindowSizeLimits and glfwSetWindowAspectRatio.

Localized key names

GLFW now supports querying the localized name of printable keys with glfwGetKeyName, either by key token or by scancode.

Wait for events with timeout

GLFW now supports waiting for events for a set amount of time with glfwWaitEventsTimeout.

Window icon support

GLFW now supports setting the icon of windows with glfwSetWindowIcon.

Raw timer access

GLFW now supports raw timer values with glfwGetTimerValue and glfwGetTimerFrequency.

Joystick connection callback

GLFW now supports notifying when a joystick has been connected or disconnected with glfwSetJoystickCallback.

Context-less windows

GLFW now supports creating windows without a OpenGL or OpenGL ES context by setting the GLFW_CLIENT_API hint to GLFW_NO_API.

Run-time context creation API selection

GLFW now supports selecting and querying the context creation API at run-time with the GLFW_CONTEXT_CREATION_API hint and attribute.

Error-free context creation

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 GL_KHR_no_error extension.

CMake config-file package support

GLFW now supports being used as a config-file package from other projects for easy linking with the library and its dependencies.

Release notes for 3.1

These are the release highlights. For a full list of changes see the version history.

Custom mouse cursor images

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.

See also
Cursor objects

Path drop event

GLFW now provides a callback for receiving the paths of files and directories dropped onto GLFW windows. The callback is set with glfwSetDropCallback.

See also
Path drop input

Main thread wake-up

GLFW now provides the glfwPostEmptyEvent function for posting an empty event from another thread to the main thread event queue, causing glfwWaitEvents to return.

See also
Event processing

Window frame size query

GLFW now supports querying the size, on each side, of the frame around the client area of a window, with glfwGetWindowFrameSize.

See also
Window size

Simultaneous multi-monitor rendering

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.

Floating windows

GLFW now supports floating windows, also called topmost or always on top, for easier debugging with the GLFW_FLOATING window hint and attribute.

Initially unfocused windows

GLFW now supports preventing a windowed mode window from gaining input focus on creation, with the GLFW_FOCUSED window hint.

Direct access for window attributes and cursor position

GLFW now queries the window input focus, visibility and iconification attributes and the cursor position directly instead of returning cached data.

Character with modifiers callback

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.

See also
Text input

Single buffered framebuffers

GLFW now supports the creation of single buffered windows, with the GLFW_DOUBLEBUFFER hint.

Macro for including extension header

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.

Context release behaviors

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 GL_KHR_context_flush_control extension.

(Experimental) Wayland support

GLFW now has an experimental Wayland display protocol backend that can be selected on Linux with a CMake option.

(Experimental) Mir support

GLFW now has an experimental Mir display server backend that can be selected on Linux with a CMake option.

Release notes for 3.0

These are the release highlights. For a full list of changes see the version history.

CMake build system

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.

Multi-window support

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.

Multi-monitor support

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.

Unicode support

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).

Clipboard text I/O

GLFW now supports reading and writing plain text to and from the system clipboard, with the glfwGetClipboardString and glfwSetClipboardString functions.

Gamma ramp support

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.

OpenGL ES support

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.

(Experimental) EGL support

GLFW now has an experimental EGL context creation back end that can be selected through CMake options.

High-DPI support

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.

Error callback

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.

Per-window user pointer

Each window now has a user-defined pointer, retrieved with glfwGetWindowUserPointer and set with glfwSetWindowUserPointer, to make it easier to integrate GLFW into C++ code.

Window iconification callback

Each window now has a callback for iconification and restoration events, which is set with glfwSetWindowIconifyCallback.

Window position callback

Each window now has a callback for position events, which is set with glfwSetWindowPosCallback.

Window position query

The position of a window can now be retrieved using glfwGetWindowPos.

Window focus callback

Each windows now has a callback for focus events, which is set with glfwSetWindowFocusCallback.

Cursor enter/leave callback

Each window now has a callback for when the mouse cursor enters or leaves its client area, which is set with glfwSetCursorEnterCallback.

Initial window title

The title of a window is now specified at creation time, as one of the arguments to glfwCreateWindow.

Hidden windows

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.

Undecorated windows

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.

Modifier key bit masks

Modifier key bit mask parameters have been added to the mouse button and key callbacks.

Platform-specific scancodes

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.

Joystick names

The name of a joystick can now be retrieved using glfwGetJoystickName.

Doxygen documentation

You are reading it.



librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:31