Compare GLFW vs SDL and see what are their differences.


A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input (by glfw)


Simple Directmedia Layer (by libsdl-org)
Our great sponsors
  • Nanos - Run Linux Software Faster and Safer than Linux with Unikernels
  • Scout APM - A developer's best friend. Try free for 14-days
  • SaaSHub - Software Alternatives and Reviews
28 43
8,189 1,951
2.0% 11.0%
8.8 9.9
3 days ago 2 days ago
zlib License zlib License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.


Posts with mentions or reviews of GLFW. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-09-13.
  • [Handmade Network] How to write better (game) libraries
    Even if someone wants to use VS2008 for game development, it only took me a Google search to find which doesn't have any dependencies and a very permissive licence.
  • how do i include glfw in my code to make a window? | 2021-08-31
  • LibOS – Cross-platform OS features in C++ | 2021-08-23
    You seem to have had a similar impetus as I had 20 years ago when I created GLFW (though with a slightly different focus).
  • Is there a way to get japanese text input in raylib? | 2021-08-23
    Thanks for the detailed explanation. I'm afraid I didn't considered that use case for raylib and it would require some investigation to implement it... but raylib uses internally GLFW for desktop platforms and I've seen there is a related issue: About IME support by the browser, it should be investigated. Feel free to open an issue on raylib GitHub for further investigation!
  • Massive trouble with GLFW header inclusion. Can someone help?
    Looking at the actual code of the .h file, it looks pretty empty, and like it needs some extra files perhaps. For instance, functions are just filled with comments with some random explanations, so they are basically 1 line, which probably does nothing. Here you can take a look yourself on github.
  • Hey, I want start
    I would suggest using GLFW and Glad with C++ and use LearnOpenGL as a refrence
  • Compiling in MacOS M1 Chip (arm64) | 2021-07-22
    Now I read the logs and it seems the issue is with GLFW. I've found this:
  • Opengl(glfw) gears on termux x11 NO ROOT!! | 2021-07-19
    Clone the glfw repositiory - git clone
  • 3D Visualization with C++
    Use to get a window with an OpenGL context.
  • A better way of running Minecraft Without XWayland. Because I REALLY had nothing better to do with my life. (which is where I got some patches from) says there wasn't much upstream interest on merging the patches. But (the fix for the freezing issue) might be a good candidate for merging, though I don't know how GLFW people work, so I cannot comment on if it is properly upstreamable or not.


Posts with mentions or reviews of SDL. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-10-16.
  • Asking for advice on programming games without an engine | 2021-10-16
    Sounds to me that you want something like SDL with OpenGL.
  • Any alternatives to the SC for Gyro control?
    also 8BitDo: doesn't upgrade either Mac or DInput mode in order to do both like how Flydigi Vader 2 does.
  • Investigating the 'Patching' Process | 2021-09-27
    Let's see, for example, this PR regarding some triangle rendering feature. I have chosen this PR since it is the one that is the most commented on, which helps to understand how a PR might go in this project.
    vkb::InstanceBuilder builder(vkGetInstanceProcAddr); // TODO: Get project name from cmake variable builder.set_app_name("prototype") .require_api_version(1, 1, 0) .use_default_debug_messenger(); #ifdef __APPLE__ // TODO: remove VK_MVK_macos_surface after this issue is fixed // builder.enable_extension("VK_MVK_macos_surface") .enable_extension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); #endif if (ENVIRONMENT == Environment::development) { builder.set_app_name("prototype") .request_validation_layers(true) .set_debug_callback(debugCallback); // TODO: Enable better debug messages // .add_validation_feature_enable(VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT) // .add_validation_feature_enable(VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT) } vkb::Instance vkbInstance =; instance = vkbInstance.instance; debugMessenger = vkbInstance.debug_messenger; vkb::PhysicalDeviceSelector selector{vkbInstance}; vkb::PhysicalDevice physicalDevice = selector.set_minimum_version(1, 1).set_surface(surface).select().value(); vkb::DeviceBuilder deviceBuilder{physicalDevice}; vkb::Device vkbDevice =; device = vkbDevice.device; chosenGPU = physicalDevice.physical_device; graphicsQueue = vkbDevice.get_queue(vkb::QueueType::graphics).value(); graphicsQueueFamily = vkbDevice.get_queue_index(vkb::QueueType::graphics).value(); VmaAllocatorCreateInfo allocatorInfo = {}; allocatorInfo.physicalDevice = chosenGPU; allocatorInfo.device = device; allocatorInfo.instance = instance; vmaCreateAllocator(&allocatorInfo, &allocator);
  • I'm trying to make sense of this validation error message I only get on windows | 2021-09-27
    // TODO: remove VK_MVK_macos_surface after this issue is fixed // builder.enable_extension("VK_MVK_macos_surface") .enable_extension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
  • SDL Keypress resulting in Segfault
    The reason I included the archive links is because seems to be down at the moment.
  • I wish I knew about this feature months ago... | 2021-09-09
  • AM2R @ Raspberry Pi - Take 4 | 2021-09-02
    Now, we'll need to source the latest SDL source tarball. You can find it [here](, but you can source the latest as of this writing with the command below. Run cd, and then run:
  • (When) will xdg-decoration become stable? | 2021-08-17
    if the applications you’re thinking of is using SDL, then this will get fixed soon (depending on the update speed of your distribution):
  • Release of SDL 2.0.16

What are some alternatives?

When comparing GLFW and SDL you can also consider the following projects:

bgfx - Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.

Skia - Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

OpenSceneGraph - OpenSceneGraph git repository

Ogre 3D - scene-oriented, flexible 3D engine (C++, Python, C#, Java)

glad - Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.

Open-Source Vulkan C++ API - Open-Source Vulkan C++ API

magnum - Lightweight and modular C++11 graphics middleware for games and data visualization

Allegro - The official Allegro 5 git repository. Pull requests welcome!

cdecrypt - Decrypt Wii U NUS content β€” Forked from:

Phaser - Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.

Irrlicht - An automatically updated mirror of the Irrlicht SVN repository on sourceforge

glbinding - A C++ binding for the OpenGL API, generated using the gl.xml specification.