GLFW is an 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 supports Windows, macOS, the X Window System and the Wayland protocol.

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 and gamma ramps
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.

Delphi bindings added

Posted on

Erik van Bilsen has written the Delphi bindings DelphiGlfw that cover GLFW 3.2. They support Windows (32-bit and 64-bit) and macOS (32-bit) and come with HTML and HTML Help documentation.

D bindings released

Posted on

Mike Parker has released the D bindings bindbc-glfw that cover GLFW 3.3. They are @nogc and nothrow compatible and can be compiled for compatibility with -betterC.

C# wrapper released

Posted on

Eric Freed has released the cross-platform C# wrapper GLFW.NET that covers GLFW 3.2. It is built on .NET Standard 2.0.

See the news archive for older posts.