A multi-platform library for OpenGL, OpenGL ES and Vulkan windows, contexts and input
open sourceZlibfree
GLFW is a small C library for OpenGL, OpenGL ES and Vulkan development on the desktop: it creates windows, contexts and surfaces and receives keyboard, mouse, gamepad, time and window events, by polling or callbacks. A window with an OpenGL context takes two function calls, and it handles multiple windows and monitors, high-DPI and gamma ramps, with access to native objects for platform-specific features. It runs on Windows, macOS, Wayland and X11, under the zlib/libpng licence, and the community maintains bindings for many other languages.
Problems it solves
- open a window with an OpenGL context in my C or C++ program
- create a Vulkan surface and window on Windows, macOS and Linux
- read keyboard, mouse and gamepad input for my OpenGL app without a full game engine
Features
- window and OpenGL context in two function calls
- OpenGL, OpenGL ES and Vulkan support
- multiple windows and monitors, high-DPI and gamma ramps
- keyboard, mouse, gamepad, time and window input by polling or callbacks
- access to native objects for platform-specific features
- community bindings for many languages
Alternatives
The same job
These do what GLFW does.
- SDL Simple DirectMedia Layer: cross-platform C library for windows, input, audio and graphics
