GLFW

Short description: Software library

GLFWDeveloper(s)| The GLFW Development Team

|

Stable release|

3.3.9 / December 13, 2023; 2 years ago (2023-12-13)[1]

Written in| C
Operating system| Linux, macOS, Microsoft Windows, FreeBSD, NetBSD, OpenBSD
Platform| Cross-platform
Type| API
License| zlib/libpng License[2]
Website| www.glfw.org

GLFW (Graphics Library Framework) 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 handle joystick, keyboard and mouse input.[3]

## Contents

* 1 Software architecture
* 1.1 Programming language bindings
* 1.2 Back-ends
* 2 See also
* 3 References
* 4 External links

## 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 the keyboard, mouse, and joysticks.[4] 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 a platform-specific API.

GLFW is used in programs that require a window, due to OpenGL not providing any mechanisms for creating the necessary contexts, managing windows, user input, timing, etc.[5] 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 not a user-interface library, platform-specific library, image-loading library or a threading library. Additionally, it cannot render independently or playback sound. [6]

### 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, Delphi, Go, Harbour, Haskell, Java, Julia, Python, Rebol, Red, Ruby and Rust, among others.[7]

### Back-ends

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

## See also

* GLUT – OpenGL's legacy windowing toolkit
* OpenGL Extension Wrangler Library
* Raylib
* Simple DirectMedia Layer

## References

1. ↑ "Releases · glfw/glfw". https://github.com/glfw/glfw/releases.
2. ↑ "License | GLFW". https://www.glfw.org/license.html.
3. ↑ "GLFW homepage". https://www.glfw.org/.
4. ↑ "GLFW: Input guide". https://www.glfw.org/docs/3.3/input_guide.html.
5. ↑ "LearnOpenGL - Creating a window". https://learnopengl.com/Getting-started/Creating-a-window.
6. ↑ "GLFW – FAQ". http://www.glfw.org/faq.html.
7. ↑ "GLFW Programming language bindings". https://www.glfw.org/community.html#bindings.
8. ↑ "GLFW: New features in 3.2". http://www.glfw.org/docs/3.2/news.html.

## External links

* on GitHub

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/GLFW. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:GLFW&oldid=741432"