GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan development on the desktop. It provides a simple API for creating windows, contexts and surfaces, receiving input and events.

GLFW is written in C and has native support for Windows, OS X and many Unix-like systems using the X Window System, such as Linux and FreeBSD.

GLFW is licensed under the zlib/libpng license.


Gives you a window and OpenGL context with just two function calls
Support for OpenGL, OpenGL ES, Vulkan and related options, flags and extensions
Support for multiple windows, multiple monitors, high-DPI, gamma ramps and clipboard
Support for keyboard, mouse, gamepad, time and window event input, via polling or callbacks
Comes with guides, a tutorial, reference documentation, examples and test programs
Open Source with an OSI-certified license allowing commercial use
Access to native objects and compile-time options for platform specific features
Community-maintained bindings for many different languages

No library can be perfect for everyone. If GLFW isn’t what you’re looking for, there are alternatives.

Version 3.2 released

Posted on

GLFW 3.2 is available for download. It adds support for Vulkan surface creation, window mode switching, window maximization, window input focus control, window size and aspect ratio limits, human-readable key names, window icons, joystick connection events, XInput and DirectInput joystick input, event waiting with timeout, 64-bit integer raw timer, context-less window creation, run-time context creation API selection, adds simpler build-time configuration, improved documentation and fixes for a large number of bugs that together affect all supported platforms.

Version 3.1.2 released

Posted on

GLFW 3.1.2 is available for download. It adds fixes for a large number of bugs that together affect all supported platforms, as well as dynamic loading work that simplifies compilation and linking.

Version 3.1.1 released

Posted on

GLFW 3.1.1 is available for download. It adds fixes for a number of bugs that together affect all supported platforms, most notably workarounds for bugs in some popular window managers.

See the news archive for older posts.