GLFW

GLFW
Developer(s) The GLFW Development Team
Stable release 3.1.1 / March 19, 2015[1]
Development status Active
Written in C
Operating system Linux, OS X, Microsoft Windows, FreeBSD
Platform Cross-platform
Type API
License zlib/libpng License[2]
Website www.glfw.org

GLFW is a lightweight utility library for use with OpenGL. It provides programmers with the ability to create and manage windows and OpenGL contexts, as well as receive input from joystick, keyboard, mouse, time and clipboard.

Software architecture

GLFW is a small C library that enables the creation and management of windows with OpenGL contexts, enumerate monitors and video modes as well as handle inputs such as keyboard, mouse, joystick, clipboard and time. GLFW 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 kludgy 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, an Open Source implementation of GLUT, 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

Programming language bindings

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.[3]

Back-ends

GLFW version 3.1 has experimental Wayland and Mir support through compile-time flags that have to be set.[4]

See also

References

  1. "GLFW version history". Retrieved 27 Apr 2015.
  2. "GLFW license". Retrieved 5 July 2013.
  3. "GLFW Programming language bindings". Retrieved 2014-03-04.
  4. "GLFW: New features in 3.1".

External links