1# GLFW 2 3[](https://github.com/glfw/glfw/actions) 4[](https://ci.appveyor.com/project/elmindreda/glfw) 5 6## Introduction 7 8GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan 9application development. It provides a simple, platform-independent API for 10creating windows, contexts and surfaces, reading input, handling events, etc. 11 12GLFW natively supports Windows, macOS and Linux and other Unix-like systems. On 13Linux both Wayland and X11 are supported. 14 15GLFW is licensed under the [zlib/libpng 16license](https://www.glfw.org/license.html). 17 18You can [download](https://www.glfw.org/download.html) the latest stable release 19as source or Windows binaries. Each release starting with 3.0 also has 20a corresponding [annotated tag](https://github.com/glfw/glfw/releases) with 21source and binary archives. 22 23The [documentation](https://www.glfw.org/docs/latest/) is available online and is 24included in all source and binary archives. See the [release 25notes](https://www.glfw.org/docs/latest/news.html) for new features, caveats and 26deprecations in the latest release. For more details see the [version 27history](https://www.glfw.org/changelog.html). 28 29The `master` branch is the stable integration branch and _should_ always compile 30and run on all supported platforms, although details of newly added features may 31change until they have been included in a release. New features and many bug 32fixes live in [other branches](https://github.com/glfw/glfw/branches/all) until 33they are stable enough to merge. 34 35If you are new to GLFW, you may find the 36[tutorial](https://www.glfw.org/docs/latest/quick.html) for GLFW 3 useful. If 37you have used GLFW 2 in the past, there is a [transition 38guide](https://www.glfw.org/docs/latest/moving.html) for moving to the GLFW 393 API. 40 41GLFW exists because of the contributions of [many people](CONTRIBUTORS.md) 42around the world, whether by reporting bugs, providing community support, adding 43features, reviewing or testing code, debugging, proofreading docs, suggesting 44features or fixing bugs. 45 46 47## Compiling GLFW 48 49GLFW is written primarily in C99, with parts of macOS support being written in 50Objective-C. GLFW itself requires only the headers and libraries for your OS 51and window system. It does not need any additional headers for context creation 52APIs (WGL, GLX, EGL, NSGL, OSMesa) or rendering APIs (OpenGL, OpenGL ES, Vulkan) 53to enable support for them. 54 55GLFW supports compilation on Windows with Visual C++ 2013 and later, MinGW and 56MinGW-w64, on macOS with Clang and on Linux and other Unix-like systems with GCC 57and Clang. It will likely compile in other environments as well, but this is 58not regularly tested. 59 60There are [pre-compiled binaries](https://www.glfw.org/download.html) available 61for all supported compilers on Windows and macOS. 62 63See the [compilation guide](https://www.glfw.org/docs/latest/compile.html) for 64more information about how to compile GLFW yourself. 65 66 67## Using GLFW 68 69See the [documentation](https://www.glfw.org/docs/latest/) for tutorials, guides 70and the API reference. 71 72 73## Contributing to GLFW 74 75See the [contribution 76guide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for 77more information. 78 79 80## System requirements 81 82GLFW supports Windows XP and later and macOS 10.11 and later. Linux and other 83Unix-like systems running the X Window System are supported even without 84a desktop environment or modern extensions, although some features require 85a running window or clipboard manager. The OSMesa backend requires Mesa 6.3. 86 87See the [compatibility guide](https://www.glfw.org/docs/latest/compat.html) 88in the documentation for more information. 89 90 91## Dependencies 92 93GLFW itself needs only CMake 3.4 or later and the headers and libraries for your 94OS and window system. 95 96The examples and test programs depend on a number of tiny libraries. These are 97located in the `deps/` directory. 98 99 - [getopt\_port](https://github.com/kimgr/getopt_port/) for examples 100 with command-line options 101 - [TinyCThread](https://github.com/tinycthread/tinycthread) for threaded 102 examples 103 - [glad2](https://github.com/Dav1dde/glad) for loading OpenGL and Vulkan 104 functions 105 - [linmath.h](https://github.com/datenwolf/linmath.h) for linear algebra in 106 examples 107 - [Nuklear](https://github.com/Immediate-Mode-UI/Nuklear) for test and example UI 108 - [stb\_image\_write](https://github.com/nothings/stb) for writing images to disk 109 110The documentation is generated with [Doxygen](https://doxygen.org/) if CMake can 111find that tool. 112 113 114## Reporting bugs 115 116Bugs are reported to our [issue tracker](https://github.com/glfw/glfw/issues). 117Please check the [contribution 118guide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for 119information on what to include when reporting a bug. 120 121 122## Changelog since 3.4 123 124 - Added `GLFW_UNLIMITED_MOUSE_BUTTONS` input mode that allows mouse buttons beyond 125 the limit of the mouse button tokens to be reported (#2423) 126 - [Cocoa] Added `QuartzCore` framework as link-time dependency 127 - [Cocoa] Removed support for OS X 10.10 Yosemite and earlier (#2506) 128 - [Wayland] Bugfix: The fractional scaling related objects were not destroyed 129 - [Wayland] Bugfix: `glfwInit` would segfault on compositor with no seat (#2517) 130 - [Wayland] Bugfix: A drag entering a non-GLFW surface could cause a segfault 131 - [Null] Added Vulkan 'window' surface creation via `VK_EXT_headless_surface` 132 - [Null] Added EGL context creation on Mesa via `EGL_MESA_platform_surfaceless` 133 - [EGL] Allowed native access on Wayland with `GLFW_CONTEXT_CREATION_API` set to 134 `GLFW_NATIVE_CONTEXT_API` (#2518) 135 136 137## Contact 138 139On [glfw.org](https://www.glfw.org/) you can find the latest version of GLFW, as 140well as news, documentation and other information about the project. 141 142If you have questions related to the use of GLFW, we have a 143[forum](https://discourse.glfw.org/). 144 145If you have a bug to report, a patch to submit or a feature you'd like to 146request, please file it in the 147[issue tracker](https://github.com/glfw/glfw/issues) on GitHub. 148 149Finally, if you're interested in helping out with the development of GLFW or 150porting it to your favorite platform, join us on the forum or GitHub. 151 152