GLFW


GLFW is a lightweight utility library for use with OpenGL. GLFW stands for Graphics Library Framework. It provides programmers with the ability to create and manage windows and OpenGL contexts, as well as handle joystick, keyboard and mouse input.

Software architecture

GLFW is a small C library that allows the creation and management of windows with OpenGL contexts, making it also possible to use multiple monitors and video modes. It provides access to input from keyboard, mouse and joysticks. The API provides a thin, multi-platform abstraction layer, primarily for applications whose sole graphics output is through the OpenGL API. While GLFW is very useful when developing multi-platform OpenGL applications, single-platform developers can also benefit from avoiding having to deal with different platform-specific APIs.
A possible reason that libraries like GLFW are needed is that OpenGL by itself does not provide any mechanisms for creating the necessary context, managing windows, user input, timing etc. There are several other libraries available for aiding OpenGL development. The most common ones are FreeGLUT and SDL. However, FreeGLUT is mostly concerned with providing a stable clone of GLUT, while SDL is too large for some people and has never had OpenGL as its main focus. GLFW is predicated on the assumption that there is room for a lightweight, modern library for managing OpenGL contexts, windows and input.
GLFW is by design not
Although GLFW is written in C, bindings do exist to use the API with other programming languages including Ada, C#, Common Lisp, D, Go, Haskell, Java, Python, Rebol, Red, Ruby and Rust, among others.

Back-ends

GLFW version 3.2 has experimental support for Wayland through compile-time flags.