bgfx VS sokol

Compare bgfx vs sokol and see what are their differences.


Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library. (by bkaradzic)


minimal cross-platform standalone C headers (by floooh)
Our great sponsors
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • Mergify - Updating dependencies is time-consuming.
  • SonarCloud - Analyze your C and C++ projects with just one click.
bgfx sokol
67 35
13,487 5,199
- -
0.0 4.7
1 day ago 2 days ago
C++ C
BSD 2-clause "Simplified" 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 bgfx. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-08-18.
  • The Ultimate Cross-Platform Rendering Engine?
    3 projects | /r/GraphicsProgramming | 18 Aug 2023
    BGFX: Pretty mature and easy to use with many backends.
  • Cairo – Open-Source 2D Graphics Layer/API with Fonts and Many Back-Ends
    6 projects | | 17 Jul 2023
  • LWJGL = SFML vs Allegro vs SDL vs Ogre vs ???
    2 projects | /r/GraphicsProgramming | 5 Jul 2023
    There's kind of a lack of this for C++ in 3D, I think it's often due to the necessity of a secondary scripting language in game engines with C++, which isn't necessarily needed in Java or C#. SFML is like that (but also 2D), Godot is similar (but more geared towards 2D). Ogre3D is an actual engine like I mentioned earlier, not sure how easy it is to use. Cocos2d is higher level, but is also 2D only. I'm not fond of SDL, it feels like a windowing library with slow old school immediate mode stuff attached, so it ends up not being good at the rest of the tacked on things. SDL is popular as a windowing library, and it's why you see it used everywhere (but the most notable uses of it aren't using their drawing capabilities), I often see bgfx thrown around, and for you it might be a good choice, though I have no experience with it.
  • Is it a crazy idea to create a 3D operating system?
    5 projects | /r/osdev | 21 May 2023
    Another route could be using an abstraction over Vulkan (faster, more efficient, more difficult): bgfx, dawn, magma, or wgpu (Rust).
  • The update we all want but will never get
    2 projects | /r/PhoenixSC | 28 Mar 2023
    my guess for why renderdragon made performance worse is because old bedrock was built on bgfx which is a layer of abstraction ontop of a bunch of graphics apis which benefits the programmer because they can write the graphics code once and use it on a bunch of graphics apis (just like java! i heart cross compatibility)
    2 projects | /r/PhoenixSC | 28 Mar 2023
    now, java is actually quite a performant language and even if its not most of the performance bugs in mc are due to it being single threaded, inefficient chunk generation and optimizing, and it built ontop of opengl WHICH isn't much of a performance hit but its still ehh idk it doesn't matter that much (NOW SWITCHING THE GAME TO AN ENTIRELY DIFFERENT GRAPHICS API WOULD SUCK ASS TO DO (and vulkan is quite verbose :))) (AND also bgfx would probably be better due to it being an abstraction layer ontop of all the graphics apis so minecraft could target many depending on your platform (and also bedrock used to (or still does i dont know) use bgfx before they switched to just two (IF IM READING MC WIKI RIGHT BECAUSE IM NOT ENTIRELY SURE IF THEY USE BGFX STILL ?? SO THEY COULD STILL BE TARGETING MULTIPLE YET THEY JUST WROTE THEIR NEW SHIT BAD IDK))
  • GUI frameworks for an SDL-based roguelike?
    4 projects | /r/roguelikedev | 26 Mar 2023
    We use a lot of software used by big companies. :) Git and C++ come to mind. But as far I see on their software list there are one or two roguelikes. Also, bgfx uses ImGUI under the hood, so it is a good place to see how it can look or even use it instead of just ImGUI.
  • Best C++ Game Framework
    4 projects | /r/gameenginedevs | 10 Mar 2023
    I think if you're not going to use an existing game engine, it makes sense to learn OpenGL and implement things yourself, or use something with the explicit goal of being a rendering abstraction like bgfx. It's more of a time commitment though, and sfml is much simpler and easier to get started with.
  • minimax — minimalist 3D game engine in Clojure
    5 projects | /r/Clojure | 26 Feb 2023
    The "engine" is built on top of amazing and, and UI system is baked by and
  • Just found out about Zig and wonder what would be the best graphics library to pair with it?
    5 projects | /r/Zig | 1 Feb 2023
    If you want juste a renderer, you can use BGFX, there is a zig binding that is not a third party.


Posts with mentions or reviews of sokol. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-07-07.

What are some alternatives?

When comparing bgfx and sokol you can also consider the following projects:

GLFW - A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input

DiligentEngine - A modern cross-platform low-level graphics library and rendering framework

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

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

The-Forge - The Forge Cross-Platform Rendering Framework PC Windows, Linux, Ray Tracing, macOS / iOS, Android, XBOX, PS4, PS5, Switch, Quest 2

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

raylib - A simple and easy-to-use library to enjoy videogames programming

urho3d - Game engine

OpenSceneGraph - OpenSceneGraph git repository

wgpu - Cross-platform, safe, pure-rust graphics api.

vulkan-guide - Introductory guide to vulkan.

LearnOpenGL - Code repository of all OpenGL chapters from the book and its accompanying website