2016-08-29 22:31:11 +02:00
|
|
|
# GLFW
|
|
|
|
|
|
|
|
[![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)
|
2018-02-16 21:22:08 +01:00
|
|
|
[![Coverity Scan](https://scan.coverity.com/projects/4884/badge.svg)](https://scan.coverity.com/projects/glfw-glfw)
|
2016-08-29 22:31:11 +02:00
|
|
|
|
|
|
|
## Introduction
|
|
|
|
|
2018-02-16 21:22:08 +01: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.
|
2016-08-29 22:31:11 +02:00
|
|
|
|
2018-02-16 21:22:08 +01:00
|
|
|
GLFW is licensed under the [zlib/libpng
|
|
|
|
license](https://opensource.org/licenses/Zlib).
|
2016-08-29 22:31:11 +02:00
|
|
|
|
2018-02-16 21:22:08 +01:00
|
|
|
This is version 3.2.1, which adds support for statically linking the Vulkan
|
|
|
|
loader and fixes for a number of bugs that together affect all supported
|
|
|
|
platforms.
|
|
|
|
|
|
|
|
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-29 22:31:11 +02:00
|
|
|
|
|
|
|
If you are new to GLFW, you may find the
|
|
|
|
[tutorial](http://www.glfw.org/docs/latest/quick.html) for GLFW
|
|
|
|
3 useful. If you have used GLFW 2 in the past, there is a
|
|
|
|
[transition guide](http://www.glfw.org/docs/latest/moving.html) for moving to
|
|
|
|
the GLFW 3 API.
|
|
|
|
|
|
|
|
|
|
|
|
## Compiling GLFW
|
|
|
|
|
2018-02-16 21:22:08 +01:00
|
|
|
GLFW itself requires only the headers and libraries for your window system. It
|
|
|
|
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-08-29 22:31:11 +02:00
|
|
|
|
2018-02-16 21:22:08 +01:00
|
|
|
GLFW supports compilation on Windows with Visual C++ 2010 and later, MinGW and
|
|
|
|
MinGW-w64, on OS X with Clang and on Linux and other Unix-like systems with GCC
|
|
|
|
and Clang. It will likely compile in other environments as well, but this is
|
|
|
|
not regularly tested.
|
2016-08-29 22:31:11 +02:00
|
|
|
|
2018-02-16 21:22:08 +01:00
|
|
|
There are also [pre-compiled Windows
|
|
|
|
binaries](http://www.glfw.org/download.html) available for all compilers
|
|
|
|
supported on that platform.
|
2016-08-29 22:31:11 +02:00
|
|
|
|
2018-02-16 21:22:08 +01:00
|
|
|
See the [compilation guide](http://www.glfw.org/docs/latest/compile.html) in the
|
|
|
|
documentation for more information.
|
2016-08-29 22:31:11 +02:00
|
|
|
|
|
|
|
|
2018-02-16 21:22:08 +01:00
|
|
|
## Using GLFW
|
|
|
|
|
|
|
|
See the [building application guide](http://www.glfw.org/docs/latest/build.html)
|
|
|
|
guide in the documentation for more information.
|
2016-08-29 22:31:11 +02:00
|
|
|
|
|
|
|
|
2018-02-16 21:22:08 +01:00
|
|
|
## System requirements
|
2016-08-29 22:31:11 +02:00
|
|
|
|
2018-02-16 21:22:08 +01:00
|
|
|
GLFW supports Windows XP and later, OS X 10.7 Lion and later, and Linux and
|
|
|
|
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-08-29 22:31:11 +02:00
|
|
|
|
2018-02-16 21:22:08 +01:00
|
|
|
See the [compatibility guide](http://www.glfw.org/docs/latest/compat.html)
|
|
|
|
in the documentation for more information.
|
2016-08-29 22:31:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
## Dependencies
|
|
|
|
|
2018-02-16 21:22:08 +01:00
|
|
|
GLFW itself depends only on the headers and libraries for your window system.
|
2016-08-29 22:31:11 +02:00
|
|
|
|
|
|
|
The examples and test programs depend on a number of tiny libraries. These are
|
|
|
|
located in the `deps/` directory.
|
|
|
|
|
|
|
|
- [getopt\_port](https://github.com/kimgr/getopt_port/) for examples
|
|
|
|
with command-line options
|
|
|
|
- [TinyCThread](https://github.com/tinycthread/tinycthread) for threaded
|
|
|
|
examples
|
|
|
|
- An OpenGL 3.2 core loader generated by
|
|
|
|
[glad](https://github.com/Dav1dde/glad) for examples using modern OpenGL
|
|
|
|
- [linmath.h](https://github.com/datenwolf/linmath.h) for linear algebra in
|
|
|
|
examples
|
|
|
|
- [Vulkan headers](https://www.khronos.org/registry/vulkan/) for Vulkan tests
|
|
|
|
|
|
|
|
The Vulkan example additionally requires the Vulkan SDK to be installed, or it
|
|
|
|
will not be included in the build.
|
|
|
|
|
|
|
|
The documentation is generated with [Doxygen](http://doxygen.org/). If CMake
|
2018-02-16 21:22:08 +01:00
|
|
|
does not find Doxygen, the documentation will not be generated when you build.
|
|
|
|
|
|
|
|
|
|
|
|
## 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.
|
2016-08-29 22:31:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
## Changelog
|
|
|
|
|
2018-02-16 21:22:08 +01:00
|
|
|
- Added on-demand loading of Vulkan and context creation API libraries
|
|
|
|
- Added `_GLFW_VULKAN_STATIC` build macro to make the library use the Vulkan
|
|
|
|
loader linked statically into the application (#820)
|
|
|
|
- Bugfix: Single compilation unit builds failed due to naming conflicts (#783)
|
|
|
|
- Bugfix: The range checks for `glfwSetCursorPos` used the wrong minimum (#773)
|
|
|
|
- Bugfix: Defining `GLFW_INCLUDE_VULKAN` when compiling the library did not
|
|
|
|
fail with the expected error message (#823)
|
|
|
|
- Bugfix: Inherited value of `CMAKE_MODULE_PATH` was clobbered (#822)
|
|
|
|
- [Win32] Bugfix: `glfwSetClipboardString` created an unnecessary intermediate
|
|
|
|
copy of the string
|
|
|
|
- [Win32] Bugfix: Examples failed to build on Visual C++ 2010 due to C99 in
|
|
|
|
`linmath.h` (#785)
|
|
|
|
- [Win32] Bugfix: The first shown window ignored the `GLFW_MAXIMIZED` hint
|
|
|
|
when the process was provided a `STARTUPINFO` (#780)
|
|
|
|
- [Cocoa] Bugfix: Event processing would segfault on some machines due to
|
|
|
|
a previous distributed notification listener not being fully
|
|
|
|
removed (#817,#826)
|
|
|
|
- [Cocoa] Bugfix: Some include statements were duplicated (#838)
|
|
|
|
- [X11] Bugfix: Window size limits were ignored if the minimum or maximum size
|
|
|
|
was set to `GLFW_DONT_CARE` (#805)
|
|
|
|
- [X11] Bugfix: Input focus was set before window was visible, causing
|
|
|
|
`BadMatch` on some non-reparenting WMs (#789,#798)
|
|
|
|
- [X11] Bugfix: `glfwGetWindowPos` and `glfwSetWindowPos` operated on the
|
|
|
|
window frame instead of the client area (#800)
|
|
|
|
- [WGL] Added reporting of errors from `WGL_ARB_create_context` extension
|
|
|
|
- [GLX] Bugfix: Dynamically loaded entry points were not verified
|
|
|
|
- [EGL] Added `lib` prefix matching between EGL and OpenGL ES library binaries
|
|
|
|
- [EGL] Bugfix: Dynamically loaded entry points were not verified
|
2016-08-29 22:31:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
## Contact
|
|
|
|
|
2018-02-16 21:22:08 +01: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.
|
2016-08-29 22:31:11 +02:00
|
|
|
|
|
|
|
If you have questions related to the use of GLFW, we have a
|
2018-02-16 21:22:08 +01:00
|
|
|
[forum](http://discourse.glfw.org/), and the `#glfw` IRC channel on
|
|
|
|
[Freenode](http://freenode.net/).
|
2016-08-29 22:31:11 +02:00
|
|
|
|
|
|
|
If you have a bug to report, a patch to submit or a feature you'd like to
|
|
|
|
request, please file it in the
|
|
|
|
[issue tracker](https://github.com/glfw/glfw/issues) on GitHub.
|
|
|
|
|
|
|
|
Finally, if you're interested in helping out with the development of GLFW or
|
2018-02-16 21:22:08 +01:00
|
|
|
porting it to your favorite platform, join us on the forum, GitHub or IRC.
|
2016-08-29 22:31:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
## Acknowledgements
|
|
|
|
|
|
|
|
GLFW exists because people around the world donated their time and lent their
|
|
|
|
skills.
|
|
|
|
|
|
|
|
- Bobyshev Alexander
|
|
|
|
- artblanc
|
|
|
|
- arturo
|
|
|
|
- Matt Arsenault
|
|
|
|
- Keith Bauer
|
|
|
|
- John Bartholomew
|
|
|
|
- Niklas Behrens
|
|
|
|
- Niklas Bergström
|
|
|
|
- Doug Binks
|
|
|
|
- blanco
|
|
|
|
- Martin Capitanio
|
|
|
|
- Chi-kwan Chan
|
|
|
|
- Lambert Clara
|
|
|
|
- Andrew Corrigan
|
|
|
|
- Noel Cower
|
|
|
|
- Jarrod Davis
|
|
|
|
- Olivier Delannoy
|
|
|
|
- Paul R. Deppe
|
|
|
|
- Michael Dickens
|
|
|
|
- Роман Донченко
|
|
|
|
- Mario Dorn
|
|
|
|
- Jonathan Dummer
|
|
|
|
- Ralph Eastwood
|
|
|
|
- Siavash Eliasi
|
|
|
|
- Michael Fogleman
|
|
|
|
- Gerald Franz
|
|
|
|
- GeO4d
|
|
|
|
- Marcus Geelnard
|
|
|
|
- Eloi Marín Gratacós
|
|
|
|
- Stefan Gustavson
|
|
|
|
- Sylvain Hellegouarch
|
|
|
|
- Matthew Henry
|
|
|
|
- heromyth
|
|
|
|
- Lucas Hinderberger
|
|
|
|
- Paul Holden
|
2018-02-16 21:22:08 +01:00
|
|
|
- Warren Hu
|
2016-08-29 22:31:11 +02:00
|
|
|
- IntellectualKitty
|
|
|
|
- Aaron Jacobs
|
2018-02-16 21:22:08 +01:00
|
|
|
- Erik S. V. Jansson
|
2016-08-29 22:31:11 +02:00
|
|
|
- Toni Jovanoski
|
|
|
|
- Arseny Kapoulkine
|
|
|
|
- Osman Keskin
|
|
|
|
- Cameron King
|
|
|
|
- Peter Knut
|
|
|
|
- Christoph Kubisch
|
|
|
|
- Eric Larson
|
|
|
|
- Robin Leffmann
|
|
|
|
- Glenn Lewis
|
|
|
|
- Shane Liesegang
|
|
|
|
- Eyal Lotem
|
|
|
|
- Дмитри Малышев
|
|
|
|
- Martins Mozeiko
|
|
|
|
- Tristam MacDonald
|
|
|
|
- Hans Mackowiak
|
|
|
|
- Zbigniew Mandziejewicz
|
|
|
|
- Kyle McDonald
|
|
|
|
- David Medlock
|
|
|
|
- Bryce Mehring
|
|
|
|
- Jonathan Mercier
|
|
|
|
- Marcel Metz
|
|
|
|
- Jonathan Miller
|
|
|
|
- Kenneth Miller
|
|
|
|
- Bruce Mitchener
|
|
|
|
- Jack Moffitt
|
|
|
|
- Jeff Molofee
|
|
|
|
- Jon Morton
|
|
|
|
- Pierre Moulon
|
|
|
|
- Julian Møller
|
|
|
|
- Kamil Nowakowski
|
|
|
|
- Ozzy
|
|
|
|
- Andri Pálsson
|
|
|
|
- Peoro
|
|
|
|
- Braden Pellett
|
|
|
|
- Arturo J. Pérez
|
|
|
|
- Orson Peters
|
|
|
|
- Emmanuel Gil Peyrot
|
|
|
|
- Cyril Pichard
|
|
|
|
- Pieroman
|
2018-02-16 21:22:08 +01:00
|
|
|
- Philip Rideout
|
2016-08-29 22:31:11 +02:00
|
|
|
- Jorge Rodriguez
|
|
|
|
- Ed Ropple
|
|
|
|
- Aleksey Rybalkin
|
|
|
|
- Riku Salminen
|
|
|
|
- Brandon Schaefer
|
|
|
|
- Sebastian Schuberth
|
|
|
|
- Matt Sealey
|
|
|
|
- SephiRok
|
|
|
|
- Steve Sexton
|
|
|
|
- Systemcluster
|
|
|
|
- Yoshiki Shibukawa
|
|
|
|
- Dmitri Shuralyov
|
|
|
|
- Daniel Skorupski
|
|
|
|
- Bradley Smith
|
2018-02-16 21:22:08 +01:00
|
|
|
- Patrick Snape
|
2016-08-29 22:31:11 +02:00
|
|
|
- Julian Squires
|
|
|
|
- Johannes Stein
|
|
|
|
- Justin Stoecker
|
|
|
|
- Elviss Strazdins
|
|
|
|
- Nathan Sweet
|
|
|
|
- TTK-Bandit
|
|
|
|
- Sergey Tikhomirov
|
2018-02-16 21:22:08 +01:00
|
|
|
- Arthur Tombs
|
2016-08-29 22:31:11 +02:00
|
|
|
- Ioannis Tsakpinis
|
|
|
|
- Samuli Tuomola
|
|
|
|
- urraka
|
|
|
|
- Jari Vetoniemi
|
|
|
|
- Ricardo Vieira
|
|
|
|
- Nicholas Vitovitch
|
|
|
|
- Simon Voordouw
|
|
|
|
- Torsten Walluhn
|
|
|
|
- Patrick Walton
|
|
|
|
- Xo Wang
|
|
|
|
- Jay Weisskopf
|
|
|
|
- Frank Wille
|
|
|
|
- yuriks
|
|
|
|
- Santi Zupancic
|
|
|
|
- Jonas Ådahl
|
|
|
|
- Lasse Öörni
|
|
|
|
- All the unmentioned and anonymous contributors in the GLFW community, for bug
|
|
|
|
reports, patches, feedback, testing and encouragement
|
|
|
|
|