3 [![Build status](https://travis-ci.org/glfw/glfw.svg?branch=master)](https://travis-ci.org/glfw/glfw)
4 [![Build status](https://ci.appveyor.com/api/projects/status/0kf0ct9831i5l6sp/branch/master?svg=true)](https://ci.appveyor.com/project/elmindreda/glfw)
5 [![Coverity Scan](https://scan.coverity.com/projects/4884/badge.svg)](https://scan.coverity.com/projects/glfw-glfw)
9 GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan
10 application development. It provides a simple, platform-independent API for
11 creating windows, contexts and surfaces, reading input, handling events, etc.
13 GLFW natively supports Windows, macOS and Linux and other Unix-like systems. On
14 Linux both X11 and Wayland are supported.
16 GLFW is licensed under the [zlib/libpng
17 license](http://www.glfw.org/license.html).
19 You can [download](http://www.glfw.org/download.html) the latest stable release
20 as source or Windows binaries, or fetch the `latest` branch from GitHub. Each
21 release starting with 3.0 also has a corresponding [annotated
22 tag](https://github.com/glfw/glfw/releases) with source and binary archives.
24 The [documentation](http://www.glfw.org/docs/latest/) is available online and is
25 included in all source and binary archives. See the [release
26 notes](https://www.glfw.org/docs/latest/news.html) for new features, caveats and
27 deprecations in the latest release. For more details see the [version
28 history](http://www.glfw.org/changelog.html).
30 The `master` branch is the stable integration branch and _should_ always compile
31 and run on all supported platforms, although details of newly added features may
32 change until they have been included in a release. New features and many bug
33 fixes live in [other branches](https://github.com/glfw/glfw/branches/all) until
34 they are stable enough to merge.
36 If you are new to GLFW, you may find the
37 [tutorial](http://www.glfw.org/docs/latest/quick.html) for GLFW 3 useful. If
38 you have used GLFW 2 in the past, there is a [transition
39 guide](http://www.glfw.org/docs/latest/moving.html) for moving to the GLFW
45 GLFW itself requires only the headers and libraries for your OS and window
46 system. It does not need the headers for any context creation API (WGL, GLX,
47 EGL, NSGL, OSMesa) or rendering API (OpenGL, OpenGL ES, Vulkan) to enable
50 GLFW supports compilation on Windows with Visual C++ 2010 and later, MinGW and
51 MinGW-w64, on macOS with Clang and on Linux and other Unix-like systems with GCC
52 and Clang. It will likely compile in other environments as well, but this is
55 There are [pre-compiled Windows binaries](http://www.glfw.org/download.html)
56 available for all supported compilers.
58 See the [compilation guide](http://www.glfw.org/docs/latest/compile.html) for
59 more information about how to compile GLFW yourself.
64 See the [documentation](http://www.glfw.org/docs/latest/) for tutorials, guides
65 and the API reference.
68 ## Contributing to GLFW
71 guide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for
75 ## System requirements
77 GLFW supports Windows XP and later and macOS 10.8 and later. Linux and other
78 Unix-like systems running the X Window System are supported even without
79 a desktop environment or modern extensions, although some features require
80 a running window or clipboard manager. The OSMesa backend requires Mesa 6.3.
82 See the [compatibility guide](http://www.glfw.org/docs/latest/compat.html)
83 in the documentation for more information.
88 GLFW itself needs only CMake 3.1 or later and the headers and libraries for your
91 The examples and test programs depend on a number of tiny libraries. These are
92 located in the `deps/` directory.
94 - [getopt\_port](https://github.com/kimgr/getopt_port/) for examples
95 with command-line options
96 - [TinyCThread](https://github.com/tinycthread/tinycthread) for threaded
98 - [glad2](https://github.com/Dav1dde/glad) for loading OpenGL and Vulkan
100 - [linmath.h](https://github.com/datenwolf/linmath.h) for linear algebra in
102 - [Nuklear](https://github.com/vurtun/nuklear) for test and example UI
103 - [stb\_image\_write](https://github.com/nothings/stb) for writing images to disk
105 The documentation is generated with [Doxygen](http://doxygen.org/) if CMake can
111 Bugs are reported to our [issue tracker](https://github.com/glfw/glfw/issues).
112 Please check the [contribution
113 guide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for
114 information on what to include when reporting a bug.
119 - Added `GLFW_RESIZE_NWSE_CURSOR`, `GLFW_RESIZE_NESW_CURSOR`,
120 `GLFW_RESIZE_ALL_CURSOR` and `GLFW_NOT_ALLOWED_CURSOR` cursor shapes (#427)
121 - Added `GLFW_RESIZE_EW_CURSOR` alias for `GLFW_HRESIZE_CURSOR` (#427)
122 - Added `GLFW_RESIZE_NS_CURSOR` alias for `GLFW_VRESIZE_CURSOR` (#427)
123 - Added `GLFW_POINTING_HAND_CURSOR` alias for `GLFW_HAND_CURSOR` (#427)
124 - Added `GLFW_MOUSE_PASSTHROUGH` window hint for letting mouse input pass
125 through the window (#1236,#1568)
126 - Added `GLFW_FEATURE_UNAVAILABLE` error for platform limitations (#1692)
127 - Added `GLFW_FEATURE_UNIMPLEMENTED` error for incomplete backends (#1692)
128 - Added `GLFW_ANGLE_PLATFORM_TYPE` init hint and `GLFW_ANGLE_PLATFORM_TYPE_*`
129 values to select ANGLE backend (#1380)
130 - Made joystick subsystem initialize at first use (#1284,#1646)
131 - Updated the minimum required CMake version to 3.1
132 - Disabled tests and examples by default when built as a CMake subdirectory
133 - Bugfix: The CMake config-file package used an absolute path and was not
135 - Bugfix: Video modes with a duplicate screen area were discarded (#1555,#1556)
136 - Bugfix: Compiling with -Wextra-semi caused warnings (#1440)
137 - Bugfix: Built-in mappings failed because some OEMs re-used VID/PID (#1583)
138 - Bugfix: Some extension loader headers did not prevent default OpenGL header
140 - [Win32] Added the `GLFW_WIN32_KEYBOARD_MENU` window hint for enabling access
142 - [Win32] Added a version info resource to the GLFW DLL
143 - [Win32] Disabled framebuffer transparency on Windows 7 when DWM windows are
145 - [Win32] Bugfix: `GLFW_INCLUDE_VULKAN` plus `VK_USE_PLATFORM_WIN32_KHR` caused
146 symbol redefinition (#1524)
147 - [Win32] Bugfix: The cursor position event was emitted before its cursor enter
149 - [Win32] Bugfix: The window hint `GLFW_MAXIMIZED` did not move or resize the
151 - [Win32] Bugfix: Disabled cursor mode interfered with some non-client actions
152 - [Win32] Bugfix: Super key was not released after Win+V hotkey (#1622)
153 - [Win32] Bugfix: `glfwGetKeyName` could access out of bounds and return an
155 - [Win32] Bugfix: Some synthetic key events were reported as `GLFW_KEY_UNKNOWN`
157 - [Win32] Bugfix: Non-BMP Unicode codepoint input was reported as UTF-16
158 - [Win32] Bugfix: Monitor functions could return invalid values after
159 configuration change (#1761)
160 - [Win32] Bugfix: Initialization would segfault on Windows 8 (not 8.1) (#1775)
161 - [Cocoa] Added support for `VK_EXT_metal_surface` (#1619)
162 - [Cocoa] Added locating the Vulkan loader at runtime in an application bundle
163 - [Cocoa] Moved main menu creation to GLFW initialization time (#1649)
164 - [Cocoa] Changed `EGLNativeWindowType` from `NSView` to `CALayer` (#1169)
165 - [Cocoa] Removed dependency on the CoreVideo framework
166 - [Cocoa] Bugfix: `glfwSetWindowSize` used a bottom-left anchor point (#1553)
167 - [Cocoa] Bugfix: Window remained on screen after destruction until event poll
169 - [Cocoa] Bugfix: Event processing before window creation would assert (#1543)
170 - [Cocoa] Bugfix: Undecorated windows could not be iconified on recent macOS
171 - [Cocoa] Bugfix: Touching event queue from secondary thread before main thread
173 - [Cocoa] Bugfix: Non-BMP Unicode codepoint input was reported as UTF-16
175 - [Cocoa] Bugfix: Failing to retrieve the refresh rate of built-in displays
177 - [X11] Bugfix: The CMake files did not check for the XInput headers (#1480)
178 - [X11] Bugfix: Key names were not updated when the keyboard layout changed
180 - [X11] Bugfix: Decorations could not be enabled after window creation (#1566)
181 - [X11] Bugfix: Content scale fallback value could be inconsistent (#1578)
182 - [X11] Bugfix: `glfwMaximizeWindow` had no effect on hidden windows
183 - [X11] Bugfix: Clearing `GLFW_FLOATING` on a hidden window caused invalid read
184 - [X11] Bugfix: Changing `GLFW_FLOATING` on a hidden window could silently fail
185 - [X11] Bugfix: Disabled cursor mode was interrupted by indicator windows
186 - [X11] Bugfix: Monitor physical dimensions could be reported as zero mm
187 - [X11] Bugfix: Window position events were not emitted during resizing (#1613)
188 - [X11] Bugfix: `glfwFocusWindow` could terminate on older WMs or without a WM
189 - [X11] Bugfix: Querying a disconnected monitor could segfault (#1602)
190 - [X11] Bugfix: IME input of CJK was broken for "C" locale (#1587,#1636)
191 - [X11] Bugfix: Termination would segfault if the IM had been destroyed
192 - [X11] Bugfix: Any IM started after initialization would not be detected
193 - [X11] Bugfix: Xlib errors caused by other parts of the application could be
194 reported as GLFW errors
195 - [X11] Bugfix: A handle race condition could cause a `BadWindow` error (#1633)
196 - [X11] Bugfix: XKB path used keysyms instead of physical locations for
197 non-printable keys (#1598)
198 - [X11] Bugfix: Function keys were mapped to `GLFW_KEY_UNKNOWN` for some layout
200 - [X11] Bugfix: Keys pressed simultaneously with others were not always
201 reported (#1112,#1415,#1472,#1616)
202 - [Wayland] Removed support for `wl_shell` (#1443)
203 - [Wayland] Bugfix: The `GLFW_HAND_CURSOR` shape used the wrong image (#1432)
204 - [Wayland] Bugfix: `CLOCK_MONOTONIC` was not correctly enabled
205 - [Wayland] Bugfix: Repeated keys could be reported with `NULL` window (#1704)
206 - [Wayland] Bugfix: Retrieving partial framebuffer size would segfault
207 - [Wayland] Bugfix: Scrolling offsets were inverted compared to other platforms
209 - [POSIX] Bugfix: `CLOCK_MONOTONIC` was not correctly tested for or enabled
210 - [NSGL] Removed enforcement of forward-compatible flag for core contexts
211 - [NSGL] Bugfix: `GLFW_COCOA_RETINA_FRAMEBUFFER` had no effect on newer
212 macOS versions (#1442)
213 - [NSGL] Bugfix: Workaround for swap interval on 10.14 broke on 10.12 (#1483)
214 - [EGL] Added platform selection via the `EGL_EXT_platform_base` extension
216 - [EGL] Added ANGLE backend selection via `EGL_ANGLE_platform_angle` extension
222 On [glfw.org](http://www.glfw.org/) you can find the latest version of GLFW, as
223 well as news, documentation and other information about the project.
225 If you have questions related to the use of GLFW, we have a
226 [forum](https://discourse.glfw.org/), and the `#glfw` IRC channel on
227 [Freenode](http://freenode.net/).
229 If you have a bug to report, a patch to submit or a feature you'd like to
230 request, please file it in the
231 [issue tracker](https://github.com/glfw/glfw/issues) on GitHub.
233 Finally, if you're interested in helping out with the development of GLFW or
234 porting it to your favorite platform, join us on the forum, GitHub or IRC.
239 GLFW exists because people around the world donated their time and lent their
294 - Eloi Marín Gratacós
297 - Sylvain Hellegouarch
316 - Yuri Kunde Schlesner
333 - Zbigniew Mandziejewicz
363 - Christopher Pelloux
368 - Emmanuel Gil Peyrot
371 - Stanislav Podgorskiy
372 - Konstantin Podsvirov
389 - Sebastian Schuberth
401 - Erlend Sogge Heggen
439 - All the unmentioned and anonymous contributors in the GLFW community, for bug
440 reports, patches, feedback, testing and encouragement