GLFW is a free, Open Source, multi-platform library for opening a window, creating an OpenGL context and managing input. It is easy to integrate into existing applications and does not lay claim to the main loop.
GLFW is written in C and has native support for Windows, Mac OS X and many Unix-like systems using the X Window System, such as Linux and FreeBSD.
GLFW is licensed under the zlib/libpng license.
- Easy to use API in the style of the OpenGL APIs
- Gives you a window and OpenGL context with two function calls
- Explicit support for MSAA and OpenGL 3.2+, including profiles and flags
- Input can be either polled or delivered via callbacks
- Basic Unicode character input
- Supports both static and dynamic linking
- Open Source with a liberal OSI-certified license
- Makefiles or project files for most popular C/C++ compilers
- Examples and comprehensive documentation
If GLFW isn’t what you are looking for, there are alternatives.
GLFW repositories moved to GitHub
All GLFW repositories have been moved to GitHub. This includes the stable version 2.7, which has been migrated from Subversion, the ongoing development for version 3.0 and the sources for this site. Move notices have been added to the repositories on SourceForge.net.
Version 2.7.8 released
GLFW 2.7.8 is available for download. This release adds fixes for a few minor bugs on each platform, most notably the flashing window on Win32 and a workaround for a bug in Mesa 9.x.
Site moved to Jekyll
Through Jekyll, there’s now also an Atom feed for GLFW news.
Version 2.7.7 released
GLFW 2.7.7 is available for download. This release adds fixes for a few minor bugs on each platform, support for more swap interval methods on X11 and Visual C++ 2012 project files.
Version 2.7.6 released
GLFW 2.7.6 is available for download. This release adds support for joysticks on Mac OS X, a graphical joystick test, support for 64-bit builds using MinGW-w64 and fixes for a number of (primarily input related) bugs.
Version 2.7.5 released
GLFW 2.7.5 is available for download. This release fixes a compilation bug for certain versions of Mac OS X and adds support for monotonic time input on Cocoa.
Version 2.7.4 released
GLFW 2.7.4 is available for download. This release adds bug fixes for a few minor issues in 2.7.3, most notably the missing
-lrt on X11 and the non-interactive menu bar created by
glfwInit on Mac OS X.
Version 2.7.3 released
GLFW 2.7.3 is available for download. It adds better MinGW and MSYS support, support for the
CLOCK_MONOTONIC time source, the
GLFW_INCLUDE_GL3 macro to make GLFW include the draft gl3.h header instead of gl.h and fixes for a number of bugs.
Version 2.7.2 released
GLFW 2.7.2 is available for download. It adds support for OpenGL 3.2 core profile contexts on OS X Lion and fixes a number of minor bugs in the Cocoa port.
Version 2.7.1 released
GLFW 2.7.1 is available for download. It adds bug fixes for a number of minor issues in version 2.7, as well as project files for Visual C++ 2010.
Version 3.0 Git repository opened
The chunk of code that will become version 3.0 can now be found in the Git repository at SourceForge.net. Please note that it is (at the time of writing) very early in development and that things may not work yet or even be present at all. The current state of the code is primarily intended to foster discussion.
Development of version 3.0 is coordinated via the glfw-dev mailing list.
There is a preliminary roadmap for 3.0 on our wiki.
Version 2.7 released
GLFW 2.7, codenamed “Godot”, is available for download. It includes many bug fixes, build system updates and several new features, most notably explicit support for OpenGL 3.0 and later, and a new 64-bit capable Cocoa port.
Thanks to everyone who helped make this release possible.
GLFW now has a wiki
Help, GLFW 2.7 is *still* nearly done
I (elmindreda) unfortunately have a very limited amount of time to spend on GLFW. Version 2.7 is stable and better than 2.6 in pretty much every way, but there’s still a few items left. If you have a little time to spare, please consider helping out with testing, bug fixing or just moral support on #glfw.
Revamped website launched
It’s not entirely done, but still better than the former site.
Version 2.6 released
The final version of GLFW 2.6 has been released. You can find it here.
Some changes since the beta release are:
- FSAA now (finally) works on Win32 as well
- A slew of bugfixes in the mouse input code
- Process transformation for Mac OS X
Version 2.6 beta 1 released
Well, it took a while (way too long, in fact), but the first beta of GLFW version 2.6 has been released. The upside is that despite being a beta, is stable enough to be a recommended upgrade for all users. It’s not finished, it’s not perfect, but it’s good. You can find it here.
Some of the highlights in version 2.6 are:
- Support for fullscreen antialiasing
- Support for non-resizable windows
- An expanded and improved image and texturing API
- Shared library, Universal binary and MinGW cross compiling build targets
- Installation build targets for Mac OS X and other Unix-like systems
- Much improved support for fullscreen windows on X11
Also note that this release obsoletes the AmigaOS and DOS platforms, due to non-existent community and maintainer interest.