xref: /glfw/
Name Date Size

..29-Nov-20194 KiB

.appveyor.ymlH A D17-Jan-20201.6 KiB

.gitattributesH A D02-Sep-2019142

.gitignoreH A D11-Dec-20191.6 KiB

.mailmapH A D14-Nov-2019384

.travis.ymlH A D26-Dec-20193.1 KiB

CMake/H11-Dec-20194 KiB

CMakeLists.txtH A D17-Jan-202012.6 KiB

deps/H02-Sep-20194 KiB

docs/H17-Jan-20204 KiB

examples/H18-Dec-20194 KiB

include/GLFW/H02-Sep-20194 KiB

LICENSE.mdH A D06-Sep-2019904

README.mdH A D17-Jan-202012.4 KiB

src/H17-Jan-20204 KiB

tests/H18-Dec-20194 KiB

README.md

1# GLFW
2
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)
6
7## Introduction
8
9GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan
10application development.  It provides a simple, platform-independent API for
11creating windows, contexts and surfaces, reading input, handling events, etc.
12
13GLFW natively supports Windows, macOS and Linux and other Unix-like systems.  On
14Linux both X11 and Wayland are supported.
15
16GLFW is licensed under the [zlib/libpng
17license](http://www.glfw.org/license.html).
18
19You can [download](http://www.glfw.org/download.html) the latest stable release
20as source or Windows binaries, or fetch the `latest` branch from GitHub.  Each
21release starting with 3.0 also has a corresponding [annotated
22tag](https://github.com/glfw/glfw/releases) with source and binary archives.
23
24The [documentation](http://www.glfw.org/docs/latest/) is available online and is
25included in all source and binary archives.  See the [release
26notes](https://www.glfw.org/docs/latest/news.html) for new features, caveats and
27deprecations in the latest release.  For more details see the [version
28history](http://www.glfw.org/changelog.html).
29
30The `master` branch is the stable integration branch and _should_ always compile
31and run on all supported platforms, although details of newly added features may
32change until they have been included in a release.  New features and many bug
33fixes live in [other branches](https://github.com/glfw/glfw/branches/all) until
34they are stable enough to merge.
35
36If you are new to GLFW, you may find the
37[tutorial](http://www.glfw.org/docs/latest/quick.html) for GLFW 3 useful.  If
38you have used GLFW 2 in the past, there is a [transition
39guide](http://www.glfw.org/docs/latest/moving.html) for moving to the GLFW
403 API.
41
42
43## Compiling GLFW
44
45GLFW itself requires only the headers and libraries for your OS and window
46system.  It does not need the headers for any context creation API (WGL, GLX,
47EGL, NSGL, OSMesa) or rendering API (OpenGL, OpenGL ES, Vulkan) to enable
48support for them.
49
50GLFW supports compilation on Windows with Visual C++ 2010 and later, MinGW and
51MinGW-w64, on macOS with Clang and on Linux and other Unix-like systems with GCC
52and Clang.  It will likely compile in other environments as well, but this is
53not regularly tested.
54
55There are [pre-compiled Windows binaries](http://www.glfw.org/download.html)
56available for all supported compilers.
57
58See the [compilation guide](http://www.glfw.org/docs/latest/compile.html) for
59more information about how to compile GLFW yourself.
60
61
62## Using GLFW
63
64See the [documentation](http://www.glfw.org/docs/latest/) for tutorials, guides
65and the API reference.
66
67
68## Contributing to GLFW
69
70See the [contribution
71guide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for
72more information.
73
74
75## System requirements
76
77GLFW supports Windows XP and later and macOS 10.8 and later.  Linux and other
78Unix-like systems running the X Window System are supported even without
79a desktop environment or modern extensions, although some features require
80a running window or clipboard manager.  The OSMesa backend requires Mesa 6.3.
81
82See the [compatibility guide](http://www.glfw.org/docs/latest/compat.html)
83in the documentation for more information.
84
85
86## Dependencies
87
88GLFW itself needs only CMake 3.1 or later and the headers and libraries for your
89OS and window system.
90
91The (experimental) Wayland backend also depends on the `extra-cmake-modules`
92package, which is used to generate Wayland protocol headers.
93
94The examples and test programs depend on a number of tiny libraries.  These are
95located in the `deps/` directory.
96
97 - [getopt\_port](https://github.com/kimgr/getopt_port/) for examples
98   with command-line options
99 - [TinyCThread](https://github.com/tinycthread/tinycthread) for threaded
100   examples
101 - [glad2](https://github.com/Dav1dde/glad) for loading OpenGL and Vulkan
102   functions
103 - [linmath.h](https://github.com/datenwolf/linmath.h) for linear algebra in
104   examples
105 - [Nuklear](https://github.com/vurtun/nuklear) for test and example UI
106 - [stb\_image\_write](https://github.com/nothings/stb) for writing images to disk
107
108The documentation is generated with [Doxygen](http://doxygen.org/) if CMake can
109find that tool.
110
111
112## Reporting bugs
113
114Bugs are reported to our [issue tracker](https://github.com/glfw/glfw/issues).
115Please check the [contribution
116guide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for
117information on what to include when reporting a bug.
118
119
120## Changelog
121
122 - Added `GLFW_RESIZE_NWSE_CURSOR`, `GLFW_RESIZE_NESW_CURSOR`,
123   `GLFW_RESIZE_ALL_CURSOR` and `GLFW_NOT_ALLOWED_CURSOR` cursor shapes (#427)
124 - Added `GLFW_RESIZE_EW_CURSOR` alias for `GLFW_HRESIZE_CURSOR` (#427)
125 - Added `GLFW_RESIZE_NS_CURSOR` alias for `GLFW_VRESIZE_CURSOR` (#427)
126 - Added `GLFW_POINTING_HAND_CURSOR` alias for `GLFW_HAND_CURSOR` (#427)
127 - Updated the minimum required CMake version to 3.1
128 - Disabled tests and examples by default when built as a CMake subdirectory
129 - Bugfix: The CMake config-file package used an absolute path and was not
130   relocatable (#1470)
131 - Bugfix: Video modes with a duplicate screen area were discarded (#1555,#1556)
132 - Bugfix: Compiling with -Wextra-semi caused warnings (#1440)
133 - Bugfix: Built-in mappings failed because some OEMs re-used VID/PID (#1583)
134 - [Win32] Added the `GLFW_WIN32_KEYBOARD_MENU` window hint for enabling access
135           to the window menu
136 - [Win32] Added a version info resource to the GLFW DLL
137 - [Win32] Bugfix: `GLFW_INCLUDE_VULKAN` plus `VK_USE_PLATFORM_WIN32_KHR` caused
138   symbol redefinition (#1524)
139 - [Win32] Bugfix: The cursor position event was emitted before its cursor enter
140   event (#1490)
141 - [Win32] Bugfix: The window hint `GLFW_MAXIMIZED` did not move or resize the
142   window (#1499)
143 - [Win32] Bugfix: Disabled cursor mode interfered with some non-client actions
144 - [Win32] Bugfix: Super key was not released after Win+V hotkey (#1622)
145 - [Win32] Bugfix: `glfwGetKeyName` could access out of bounds and return an
146   invalid pointer
147 - [Win32] Bugfix: Some synthetic key events were reported as `GLFW_KEY_UNKNOWN`
148   (#1623)
149 - [Cocoa] Added support for `VK_EXT_metal_surface` (#1619)
150 - [Cocoa] Added locating the Vulkan loader at runtime in an application bundle
151 - [Cocoa] Removed dependency on the CoreVideo framework
152 - [Cocoa] Bugfix: `glfwSetWindowSize` used a bottom-left anchor point (#1553)
153 - [Cocoa] Bugfix: Window remained on screen after destruction until event poll
154   (#1412)
155 - [Cocoa] Bugfix: Event processing before window creation would assert (#1543)
156 - [Cocoa] Bugfix: Undecorated windows could not be iconified on recent macOS
157 - [X11] Bugfix: The CMake files did not check for the XInput headers (#1480)
158 - [X11] Bugfix: Key names were not updated when the keyboard layout changed
159   (#1462,#1528)
160 - [X11] Bugfix: Decorations could not be enabled after window creation (#1566)
161 - [X11] Bugfix: Content scale fallback value could be inconsistent (#1578)
162 - [X11] Bugfix: `glfwMaximizeWindow` had no effect on hidden windows
163 - [X11] Bugfix: Clearing `GLFW_FLOATING` on a hidden window caused invalid read
164 - [X11] Bugfix: Changing `GLFW_FLOATING` on a hidden window could silently fail
165 - [X11] Bugfix: Disabled cursor mode was interrupted by indicator windows
166 - [X11] Bugfix: Monitor physical dimensions could be reported as zero mm
167 - [X11] Bugfix: Window position events were not emitted during resizing (#1613)
168 - [X11] Bugfix: `glfwFocusWindow` could terminate on older WMs or without a WM
169 - [X11] Bugfix: Querying a disconnected monitor could segfault (#1602)
170 - [Wayland] Removed support for `wl_shell` (#1443)
171 - [Wayland] Bugfix: The `GLFW_HAND_CURSOR` shape used the wrong image (#1432)
172 - [Wayland] Bugfix: `CLOCK_MONOTONIC` was not correctly enabled
173 - [POSIX] Bugfix: `CLOCK_MONOTONIC` was not correctly tested for or enabled
174 - [NSGL] Removed enforcement of forward-compatible flag for core contexts
175 - [NSGL] Bugfix: `GLFW_COCOA_RETINA_FRAMEBUFFER` had no effect on newer
176   macOS versions (#1442)
177 - [NSGL] Bugfix: Workaround for swap interval on 10.14 broke on 10.12 (#1483)
178
179
180## Contact
181
182On [glfw.org](http://www.glfw.org/) you can find the latest version of GLFW, as
183well as news, documentation and other information about the project.
184
185If you have questions related to the use of GLFW, we have a
186[forum](https://discourse.glfw.org/), and the `#glfw` IRC channel on
187[Freenode](http://freenode.net/).
188
189If you have a bug to report, a patch to submit or a feature you'd like to
190request, please file it in the
191[issue tracker](https://github.com/glfw/glfw/issues) on GitHub.
192
193Finally, if you're interested in helping out with the development of GLFW or
194porting it to your favorite platform, join us on the forum, GitHub or IRC.
195
196
197## Acknowledgements
198
199GLFW exists because people around the world donated their time and lent their
200skills.
201
202 - Bobyshev Alexander
203 - Matt Arsenault
204 - David Avedissian
205 - Keith Bauer
206 - John Bartholomew
207 - Coşku Baş
208 - Niklas Behrens
209 - Andrew Belt
210 - Niklas Bergström
211 - Denis Bernard
212 - Doug Binks
213 - blanco
214 - Kyle Brenneman
215 - Rok Breulj
216 - Kai Burjack
217 - Martin Capitanio
218 - David Carlier
219 - Arturo Castro
220 - Chi-kwan Chan
221 - Ian Clarkson
222 - Michał Cichoń
223 - Lambert Clara
224 - Anna Clarke
225 - Yaron Cohen-Tal
226 - Omar Cornut
227 - Andrew Corrigan
228 - Bailey Cosier
229 - Noel Cower
230 - Jason Daly
231 - Jarrod Davis
232 - Olivier Delannoy
233 - Paul R. Deppe
234 - Michael Dickens
235 - Роман Донченко
236 - Mario Dorn
237 - Wolfgang Draxinger
238 - Jonathan Dummer
239 - Ralph Eastwood
240 - Fredrik Ehnbom
241 - Robin Eklind
242 - Siavash Eliasi
243 - Felipe Ferreira
244 - Michael Fogleman
245 - Gerald Franz
246 - Mário Freitas
247 - GeO4d
248 - Marcus Geelnard
249 - Charles Giessen
250 - Ryan C. Gordon
251 - Stephen Gowen
252 - Kovid Goyal
253 - Eloi Marín Gratacós
254 - Stefan Gustavson
255 - Jonathan Hale
256 - Sylvain Hellegouarch
257 - Matthew Henry
258 - heromyth
259 - Lucas Hinderberger
260 - Paul Holden
261 - Warren Hu
262 - Charles Huber
263 - IntellectualKitty
264 - Aaron Jacobs
265 - Erik S. V. Jansson
266 - Toni Jovanoski
267 - Arseny Kapoulkine
268 - Cem Karan
269 - Osman Keskin
270 - Josh Kilmer
271 - Byunghoon Kim
272 - Cameron King
273 - Peter Knut
274 - Christoph Kubisch
275 - Yuri Kunde Schlesner
276 - Rokas Kupstys
277 - Konstantin Käfer
278 - Eric Larson
279 - Francis Lecavalier
280 - Robin Leffmann
281 - Glenn Lewis
282 - Shane Liesegang
283 - Anders Lindqvist
284 - Leon Linhart
285 - Eyal Lotem
286 - Aaron Loucks
287 - Luflosi
288 - Tristam MacDonald
289 - Hans Mackowiak
290 - Дмитри Малышев
291 - Zbigniew Mandziejewicz
292 - Adam Marcus
293 - Célestin Marot
294 - Kyle McDonald
295 - David Medlock
296 - Bryce Mehring
297 - Jonathan Mercier
298 - Marcel Metz
299 - Liam Middlebrook
300 - Ave Milia
301 - Jonathan Miller
302 - Kenneth Miller
303 - Bruce Mitchener
304 - Jack Moffitt
305 - Jeff Molofee
306 - Alexander Monakov
307 - Pierre Morel
308 - Jon Morton
309 - Pierre Moulon
310 - Martins Mozeiko
311 - Julian Møller
312 - ndogxj
313 - Kristian Nielsen
314 - Kamil Nowakowski
315 - Denis Ovod
316 - Ozzy
317 - Andri Pálsson
318 - Peoro
319 - Braden Pellett
320 - Christopher Pelloux
321 - Arturo J. Pérez
322 - Anthony Pesch
323 - Orson Peters
324 - Emmanuel Gil Peyrot
325 - Cyril Pichard
326 - Keith Pitt
327 - Stanislav Podgorskiy
328 - Konstantin Podsvirov
329 - Nathan Poirier
330 - Alexandre Pretyman
331 - Pablo Prietz
332 - przemekmirek
333 - pthom
334 - Guillaume Racicot
335 - Philip Rideout
336 - Eddie Ringle
337 - Max Risuhin
338 - Jorge Rodriguez
339 - Ed Ropple
340 - Aleksey Rybalkin
341 - Riku Salminen
342 - Brandon Schaefer
343 - Sebastian Schuberth
344 - Christian Sdunek
345 - Matt Sealey
346 - Steve Sexton
347 - Arkady Shapkin
348 - Yoshiki Shibukawa
349 - Dmitri Shuralyov
350 - Daniel Skorupski
351 - Bradley Smith
352 - Cliff Smolinsky
353 - Patrick Snape
354 - Erlend Sogge Heggen
355 - Julian Squires
356 - Johannes Stein
357 - Pontus Stenetorp
358 - Michael Stocker
359 - Justin Stoecker
360 - Elviss Strazdins
361 - Paul Sultana
362 - Nathan Sweet
363 - TTK-Bandit
364 - Jared Tiala
365 - Sergey Tikhomirov
366 - Arthur Tombs
367 - Ioannis Tsakpinis
368 - Samuli Tuomola
369 - Matthew Turner
370 - urraka
371 - Elias Vanderstuyft
372 - Stef Velzel
373 - Jari Vetoniemi
374 - Ricardo Vieira
375 - Nicholas Vitovitch
376 - Simon Voordouw
377 - Corentin Wallez
378 - Torsten Walluhn
379 - Patrick Walton
380 - Xo Wang
381 - Jay Weisskopf
382 - Frank Wille
383 - Ryogo Yoshimura
384 - Lukas Zanner
385 - Andrey Zholos
386 - Santi Zupancic
387 - Jonas Ådahl
388 - Lasse Öörni
389 - All the unmentioned and anonymous contributors in the GLFW community, for bug
390   reports, patches, feedback, testing and encouragement
391
392