GLFW

GLFW

GLFW is an open-source, cross-platform library for creating windows with OpenGL contexts and receiving input and events. It is commonly used in games, scientific visualization, and other graphics-related applications.
GLFW image
opengl windowing input-handling crossplatform

GLFW: Cross-Platform Windowing Library for OpenGLs

An open-source library providing windows with OpenGL contexts and input event handling, ideal for games, scientific visualization, and graphics applications.

What is GLFW?

GLFW is an open-source, cross-platform library for OpenGL, OpenGL ES and Vulkan development on the desktop. It provides functions to create windows, contexts and surfaces, read input, handle events, and interact with the overall system. Some of the key capabilities of GLFW include:

  • Creating and managing windows with OpenGL contexts
  • Reading keyboard, mouse and joystick input
  • Managing multiple contexts and threads
  • Handling events like keyboard/mouse input, window resizing/closing, etc.
  • Retrieving monitor information and video modes
  • Support for multiple platforms including Windows, macOS and Linux

GLFW is written in C and has bindings available for many popular languages like C++, C#, Python, D, Haskell and more. It is very modular and only depends on the standard C library, OpenGL/GLES/Vulkan and OS-specific APIs. This makes it highly portable and easy to integrate into existing projects.

GLFW is commonly used for creating graphical applications and games using OpenGL or other native APIs. Some of the popular applications using GLFW include the OpenGL benchmarking utility gDEBugger, the 3D editor Blender, the game framework OGRE as well as indie games like Super Hexagon. Its cross-platform capabilities, small footprint and liberal license makes GLFW a popular choice for writing portable graphics applications.

GLFW Features

Features

  1. Create and manage windows with OpenGL contexts
  2. Receive input from keyboard, mouse, joystick, etc
  3. Manage events like window resize, input, etc
  4. Multi-monitor and multi-window support
  5. Support for multiple OpenGL versions
  6. Cross-platform - works on Windows, Linux, MacOS
  7. Written in C - can be used from C/C++ applications

Pricing

  • Open Source

Pros

Lightweight and simple

Actively maintained

Good documentation and examples

Permissive license (zlib/libpng)

Cons

Limited to OpenGL only (no Vulkan support)

No higher-level abstractions like sprites, fonts, etc

Requires linking other libraries for audio, image loading, etc


The Best GLFW Alternatives

Top Development and Graphics & Game Libraries and other similar apps like GLFW


DirectX icon

DirectX

DirectX is a collection of application programming interfaces (APIs) developed by Microsoft for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. First released in 1995, DirectX is composed of multiple APIs:- Direct3D for rendering 2D and 3D graphics.- DirectSound for the playback and recording of...
DirectX image
Godot Engine icon

Godot Engine

Godot Engine is a feature-packed, cross-platform game engine designed for 2D and 3D game development. It is completely free and open source under the MIT license.Some key features and capabilities of Godot Engine include:Intuitive and easy-to-use interface for quick development iterationsComprehensive set of 2D and 3D nodes for crafting game...
Godot Engine image
SFML icon

SFML

SFML (Simple and Fast Multimedia Library) is a free, open-source, cross-platform software development library designed to provide a simple application programming interface (API) to various multimedia components. It is written in C++ and has bindings available for various languages such as C, .NET, Python, and more.SFML aims to help developers...
SFML image
Bevy Game Engine icon

Bevy Game Engine

The Bevy Game Engine is an open-source game engine written in Rust that is focused on usability, performance, and productivity. Some key things to know about Bevy:It utilizes the Entity Component System pattern which provides a flexible and extensible architecture for game development.Bevy is written in Rust which gives it...
Bevy Game Engine image
Upbge icon

Upbge

Upbge (Uchronia Project Blender Game Engine) is an open-source 3D game engine that is a fork of the Blender Game Engine integrated into the Blender 3D modeling and animation software. Upbge aims to improve and extend the original Blender Game Engine by fixing bugs, adding new features, and enhancing overall...
Upbge image
MicroStudio icon

MicroStudio

microStudio is a versatile graphics and animation software designed for hobbyists, indie developers, students, and other artists interested in 2D and 3D content creation. It comes packed with an intuitive and accessible toolset focused on key artwork and animation capabilities.Some of the core features of microStudio include:Powerful 2D vector and...
MicroStudio image
LibGDX icon

LibGDX

LibGDX is an open source, cross-platform game development framework written in Java that allows developers to write game code once and easily deploy it to desktop, mobile, and web platforms. Some key features of LibGDX include:Powerful 2D and 3D rendering capabilities using OpenGL ESCross-platform support for desktop (Windows, Mac, Linux),...
LibGDX image
Allegro icon

Allegro

Allegro is a cross-platform, open source game development library focused on 2D and 3D game creation. It provides pre-built functions for common game development tasks like graphics, sound, input, timers, and more to make developing games easier and faster.Some key features of Allegro include:Supports Windows, Mac, Linux, iOS, Android and...
Allegro image
WADE icon

WADE

WADE (Web Application Defense) is an open-source web application firewall (WAF) designed to protect web applications from common web-based attacks such as cross-site scripting (XSS), SQL injection, remote file inclusion, and more. It works by analyzing HTTP requests sent to the web application and blocking requests that appear malicious based...
WADE image
Crystal Space icon

Crystal Space

Crystal Space is an open-source 3D graphics engine that can be used for creating real-time 3D software, including video games, simulations, and visualization tools. It offers a range of advanced features:Hardware-accelerated 3D graphics rendering using OpenGL or Direct3DSupport for various 3D model formats, including Cal3D and BlenderSkeletal animation and an...
SDL Game Engine icon

SDL Game Engine

The SDL (Simple DirectMedia Layer) Game Engine is an open-source, cross-platform development library designed for providing low-level access to graphics, audio, and device input. It is written in C and supports multiple operating systems including Windows, macOS, Linux, iOS, and Android.Some key capabilities and features of SDL include:Hardware-accelerated 2D and...
SDL Game Engine image