2013-06-13 13:07:28 +00:00
|
|
|
# GLFW
|
2013-02-04 09:46:02 +00:00
|
|
|
|
2016-02-04 13:58:44 +00:00
|
|
|
[![Build status](https://travis-ci.org/glfw/glfw.svg?branch=master)](https://travis-ci.org/glfw/glfw)
|
|
|
|
[![Build status](https://ci.appveyor.com/api/projects/status/0kf0ct9831i5l6sp/branch/master?svg=true)](https://ci.appveyor.com/project/elmindreda/glfw)
|
2016-06-23 14:09:55 +00:00
|
|
|
[![Coverity Scan](https://scan.coverity.com/projects/4884/badge.svg)](https://scan.coverity.com/projects/glfw-glfw)
|
2015-04-14 21:47:17 +00:00
|
|
|
|
2013-02-04 09:46:02 +00:00
|
|
|
## Introduction
|
|
|
|
|
2016-08-08 23:34:56 +00:00
|
|
|
GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan
|
|
|
|
application development. It provides a simple, platform-independent API for
|
|
|
|
creating windows, contexts and surfaces, reading input, handling events, etc.
|
2013-02-04 09:46:02 +00:00
|
|
|
|
2016-08-17 14:48:22 +00:00
|
|
|
GLFW is licensed under the [zlib/libpng
|
|
|
|
license](https://opensource.org/licenses/Zlib).
|
2016-06-05 17:35:39 +00:00
|
|
|
|
2016-08-18 21:42:15 +00:00
|
|
|
The latest stable release is version 3.2.1.
|
2013-04-18 22:19:22 +00:00
|
|
|
|
2016-08-17 14:48:22 +00:00
|
|
|
See the [downloads](http://www.glfw.org/download.html) page for details and
|
|
|
|
files, or fetch the `latest` branch, which always points to the latest stable
|
|
|
|
release. Each release starting with 3.0 also has a corresponding [annotated
|
|
|
|
tag](https://github.com/glfw/glfw/releases) with source and binary archives.
|
|
|
|
|
2016-08-18 21:42:15 +00:00
|
|
|
This is a development branch for version 3.3, which is _not yet described_.
|
|
|
|
|
2013-04-07 11:26:06 +00:00
|
|
|
If you are new to GLFW, you may find the
|
2016-02-27 20:58:09 +00:00
|
|
|
[tutorial](http://www.glfw.org/docs/latest/quick.html) for GLFW
|
2013-06-17 09:58:46 +00:00
|
|
|
3 useful. If you have used GLFW 2 in the past, there is a
|
2013-07-10 13:51:10 +00:00
|
|
|
[transition guide](http://www.glfw.org/docs/latest/moving.html) for moving to
|
|
|
|
the GLFW 3 API.
|
2013-02-04 09:46:02 +00:00
|
|
|
|
|
|
|
|
2013-10-27 11:50:33 +00:00
|
|
|
## Compiling GLFW
|
2013-10-21 20:23:15 +00:00
|
|
|
|
2016-08-08 23:34:56 +00:00
|
|
|
GLFW itself requires only the headers and libraries for your window system. It
|
2016-07-14 16:32:30 +00:00
|
|
|
does not need the headers for any context creation API (WGL, GLX, EGL, NSGL) or
|
|
|
|
rendering API (OpenGL, OpenGL ES, Vulkan) to enable support for them.
|
|
|
|
|
2016-07-14 16:29:39 +00:00
|
|
|
GLFW supports compilation on Windows with Visual C++ 2010 and later, MinGW and
|
2016-10-19 22:50:54 +00:00
|
|
|
MinGW-w64, on macOS with Clang and on Linux and other Unix-like systems with GCC
|
2016-07-14 16:29:39 +00:00
|
|
|
and Clang. It will likely compile in other environments as well, but this is
|
|
|
|
not regularly tested.
|
2013-02-04 09:46:02 +00:00
|
|
|
|
2016-07-14 16:11:17 +00:00
|
|
|
There are also [pre-compiled Windows
|
2016-07-14 16:29:39 +00:00
|
|
|
binaries](http://www.glfw.org/download.html) available for all compilers
|
|
|
|
supported on that platform.
|
2013-02-04 09:46:02 +00:00
|
|
|
|
2016-07-14 16:11:17 +00:00
|
|
|
See the [compilation guide](http://www.glfw.org/docs/latest/compile.html) in the
|
2016-07-14 16:19:46 +00:00
|
|
|
documentation for more information.
|
2013-02-04 09:46:02 +00:00
|
|
|
|
2016-07-14 16:02:44 +00:00
|
|
|
|
2016-07-14 16:11:17 +00:00
|
|
|
## Using GLFW
|
2016-07-14 16:02:44 +00:00
|
|
|
|
2016-07-14 16:11:17 +00:00
|
|
|
See the [building application guide](http://www.glfw.org/docs/latest/build.html)
|
2016-07-14 16:19:46 +00:00
|
|
|
guide in the documentation for more information.
|
2016-07-14 16:02:44 +00:00
|
|
|
|
|
|
|
|
2016-07-14 16:11:17 +00:00
|
|
|
## System requirements
|
2016-07-14 16:02:44 +00:00
|
|
|
|
|
|
|
GLFW supports Windows XP and later, OS X 10.7 Lion and later, and Linux and
|
2016-07-14 16:29:39 +00:00
|
|
|
other Unix-like systems with the X Window System. Experimental implementations
|
|
|
|
for the Wayland protocol and the Mir display server are available but not yet
|
|
|
|
officially supported.
|
2016-07-14 16:02:44 +00:00
|
|
|
|
|
|
|
See the [compatibility guide](http://www.glfw.org/docs/latest/compat.html)
|
2016-07-14 16:19:46 +00:00
|
|
|
in the documentation for more information.
|
2016-07-14 16:02:44 +00:00
|
|
|
|
|
|
|
|
2014-01-12 04:40:36 +00:00
|
|
|
## Dependencies
|
|
|
|
|
2016-08-08 23:34:56 +00:00
|
|
|
GLFW itself depends only on the headers and libraries for your window system.
|
|
|
|
|
2016-02-08 15:23:44 +00:00
|
|
|
The examples and test programs depend on a number of tiny libraries. These are
|
|
|
|
located in the `deps/` directory.
|
2014-01-12 04:40:36 +00:00
|
|
|
|
2014-06-18 14:13:49 +00:00
|
|
|
- [getopt\_port](https://github.com/kimgr/getopt_port/) for examples
|
|
|
|
with command-line options
|
2014-10-15 01:55:25 +00:00
|
|
|
- [TinyCThread](https://github.com/tinycthread/tinycthread) for threaded
|
2014-06-18 14:13:49 +00:00
|
|
|
examples
|
|
|
|
- An OpenGL 3.2 core loader generated by
|
|
|
|
[glad](https://github.com/Dav1dde/glad) for examples using modern OpenGL
|
2015-08-09 14:58:25 +00:00
|
|
|
- [linmath.h](https://github.com/datenwolf/linmath.h) for linear algebra in
|
|
|
|
examples
|
2016-09-25 12:08:33 +00:00
|
|
|
- [Nuklear](https://github.com/vurtun/nuklear) for test and example UI
|
2016-10-13 15:42:44 +00:00
|
|
|
- [stb\_image\_write](https://github.com/nothings/stb) for writing images to disk
|
2016-02-19 13:38:04 +00:00
|
|
|
- [Vulkan headers](https://www.khronos.org/registry/vulkan/) for Vulkan tests
|
2014-01-12 04:40:36 +00:00
|
|
|
|
2015-08-10 18:19:04 +00:00
|
|
|
The Vulkan example additionally requires the Vulkan SDK to be installed, or it
|
|
|
|
will not be included in the build.
|
|
|
|
|
2016-02-08 15:23:44 +00:00
|
|
|
The documentation is generated with [Doxygen](http://doxygen.org/). If CMake
|
2016-08-08 23:34:56 +00:00
|
|
|
does not find Doxygen, the documentation will not be generated when you build.
|
2016-02-08 15:23:44 +00:00
|
|
|
|
2014-01-12 04:40:36 +00:00
|
|
|
|
2016-07-14 16:32:30 +00:00
|
|
|
## Reporting bugs
|
|
|
|
|
|
|
|
Bugs are reported to our [issue tracker](https://github.com/glfw/glfw/issues).
|
|
|
|
Please check the [contribution
|
|
|
|
guide](https://github.com/glfw/glfw/blob/master/.github/CONTRIBUTING.md) for
|
|
|
|
information on what to include when reporting a bug.
|
|
|
|
|
|
|
|
|
2013-06-13 13:09:10 +00:00
|
|
|
## Changelog
|
2013-02-04 09:46:02 +00:00
|
|
|
|
2016-09-14 15:41:06 +00:00
|
|
|
- Added `glfwGetKeyScancode` function that allows retrieving platform dependent
|
|
|
|
scancodes for keys (#830)
|
2016-06-16 11:09:28 +00:00
|
|
|
- Added `glfwSetWindowMaximizeCallback` and `GLFWwindowmaximizefun` for
|
|
|
|
receiving window maximization events (#778)
|
2016-10-13 15:24:51 +00:00
|
|
|
- Added headless [OSMesa](http://mesa3d.org/osmesa.html) backend (#281,#850)
|
2016-11-08 11:39:18 +00:00
|
|
|
- Added definition of `GLAPIENTRY` to public header
|
2016-06-16 10:52:22 +00:00
|
|
|
- Bugfix: Calling `glfwMaximizeWindow` on a full screen window was not ignored
|
2016-09-14 19:13:33 +00:00
|
|
|
- Bugfix: `GLFW_INCLUDE_VULKAN` could not be combined with the corresponding
|
|
|
|
OpenGL and OpenGL ES header macros
|
2016-11-01 18:24:36 +00:00
|
|
|
- Bugfix: `glfwGetInstanceProcAddress` returned `NULL` for
|
|
|
|
`vkGetInstanceProcAddr` when `_GLFW_VULKAN_STATIC` was enabled
|
2016-09-14 11:05:13 +00:00
|
|
|
- [Win32] Bugfix: Undecorated windows could not be iconified by the user (#861)
|
2016-10-13 23:46:56 +00:00
|
|
|
- [Cocoa] Added support for Vulkan window surface creation via MoltenVK (#870)
|
2016-10-10 16:09:05 +00:00
|
|
|
- [Cocoa] Bugfix: Disabling window aspect ratio would assert (#852)
|
2016-10-16 11:59:21 +00:00
|
|
|
- [Cocoa] Bugfix: Window creation failed to set first responder (#876,#883)
|
2016-11-15 19:39:39 +00:00
|
|
|
- [Cocoa] Bugfix: Removed use of deprecated `CGDisplayIOServicePort` function
|
|
|
|
(#165,#192,#508,#511)
|
2016-09-28 23:06:40 +00:00
|
|
|
- [EGL] Added support for `EGL_KHR_get_all_proc_addresses` (#871)
|
2016-06-16 10:52:22 +00:00
|
|
|
|
2013-02-04 09:46:02 +00:00
|
|
|
|
|
|
|
## Contact
|
|
|
|
|
2016-08-02 13:58:58 +00:00
|
|
|
On [glfw.org](http://www.glfw.org/) you can find the latest version of GLFW, as
|
|
|
|
well as news, documentation and other information about the project.
|
2013-02-04 09:46:02 +00:00
|
|
|
|
|
|
|
If you have questions related to the use of GLFW, we have a
|
2016-08-17 14:48:22 +00:00
|
|
|
[forum](http://discourse.glfw.org/), and the `#glfw` IRC channel on
|
|
|
|
[Freenode](http://freenode.net/).
|
2013-02-04 09:46:02 +00:00
|
|
|
|
|
|
|
If you have a bug to report, a patch to submit or a feature you'd like to
|
2013-06-24 12:28:42 +00:00
|
|
|
request, please file it in the
|
|
|
|
[issue tracker](https://github.com/glfw/glfw/issues) on GitHub.
|
2013-02-04 09:46:02 +00:00
|
|
|
|
|
|
|
Finally, if you're interested in helping out with the development of GLFW or
|
2016-08-17 14:48:22 +00:00
|
|
|
porting it to your favorite platform, join us on the forum, GitHub or IRC.
|
2013-02-04 09:46:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Acknowledgements
|
|
|
|
|
|
|
|
GLFW exists because people around the world donated their time and lent their
|
|
|
|
skills.
|
|
|
|
|
2013-06-09 10:49:13 +00:00
|
|
|
- Bobyshev Alexander
|
|
|
|
- artblanc
|
2013-07-30 13:52:23 +00:00
|
|
|
- arturo
|
2013-06-09 10:49:13 +00:00
|
|
|
- Matt Arsenault
|
|
|
|
- Keith Bauer
|
|
|
|
- John Bartholomew
|
2013-06-16 10:35:46 +00:00
|
|
|
- Niklas Behrens
|
2013-06-09 10:49:13 +00:00
|
|
|
- Niklas Bergström
|
2013-08-16 15:48:11 +00:00
|
|
|
- Doug Binks
|
2013-06-09 10:49:13 +00:00
|
|
|
- blanco
|
2016-09-28 21:47:22 +00:00
|
|
|
- Kyle Brenneman
|
2014-08-10 14:35:09 +00:00
|
|
|
- Martin Capitanio
|
2015-04-09 14:09:39 +00:00
|
|
|
- Chi-kwan Chan
|
2013-06-09 10:49:13 +00:00
|
|
|
- Lambert Clara
|
2013-10-06 09:37:16 +00:00
|
|
|
- Andrew Corrigan
|
2013-06-09 10:49:13 +00:00
|
|
|
- Noel Cower
|
2016-10-13 15:24:51 +00:00
|
|
|
- Jason Daly
|
2013-06-09 10:49:13 +00:00
|
|
|
- Jarrod Davis
|
|
|
|
- Olivier Delannoy
|
|
|
|
- Paul R. Deppe
|
2014-02-13 23:45:27 +00:00
|
|
|
- Michael Dickens
|
2015-10-28 21:57:57 +00:00
|
|
|
- Роман Донченко
|
2015-11-13 16:19:20 +00:00
|
|
|
- Mario Dorn
|
2013-06-09 10:49:13 +00:00
|
|
|
- Jonathan Dummer
|
|
|
|
- Ralph Eastwood
|
2015-03-17 15:33:21 +00:00
|
|
|
- Siavash Eliasi
|
2013-12-10 12:45:21 +00:00
|
|
|
- Michael Fogleman
|
2013-12-11 13:41:51 +00:00
|
|
|
- Gerald Franz
|
2016-10-10 16:09:05 +00:00
|
|
|
- Mário Freitas
|
2013-06-09 10:49:13 +00:00
|
|
|
- GeO4d
|
|
|
|
- Marcus Geelnard
|
2014-09-09 21:15:52 +00:00
|
|
|
- Eloi Marín Gratacós
|
2013-06-09 10:49:13 +00:00
|
|
|
- Stefan Gustavson
|
|
|
|
- Sylvain Hellegouarch
|
2014-03-10 15:50:20 +00:00
|
|
|
- Matthew Henry
|
2013-06-09 10:49:13 +00:00
|
|
|
- heromyth
|
2014-09-21 00:13:41 +00:00
|
|
|
- Lucas Hinderberger
|
2013-06-16 16:32:16 +00:00
|
|
|
- Paul Holden
|
2016-07-22 15:39:39 +00:00
|
|
|
- Warren Hu
|
2016-03-29 12:00:44 +00:00
|
|
|
- IntellectualKitty
|
2015-06-26 11:31:37 +00:00
|
|
|
- Aaron Jacobs
|
2016-08-10 14:22:03 +00:00
|
|
|
- Erik S. V. Jansson
|
2013-06-09 10:49:13 +00:00
|
|
|
- Toni Jovanoski
|
2014-05-02 05:39:21 +00:00
|
|
|
- Arseny Kapoulkine
|
2013-06-09 10:49:13 +00:00
|
|
|
- Osman Keskin
|
|
|
|
- Cameron King
|
|
|
|
- Peter Knut
|
2015-08-10 18:19:04 +00:00
|
|
|
- Christoph Kubisch
|
2015-04-14 19:15:50 +00:00
|
|
|
- Eric Larson
|
2013-06-09 10:49:13 +00:00
|
|
|
- Robin Leffmann
|
|
|
|
- Glenn Lewis
|
|
|
|
- Shane Liesegang
|
2015-08-14 11:49:52 +00:00
|
|
|
- Eyal Lotem
|
2013-06-09 10:49:13 +00:00
|
|
|
- Дмитри Малышев
|
|
|
|
- Martins Mozeiko
|
|
|
|
- Tristam MacDonald
|
|
|
|
- Hans Mackowiak
|
2016-02-01 23:04:15 +00:00
|
|
|
- Zbigniew Mandziejewicz
|
2013-06-16 16:40:10 +00:00
|
|
|
- Kyle McDonald
|
2013-06-09 10:49:13 +00:00
|
|
|
- David Medlock
|
2015-02-23 04:14:24 +00:00
|
|
|
- Bryce Mehring
|
2013-06-09 10:49:13 +00:00
|
|
|
- Jonathan Mercier
|
|
|
|
- Marcel Metz
|
2015-01-23 21:53:41 +00:00
|
|
|
- Jonathan Miller
|
2013-06-09 10:49:13 +00:00
|
|
|
- Kenneth Miller
|
2013-07-01 11:18:05 +00:00
|
|
|
- Bruce Mitchener
|
2013-10-28 12:22:34 +00:00
|
|
|
- Jack Moffitt
|
2013-06-09 10:49:13 +00:00
|
|
|
- Jeff Molofee
|
|
|
|
- Jon Morton
|
2013-09-13 12:41:13 +00:00
|
|
|
- Pierre Moulon
|
2013-06-09 10:49:13 +00:00
|
|
|
- Julian Møller
|
2013-11-13 11:59:49 +00:00
|
|
|
- Kamil Nowakowski
|
2013-06-17 09:58:46 +00:00
|
|
|
- Ozzy
|
2013-10-09 17:03:47 +00:00
|
|
|
- Andri Pálsson
|
2013-06-09 10:49:13 +00:00
|
|
|
- Peoro
|
|
|
|
- Braden Pellett
|
|
|
|
- Arturo J. Pérez
|
2016-03-07 13:55:30 +00:00
|
|
|
- Orson Peters
|
2015-04-19 11:27:27 +00:00
|
|
|
- Emmanuel Gil Peyrot
|
2014-11-27 14:39:24 +00:00
|
|
|
- Cyril Pichard
|
2013-10-09 21:58:43 +00:00
|
|
|
- Pieroman
|
2016-08-04 22:23:16 +00:00
|
|
|
- Philip Rideout
|
2013-06-09 10:49:13 +00:00
|
|
|
- Jorge Rodriguez
|
|
|
|
- Ed Ropple
|
2015-01-23 17:38:12 +00:00
|
|
|
- Aleksey Rybalkin
|
2013-06-09 10:49:13 +00:00
|
|
|
- Riku Salminen
|
2014-11-06 22:57:53 +00:00
|
|
|
- Brandon Schaefer
|
2013-06-09 10:49:13 +00:00
|
|
|
- Sebastian Schuberth
|
|
|
|
- Matt Sealey
|
|
|
|
- SephiRok
|
|
|
|
- Steve Sexton
|
2013-10-09 17:45:39 +00:00
|
|
|
- Systemcluster
|
2016-02-26 09:46:49 +00:00
|
|
|
- Yoshiki Shibukawa
|
2013-06-09 10:49:13 +00:00
|
|
|
- Dmitri Shuralyov
|
|
|
|
- Daniel Skorupski
|
|
|
|
- Bradley Smith
|
2016-08-08 14:58:41 +00:00
|
|
|
- Patrick Snape
|
2013-06-09 10:49:13 +00:00
|
|
|
- Julian Squires
|
|
|
|
- Johannes Stein
|
2016-09-06 13:40:31 +00:00
|
|
|
- Michael Stocker
|
2013-06-17 15:42:22 +00:00
|
|
|
- Justin Stoecker
|
2015-04-09 12:03:26 +00:00
|
|
|
- Elviss Strazdins
|
2013-06-09 10:49:13 +00:00
|
|
|
- Nathan Sweet
|
|
|
|
- TTK-Bandit
|
|
|
|
- Sergey Tikhomirov
|
2016-07-14 10:49:46 +00:00
|
|
|
- Arthur Tombs
|
2016-03-07 13:55:30 +00:00
|
|
|
- Ioannis Tsakpinis
|
2013-06-09 10:49:13 +00:00
|
|
|
- Samuli Tuomola
|
2013-10-07 13:30:57 +00:00
|
|
|
- urraka
|
2016-08-22 14:12:04 +00:00
|
|
|
- Elias Vanderstuyft
|
2013-06-09 10:49:13 +00:00
|
|
|
- Jari Vetoniemi
|
2014-07-01 08:49:50 +00:00
|
|
|
- Ricardo Vieira
|
2016-02-01 23:06:56 +00:00
|
|
|
- Nicholas Vitovitch
|
2013-06-09 10:49:13 +00:00
|
|
|
- Simon Voordouw
|
|
|
|
- Torsten Walluhn
|
2014-10-21 05:41:58 +00:00
|
|
|
- Patrick Walton
|
2015-07-27 01:40:54 +00:00
|
|
|
- Xo Wang
|
2013-06-09 10:49:13 +00:00
|
|
|
- Jay Weisskopf
|
|
|
|
- Frank Wille
|
|
|
|
- yuriks
|
|
|
|
- Santi Zupancic
|
2014-03-18 20:43:24 +00:00
|
|
|
- Jonas Ådahl
|
2013-06-09 10:49:13 +00:00
|
|
|
- Lasse Öörni
|
|
|
|
- All the unmentioned and anonymous contributors in the GLFW community, for bug
|
2013-02-04 09:46:02 +00:00
|
|
|
reports, patches, feedback, testing and encouragement
|
|
|
|
|