2013-06-13 09:07:28 -04:00
|
|
|
# GLFW
|
2013-02-04 04:46:02 -05:00
|
|
|
|
2016-02-04 08:58:44 -05: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)
|
2015-04-14 17:47:17 -04:00
|
|
|
|
2013-02-04 04:46:02 -05:00
|
|
|
## Introduction
|
|
|
|
|
2015-08-10 14:19:04 -04:00
|
|
|
GLFW is a free, 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 04:46:02 -05:00
|
|
|
|
2015-06-01 16:55:06 -04:00
|
|
|
Version 3.2 is _not yet described_.
|
2013-04-18 18:19:22 -04:00
|
|
|
|
2013-04-07 07:26:06 -04:00
|
|
|
If you are new to GLFW, you may find the
|
2016-02-27 15:58:09 -05:00
|
|
|
[tutorial](http://www.glfw.org/docs/latest/quick.html) for GLFW
|
2013-06-17 05:58:46 -04:00
|
|
|
3 useful. If you have used GLFW 2 in the past, there is a
|
2013-07-10 09:51:10 -04:00
|
|
|
[transition guide](http://www.glfw.org/docs/latest/moving.html) for moving to
|
|
|
|
the GLFW 3 API.
|
2013-02-04 04:46:02 -05:00
|
|
|
|
|
|
|
|
2013-10-27 07:50:33 -04:00
|
|
|
## Compiling GLFW
|
2013-10-21 16:23:15 -04:00
|
|
|
|
2013-10-27 07:50:33 -04:00
|
|
|
See the [Compiling GLFW](http://www.glfw.org/docs/latest/compile.html) guide in
|
|
|
|
the GLFW documentation.
|
2013-02-04 04:46:02 -05:00
|
|
|
|
|
|
|
|
|
|
|
## Using GLFW
|
|
|
|
|
2013-10-27 07:50:33 -04:00
|
|
|
See the
|
|
|
|
[Building programs that use GLFW](http://www.glfw.org/docs/latest/build.html)
|
|
|
|
guide in the GLFW documentation.
|
2013-02-04 04:46:02 -05:00
|
|
|
|
|
|
|
|
2014-10-12 09:47:38 -04:00
|
|
|
## Reporting bugs
|
|
|
|
|
|
|
|
Bugs are reported to our [issue tracker](https://github.com/glfw/glfw/issues).
|
|
|
|
Please always include the name and version of the OS where the bug occurs and
|
|
|
|
the version of GLFW used. If you have cloned it, include the commit ID used.
|
|
|
|
|
|
|
|
If it's a build issue, please also include the build log and the name and
|
|
|
|
version of your development environment.
|
|
|
|
|
|
|
|
If it's a context creation issue, please also include the make and model of your
|
|
|
|
graphics card and the version of your driver.
|
|
|
|
|
|
|
|
This will help both us and other people experiencing the same bug.
|
|
|
|
|
|
|
|
|
2014-01-11 23:40:36 -05:00
|
|
|
## Dependencies
|
|
|
|
|
2015-10-24 15:46:19 -04:00
|
|
|
GLFW itself needs 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
|
2015-08-10 14:19:04 -04:00
|
|
|
rendering API (OpenGL, OpenGL ES, Vulkan) to enable support for them.
|
2015-10-24 15:46:19 -04:00
|
|
|
|
2016-02-08 10:23:44 -05:00
|
|
|
The examples and test programs depend on a number of tiny libraries. These are
|
|
|
|
located in the `deps/` directory.
|
2014-01-11 23:40:36 -05:00
|
|
|
|
2014-06-18 10:13:49 -04:00
|
|
|
- [getopt\_port](https://github.com/kimgr/getopt_port/) for examples
|
|
|
|
with command-line options
|
2014-10-14 21:55:25 -04:00
|
|
|
- [TinyCThread](https://github.com/tinycthread/tinycthread) for threaded
|
2014-06-18 10:13:49 -04:00
|
|
|
examples
|
|
|
|
- An OpenGL 3.2 core loader generated by
|
|
|
|
[glad](https://github.com/Dav1dde/glad) for examples using modern OpenGL
|
2015-08-09 10:58:25 -04:00
|
|
|
- [linmath.h](https://github.com/datenwolf/linmath.h) for linear algebra in
|
|
|
|
examples
|
2016-02-19 08:38:04 -05:00
|
|
|
- [Vulkan headers](https://www.khronos.org/registry/vulkan/) for Vulkan tests
|
2014-01-11 23:40:36 -05:00
|
|
|
|
2015-08-10 14:19:04 -04:00
|
|
|
The Vulkan example additionally requires the Vulkan SDK to be installed, or it
|
|
|
|
will not be included in the build.
|
|
|
|
|
2016-02-08 10:23:44 -05:00
|
|
|
The documentation is generated with [Doxygen](http://doxygen.org/). If CMake
|
|
|
|
does not find Doxygen, the documentation will not be generated.
|
|
|
|
|
2014-01-11 23:40:36 -05:00
|
|
|
|
2013-06-13 09:09:10 -04:00
|
|
|
## Changelog
|
2013-02-04 04:46:02 -05:00
|
|
|
|
2015-08-10 14:19:04 -04:00
|
|
|
- Added `glfwVulkanSupported`, `glfwGetRequiredInstanceExtensions`,
|
|
|
|
`glfwGetInstanceProcAddress`, `glfwGetPhysicalDevicePresentationSupport` and
|
|
|
|
`glfwCreateWindowSurface` for platform independent Vulkan support
|
2016-02-22 04:50:13 -05:00
|
|
|
- Added `glfwMaximizeWindow` and `GLFW_MAXIMIZED` for window maximization
|
2016-02-21 09:42:49 -05:00
|
|
|
- Added `glfwFocusWindow` for giving windows input focus
|
2014-02-12 20:57:59 -05:00
|
|
|
- Added `glfwSetWindowSizeLimits` and `glfwSetWindowAspectRatio` for setting
|
|
|
|
absolute and relative window size limits
|
2015-07-02 08:24:50 -04:00
|
|
|
- Added `glfwGetKeyName` for querying the layout-specific name of printable
|
|
|
|
keys
|
2015-06-18 08:03:02 -04:00
|
|
|
- Added `GLFW_NO_API` for creating window without contexts
|
2015-08-10 06:46:14 -04:00
|
|
|
- Added `GLFW_CONTEXT_NO_ERROR` context hint for `GL_KHR_no_error` support
|
2015-08-10 14:19:04 -04:00
|
|
|
- Added `GLFW_INCLUDE_VULKAN` for including the Vulkan header
|
2015-10-17 19:20:31 -04:00
|
|
|
- Added `GLFW_TRUE` and `GLFW_FALSE` as client API independent boolean values
|
2015-11-09 17:32:35 -05:00
|
|
|
- Added `glfwGetGLXWindow` to query the `GLXWindow` of a window
|
2015-12-12 14:35:26 -05:00
|
|
|
- Added icons to examples on Windows and OS X
|
2015-11-10 08:57:30 -05:00
|
|
|
- Relaxed rules for native access header macros
|
2015-10-17 19:20:31 -04:00
|
|
|
- Removed dependency on external OpenGL or OpenGL ES headers
|
2015-12-12 14:35:26 -05:00
|
|
|
- Removed `_GLFW_USE_OPENGL`, `_GLFW_USE_GLESV1` and `_GLFW_USE_GLESV2`
|
|
|
|
configuration macros
|
2015-11-01 11:29:13 -05:00
|
|
|
- [Win32] Added support for Windows 8.1 per-monitor DPI
|
2015-12-06 08:55:57 -05:00
|
|
|
- [Win32] Bugfix: Window creation would segfault if video mode setting required
|
|
|
|
the system to be restarted
|
2015-12-12 12:07:05 -05:00
|
|
|
- [Win32] Bugfix: MinGW import library lacked the `lib` prefix
|
2015-12-12 14:35:26 -05:00
|
|
|
- [Win32] Bugfix: Monitor connection and disconnection events were not reported
|
|
|
|
when no windows existed
|
2016-02-23 05:27:33 -05:00
|
|
|
- [Win32] Bugfix: Activating or deactivating displays in software did not
|
|
|
|
trigger monitor callback
|
2015-10-18 18:46:26 -04:00
|
|
|
- [Win32] Bugfix: No monitors were listed on headless and VMware guest systems
|
2015-10-18 13:15:36 -04:00
|
|
|
- [Cocoa] Removed support for OS X 10.6
|
2015-12-07 15:03:24 -05:00
|
|
|
- [Cocoa] Bugfix: Full screen windows on secondary monitors were mispositioned
|
2016-02-08 14:21:48 -05:00
|
|
|
- [Cocoa] Bugfix: Connecting a joystick that reports no name would segfault
|
2016-02-26 02:37:30 -05:00
|
|
|
- [Cocoa] Bugfix: Modifier flags cache was not updated when window became key
|
2015-11-13 11:19:20 -05:00
|
|
|
- [Cocoa] Bugfix: Dead key character composition did not work
|
2015-06-14 15:05:42 -04:00
|
|
|
- [X11] Bugfix: Monitor connection and disconnection events were not reported
|
2015-10-27 18:01:02 -04:00
|
|
|
- [X11] Bugfix: Decoding of UTF-8 text from XIM could continue past the end
|
2016-01-31 12:00:22 -05:00
|
|
|
- [X11] Bugfix: An XKB structure was leaked during `glfwInit`
|
2016-02-21 12:17:04 -05:00
|
|
|
- [X11] Bugfix: XInput2 `XI_Motion` events interfered with the Steam overlay
|
2015-10-28 17:57:57 -04:00
|
|
|
- [POSIX] Bugfix: An unrelated TLS key could be deleted by `glfwTerminate`
|
2015-12-12 14:35:26 -05:00
|
|
|
- [WGL] Changed extension loading to only be performed once
|
2015-10-17 19:20:31 -04:00
|
|
|
- [WGL] Removed dependency on external WGL headers
|
2015-10-15 14:10:24 -04:00
|
|
|
- [GLX] Replaced legacy renderable with `GLXWindow`
|
2015-10-17 19:20:31 -04:00
|
|
|
- [GLX] Removed dependency on external GLX headers
|
2015-11-17 17:29:08 -05:00
|
|
|
- [GLX] Bugfix: NetBSD does not provide `libGL.so.1`
|
2015-12-12 14:35:26 -05:00
|
|
|
- [EGL] Added `_GLFW_USE_EGLPLATFORM_H` configuration macro for controlling
|
|
|
|
whether to use an existing `EGL/eglplatform.h` header
|
2016-01-31 13:17:18 -05:00
|
|
|
- [EGL] Added and documented test for if the context is current on the calling
|
|
|
|
thread during buffer swap
|
2015-10-17 19:20:31 -04:00
|
|
|
- [EGL] Removed dependency on external EGL headers
|
2015-08-23 13:30:04 -04:00
|
|
|
|
2013-02-04 04:46:02 -05:00
|
|
|
|
|
|
|
## Contact
|
|
|
|
|
|
|
|
The official website for GLFW is [glfw.org](http://www.glfw.org/). There you
|
|
|
|
can find the latest version of GLFW, as well as news, documentation and other
|
|
|
|
information about the project.
|
|
|
|
|
|
|
|
If you have questions related to the use of GLFW, we have a
|
|
|
|
[support forum](https://sourceforge.net/p/glfw/discussion/247562/), and the IRC
|
|
|
|
channel `#glfw` on [Freenode](http://freenode.net/).
|
|
|
|
|
|
|
|
If you have a bug to report, a patch to submit or a feature you'd like to
|
2013-06-24 08:28:42 -04:00
|
|
|
request, please file it in the
|
|
|
|
[issue tracker](https://github.com/glfw/glfw/issues) on GitHub.
|
2013-02-04 04:46:02 -05:00
|
|
|
|
|
|
|
Finally, if you're interested in helping out with the development of GLFW or
|
2015-05-14 11:14:30 -04:00
|
|
|
porting it to your favorite platform, join us on GitHub or IRC.
|
2013-02-04 04:46:02 -05:00
|
|
|
|
|
|
|
|
|
|
|
## Acknowledgements
|
|
|
|
|
|
|
|
GLFW exists because people around the world donated their time and lent their
|
|
|
|
skills.
|
|
|
|
|
2013-06-09 06:49:13 -04:00
|
|
|
- Bobyshev Alexander
|
|
|
|
- artblanc
|
2013-07-30 09:52:23 -04:00
|
|
|
- arturo
|
2013-06-09 06:49:13 -04:00
|
|
|
- Matt Arsenault
|
|
|
|
- Keith Bauer
|
|
|
|
- John Bartholomew
|
2013-06-16 06:35:46 -04:00
|
|
|
- Niklas Behrens
|
2013-06-09 06:49:13 -04:00
|
|
|
- Niklas Bergström
|
2013-08-16 11:48:11 -04:00
|
|
|
- Doug Binks
|
2013-06-09 06:49:13 -04:00
|
|
|
- blanco
|
2014-08-10 10:35:09 -04:00
|
|
|
- Martin Capitanio
|
2015-04-09 10:09:39 -04:00
|
|
|
- Chi-kwan Chan
|
2013-06-09 06:49:13 -04:00
|
|
|
- Lambert Clara
|
2013-10-06 05:37:16 -04:00
|
|
|
- Andrew Corrigan
|
2013-06-09 06:49:13 -04:00
|
|
|
- Noel Cower
|
|
|
|
- Jarrod Davis
|
|
|
|
- Olivier Delannoy
|
|
|
|
- Paul R. Deppe
|
2014-02-13 18:45:27 -05:00
|
|
|
- Michael Dickens
|
2015-10-28 17:57:57 -04:00
|
|
|
- Роман Донченко
|
2015-11-13 11:19:20 -05:00
|
|
|
- Mario Dorn
|
2013-06-09 06:49:13 -04:00
|
|
|
- Jonathan Dummer
|
|
|
|
- Ralph Eastwood
|
2015-03-17 11:33:21 -04:00
|
|
|
- Siavash Eliasi
|
2013-12-10 07:45:21 -05:00
|
|
|
- Michael Fogleman
|
2013-12-11 08:41:51 -05:00
|
|
|
- Gerald Franz
|
2013-06-09 06:49:13 -04:00
|
|
|
- GeO4d
|
|
|
|
- Marcus Geelnard
|
2014-09-09 17:15:52 -04:00
|
|
|
- Eloi Marín Gratacós
|
2013-06-09 06:49:13 -04:00
|
|
|
- Stefan Gustavson
|
|
|
|
- Sylvain Hellegouarch
|
2014-03-10 11:50:20 -04:00
|
|
|
- Matthew Henry
|
2013-06-09 06:49:13 -04:00
|
|
|
- heromyth
|
2014-09-20 20:13:41 -04:00
|
|
|
- Lucas Hinderberger
|
2013-06-16 12:32:16 -04:00
|
|
|
- Paul Holden
|
2015-06-26 07:31:37 -04:00
|
|
|
- Aaron Jacobs
|
2013-06-09 06:49:13 -04:00
|
|
|
- Toni Jovanoski
|
2014-05-02 01:39:21 -04:00
|
|
|
- Arseny Kapoulkine
|
2013-06-09 06:49:13 -04:00
|
|
|
- Osman Keskin
|
|
|
|
- Cameron King
|
|
|
|
- Peter Knut
|
2015-08-10 14:19:04 -04:00
|
|
|
- Christoph Kubisch
|
2015-04-14 15:15:50 -04:00
|
|
|
- Eric Larson
|
2013-06-09 06:49:13 -04:00
|
|
|
- Robin Leffmann
|
|
|
|
- Glenn Lewis
|
|
|
|
- Shane Liesegang
|
2015-08-14 07:49:52 -04:00
|
|
|
- Eyal Lotem
|
2013-06-09 06:49:13 -04:00
|
|
|
- Дмитри Малышев
|
|
|
|
- Martins Mozeiko
|
|
|
|
- Tristam MacDonald
|
|
|
|
- Hans Mackowiak
|
2016-02-01 18:04:15 -05:00
|
|
|
- Zbigniew Mandziejewicz
|
2013-06-16 12:40:10 -04:00
|
|
|
- Kyle McDonald
|
2013-06-09 06:49:13 -04:00
|
|
|
- David Medlock
|
2015-02-22 23:14:24 -05:00
|
|
|
- Bryce Mehring
|
2013-06-09 06:49:13 -04:00
|
|
|
- Jonathan Mercier
|
|
|
|
- Marcel Metz
|
2015-01-23 16:53:41 -05:00
|
|
|
- Jonathan Miller
|
2013-06-09 06:49:13 -04:00
|
|
|
- Kenneth Miller
|
2013-07-01 07:18:05 -04:00
|
|
|
- Bruce Mitchener
|
2013-10-28 08:22:34 -04:00
|
|
|
- Jack Moffitt
|
2013-06-09 06:49:13 -04:00
|
|
|
- Jeff Molofee
|
|
|
|
- Jon Morton
|
2013-09-13 08:41:13 -04:00
|
|
|
- Pierre Moulon
|
2013-06-09 06:49:13 -04:00
|
|
|
- Julian Møller
|
2013-11-13 06:59:49 -05:00
|
|
|
- Kamil Nowakowski
|
2013-06-17 05:58:46 -04:00
|
|
|
- Ozzy
|
2013-10-09 13:03:47 -04:00
|
|
|
- Andri Pálsson
|
2013-06-09 06:49:13 -04:00
|
|
|
- Peoro
|
|
|
|
- Braden Pellett
|
|
|
|
- Arturo J. Pérez
|
2015-04-19 07:27:27 -04:00
|
|
|
- Emmanuel Gil Peyrot
|
2014-11-27 09:39:24 -05:00
|
|
|
- Cyril Pichard
|
2013-10-09 17:58:43 -04:00
|
|
|
- Pieroman
|
2013-06-09 06:49:13 -04:00
|
|
|
- Jorge Rodriguez
|
|
|
|
- Ed Ropple
|
2015-01-23 12:38:12 -05:00
|
|
|
- Aleksey Rybalkin
|
2013-06-09 06:49:13 -04:00
|
|
|
- Riku Salminen
|
2014-11-06 17:57:53 -05:00
|
|
|
- Brandon Schaefer
|
2013-06-09 06:49:13 -04:00
|
|
|
- Sebastian Schuberth
|
|
|
|
- Matt Sealey
|
|
|
|
- SephiRok
|
|
|
|
- Steve Sexton
|
2013-10-09 13:45:39 -04:00
|
|
|
- Systemcluster
|
2016-02-26 04:46:49 -05:00
|
|
|
- Yoshiki Shibukawa
|
2013-06-09 06:49:13 -04:00
|
|
|
- Dmitri Shuralyov
|
|
|
|
- Daniel Skorupski
|
|
|
|
- Bradley Smith
|
|
|
|
- Julian Squires
|
|
|
|
- Johannes Stein
|
2013-06-17 11:42:22 -04:00
|
|
|
- Justin Stoecker
|
2015-04-09 08:03:26 -04:00
|
|
|
- Elviss Strazdins
|
2013-06-09 06:49:13 -04:00
|
|
|
- Nathan Sweet
|
|
|
|
- TTK-Bandit
|
|
|
|
- Sergey Tikhomirov
|
2015-03-10 07:01:38 -04:00
|
|
|
- A. Tombs
|
2013-06-09 06:49:13 -04:00
|
|
|
- Samuli Tuomola
|
2013-10-07 09:30:57 -04:00
|
|
|
- urraka
|
2013-06-09 06:49:13 -04:00
|
|
|
- Jari Vetoniemi
|
2014-07-01 04:49:50 -04:00
|
|
|
- Ricardo Vieira
|
2016-02-01 18:06:56 -05:00
|
|
|
- Nicholas Vitovitch
|
2013-06-09 06:49:13 -04:00
|
|
|
- Simon Voordouw
|
|
|
|
- Torsten Walluhn
|
2014-10-21 01:41:58 -04:00
|
|
|
- Patrick Walton
|
2015-07-26 21:40:54 -04:00
|
|
|
- Xo Wang
|
2013-06-09 06:49:13 -04:00
|
|
|
- Jay Weisskopf
|
|
|
|
- Frank Wille
|
|
|
|
- yuriks
|
|
|
|
- Santi Zupancic
|
2014-03-18 16:43:24 -04:00
|
|
|
- Jonas Ådahl
|
2013-06-09 06:49:13 -04:00
|
|
|
- Lasse Öörni
|
|
|
|
- All the unmentioned and anonymous contributors in the GLFW community, for bug
|
2013-02-04 04:46:02 -05:00
|
|
|
reports, patches, feedback, testing and encouragement
|
|
|
|
|