2013-06-13 09:07:28 -04:00
|
|
|
# GLFW
|
2013-02-04 04:46:02 -05:00
|
|
|
|
|
|
|
## Introduction
|
|
|
|
|
2014-02-10 09:33:41 -05:00
|
|
|
GLFW is a free, Open Source, multi-platform library for OpenGL and OpenGL ES
|
2013-02-04 04:46:02 -05:00
|
|
|
application development. It provides a simple, platform-independent API for
|
|
|
|
creating windows and contexts, reading input, handling events, etc.
|
|
|
|
|
2014-01-01 09:29:57 -05:00
|
|
|
Version 3.1 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
|
2013-07-10 09:51:10 -04:00
|
|
|
[introductory 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
|
|
|
|
2014-04-08 11:45:04 -04:00
|
|
|
Note that a number of source files have been added or renamed in 3.1, which may
|
|
|
|
require you to update any custom build files you have.
|
|
|
|
|
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
|
|
|
|
|
|
|
|
GLFW bundles a number of dependencies in the `deps/` directory.
|
|
|
|
|
2014-06-18 10:13:49 -04:00
|
|
|
- [Khronos extension headers](https://www.opengl.org/registry/) for API
|
|
|
|
extension symbols used by GLFW
|
|
|
|
- [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
|
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
|
|
|
|
2014-03-20 06:29:48 -04:00
|
|
|
- Added `GLFWcursor` custom system cursor handle
|
2014-09-02 10:52:16 -04:00
|
|
|
- Added `glfwCreateCursor`, `glfwCreateStandardCursor`, `glfwDestroyCursor` and
|
|
|
|
`glfwSetCursor` for managing system cursor images
|
2014-03-20 06:29:48 -04:00
|
|
|
- Added `GLFWimage` struct for passing 32-bit RGBA images
|
2014-10-28 10:35:03 -04:00
|
|
|
- Added monitor and adapter identifier access to native API
|
2013-12-22 13:28:46 -05:00
|
|
|
- Added `glfwSetDropCallback` and `GLFWdropfun` for receiving dropped files
|
2014-03-19 18:01:20 -04:00
|
|
|
- Added `glfwPostEmptyEvent` for allowing secondary threads to cause
|
2014-03-19 20:01:00 -04:00
|
|
|
`glfwWaitEvents` to return
|
2014-03-09 12:18:39 -04:00
|
|
|
- Added `empty` test program for verifying posting of empty events
|
2014-06-12 17:04:20 -04:00
|
|
|
- Added `glfwSetCharModsCallback` for receiving character events with modifiers
|
2014-03-25 16:30:13 -04:00
|
|
|
- Added `glfwGetWindowFrameSize` for retrieving the size of the frame around
|
|
|
|
the client area of a window
|
2014-04-08 09:32:34 -04:00
|
|
|
- Added `GLFW_AUTO_ICONIFY` for controlling whether full screen windows
|
|
|
|
automatically iconify (and restore the previous video mode) on focus loss
|
2014-04-08 12:57:43 -04:00
|
|
|
- Added `GLFW_DONT_CARE` for indicating that any value is acceptable
|
2014-04-24 13:21:10 -04:00
|
|
|
- Added `GLFW_DOUBLEBUFFER` for controlling whether to use double buffering
|
2014-08-21 13:21:45 -04:00
|
|
|
- Added `GLFW_CONTEXT_RELEASE_BEHAVIOR` and values
|
|
|
|
`GLFW_ANY_RELEASE_BEHAVIOR`, `GLFW_RELEASE_BEHAVIOR_FLUSH` and
|
|
|
|
`GLFW_RELEASE_BEHAVIOR_NONE` for `GL_KHR_context_flush_control` support
|
2014-03-19 18:01:20 -04:00
|
|
|
- Added `GLFW_INCLUDE_ES31` for including the OpenGL ES 3.1 header
|
2014-05-23 08:01:02 -04:00
|
|
|
- Added `GLFW_FLOATING` for creating always-on-top windowed mode windows
|
2014-06-20 07:39:06 -04:00
|
|
|
- Added `GLFW_FOCUSED` window hint for controlling initial input focus
|
2014-03-19 11:00:12 -04:00
|
|
|
- Added *partial and experimental* support for Wayland
|
2014-11-06 17:57:53 -05:00
|
|
|
- Added *partial and experimental* support for Mir
|
2014-10-06 17:52:10 -04:00
|
|
|
- Changed the default of `GLFW_REFRESH_RATE` to `GLFW_DONT_CARE` to maintain
|
|
|
|
the default behavior
|
2014-10-07 06:48:01 -04:00
|
|
|
- Changed static library to build as position independent code for easier use
|
|
|
|
from the Rust language
|
2014-03-06 08:48:44 -05:00
|
|
|
- Bugfix: The debug context attribute was set from `GL_ARB_debug_output` even
|
|
|
|
when a debug context had not been requested
|
2014-03-06 14:42:47 -05:00
|
|
|
- Bugfix: The particles example was not linked against the threading library
|
2014-06-18 11:10:26 -04:00
|
|
|
- Bugfix: The cursor was not positioned over newly created full screen windows
|
2014-02-10 07:45:13 -05:00
|
|
|
- [Cocoa] Added `_GLFW_USE_RETINA` to control whether windows will use the full
|
|
|
|
resolution on Retina displays
|
2014-12-29 12:15:12 -05:00
|
|
|
- [Cocoa] Made content view subclass of `NSOpenGLView`
|
2014-01-13 17:27:11 -05:00
|
|
|
- [Cocoa] Bugfix: Using a 1x1 cursor for hidden mode caused some screen
|
|
|
|
recorders to fail
|
2014-02-10 08:27:49 -05:00
|
|
|
- [Cocoa] Bugfix: Some Core Foundation objects were leaked during joystick
|
2014-05-29 07:19:08 -04:00
|
|
|
enumeration and termination
|
2014-03-10 13:41:52 -04:00
|
|
|
- [Cocoa] Bugfix: One copy of each display name string was leaked
|
2014-03-25 14:37:25 -04:00
|
|
|
- [Cocoa] Bugfix: Monitor enumeration caused a segfault if no `NSScreen` was
|
|
|
|
found for a given `CGDisplay`
|
2014-06-17 05:29:34 -04:00
|
|
|
- [Cocoa] Bugfix: Modifier key events were lost if the corresponding modifier
|
|
|
|
bit field was unchanged
|
2014-05-02 01:39:21 -04:00
|
|
|
- [Cocoa] Bugfix: Joystick enumeration took hundreds of ms on some systems
|
2014-08-13 03:15:48 -04:00
|
|
|
- [Cocoa] Bugfix: The cursor was hidden when the user resized a GLFW window
|
2014-12-27 16:28:13 -05:00
|
|
|
- [Cocoa] Bugfix: The 10.10 Yosemite OpenGL 4.1 profile token was not used
|
2014-12-27 16:31:30 -05:00
|
|
|
- [Cocoa] Bugfix: The generic software OpenGL renderer could be selected under
|
|
|
|
certain conditions
|
2014-02-10 09:30:51 -05:00
|
|
|
- [Win32] Enabled generation of pkg-config file for MinGW
|
2014-08-15 08:50:41 -04:00
|
|
|
- [Win32] Removed option to require explicitly linking against `winmm.dll`
|
2014-01-29 09:14:49 -05:00
|
|
|
- [Win32] Bugfix: Failure to load winmm or its functions was not reported to
|
|
|
|
the error callback
|
2014-03-21 07:59:29 -04:00
|
|
|
- [Win32] Bugfix: Some keys were reported based on the current layout instead
|
|
|
|
of their physical location
|
2014-05-19 05:54:54 -04:00
|
|
|
- [Win32] Bugfix: Maximized hidden windows were restored by `glfwShowWindow`
|
2014-06-23 14:29:25 -04:00
|
|
|
- [Win32] Bugfix: Context re-creation was not triggered by sRGB hint
|
2014-09-10 07:40:40 -04:00
|
|
|
- [Win32] Bugfix: Full screen windows were incorrectly sized and placed on some
|
|
|
|
systems
|
2014-09-12 08:40:17 -04:00
|
|
|
- [Win32] Bugfix: Gamma ramp functions acted on entire desktop instead of the
|
|
|
|
specified monitor
|
2014-09-15 11:08:50 -04:00
|
|
|
- [Win32] Bugfix: The wrong incorrect physical size was returned for
|
|
|
|
non-primary monitors
|
2014-10-26 08:53:45 -04:00
|
|
|
- [Win32] Bugfix: X-axis scroll offsets were inverted
|
2014-12-11 07:31:08 -05:00
|
|
|
- [Win32] Bugfix: The Optimus HPG forcing variable was not correctly exported
|
2014-04-24 01:10:58 -04:00
|
|
|
- [X11] Added run-time support for systems lacking the XKB extension
|
2014-03-06 10:45:40 -05:00
|
|
|
- [X11] Made GLX 1.3 the minimum supported version
|
2014-09-09 17:15:52 -04:00
|
|
|
- [X11] Replaced `XRRGetScreenResources` with `XRRGetScreenResourcesCurrent`
|
|
|
|
for monitor property retrieval
|
2014-01-22 10:39:34 -05:00
|
|
|
- [X11] Bugfix: The case of finding no usable CRTCs was not detected
|
2014-01-22 11:24:00 -05:00
|
|
|
- [X11] Bugfix: Detection of broken Nvidia RandR gamma support did not verify
|
|
|
|
that at least one CRTC was present
|
2014-02-11 09:46:54 -05:00
|
|
|
- [X11] Bugfix: A stale `_NET_SUPPORTING_WM_CHECK` root window property would
|
|
|
|
cause an uncaught `BadWindow` error
|
2014-06-24 07:24:54 -04:00
|
|
|
- [X11] Bugfix: No check was made for the presence of GLX 1.3 when
|
2014-03-06 10:45:40 -05:00
|
|
|
`GLX_SGIX_fbconfig` was unavailable
|
2014-03-09 08:24:17 -04:00
|
|
|
- [X11] Bugfix: The message type of ICCCM protocol events was not checked
|
2014-06-24 07:24:54 -04:00
|
|
|
- [X11] Bugfix: `glfwDestroyWindow` did not flush the output buffer
|
2014-04-02 07:29:07 -04:00
|
|
|
- [X11] Bugfix: Window frame interactions were reported as focus events
|
2014-04-08 08:11:18 -04:00
|
|
|
- [X11] Bugfix: Workaround for legacy Compiz caused flickering during resize
|
2014-05-16 05:25:34 -04:00
|
|
|
- [X11] Bugfix: The name pointer of joysticks were not cleared on disconnection
|
2014-08-10 10:35:09 -04:00
|
|
|
- [X11] Bugfix: Video mode dimensions were not rotated to match the CRTC
|
2014-09-20 20:13:41 -04:00
|
|
|
- [X11] Bugfix: Unicode character input ignored dead keys
|
2014-10-26 08:53:45 -04:00
|
|
|
- [X11] Bugfix: X-axis scroll offsets were inverted
|
2014-11-27 09:39:24 -05:00
|
|
|
- [X11] Bugfix: Full screen override redirect windows were not always
|
|
|
|
positioned over the specified monitor
|
2014-12-17 20:52:06 -05:00
|
|
|
- [X11] Bugfix: Character input did not work for the default `"C"` locale
|
2013-10-16 11:24:37 -04:00
|
|
|
- [X11] Bugfix: Joysticks connected after `glfwInit` were not detected
|
|
|
|
(temporary inotify solution until proper libudev solution)
|
2014-01-06 09:34:49 -05: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
|
2013-06-24 08:28:42 -04:00
|
|
|
porting it to your favorite platform, we have an occasionally active
|
2013-02-04 04:46:02 -05:00
|
|
|
[developer's mailing list](https://lists.stacken.kth.se/mailman/listinfo/glfw-dev),
|
|
|
|
or you could join us on `#glfw`.
|
|
|
|
|
|
|
|
|
|
|
|
## 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
|
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
|
2013-06-09 06:49:13 -04:00
|
|
|
- Jonathan Dummer
|
|
|
|
- Ralph Eastwood
|
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
|
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
|
|
|
|
- Robin Leffmann
|
|
|
|
- Glenn Lewis
|
|
|
|
- Shane Liesegang
|
|
|
|
- Дмитри Малышев
|
|
|
|
- Martins Mozeiko
|
|
|
|
- Tristam MacDonald
|
|
|
|
- Hans Mackowiak
|
2013-06-16 12:40:10 -04:00
|
|
|
- Kyle McDonald
|
2013-06-09 06:49:13 -04:00
|
|
|
- David Medlock
|
|
|
|
- Jonathan Mercier
|
|
|
|
- Marcel Metz
|
|
|
|
- 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
|
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
|
|
|
|
- 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
|
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
|
2013-06-09 06:49:13 -04:00
|
|
|
- Nathan Sweet
|
|
|
|
- TTK-Bandit
|
|
|
|
- Sergey Tikhomirov
|
|
|
|
- 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
|
2013-06-09 06:49:13 -04:00
|
|
|
- Simon Voordouw
|
|
|
|
- Torsten Walluhn
|
2014-10-21 01:41:58 -04:00
|
|
|
- Patrick Walton
|
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
|
|
|
|
|