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