finds.dev

bkaradzic/bgfx

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

View on GitHubHomepage ↗

★ 17,150CBSD-2-Clauseupdated Jun 2026

// the take

bgfx is a C/C++ rendering abstraction layer that lets you write rendering code once and have it run on D3D11, D3D12, Metal, Vulkan, OpenGL, and WebGL without per-backend conditionals. It's aimed at game engine authors and tool developers who want to own their own rendering pipeline without re-implementing the backend plumbing. In production at Minecraft, Guild Wars 2, Football Manager, and Crypt of the NecroDancer, among others.

The shader abstraction is the real value: you write BGFX shaders in a GLSL-like language, run them through the included shaderc tool, and get compiled output for every backend. No HLSL-vs-GLSL split. The handle-based API (bgfx::VertexBufferHandle, etc.) enforces explicit resource lifetimes and maps cleanly to modern GPU APIs without pretending you're still on OpenGL fixed-function. Platform coverage is genuinely exceptional — Android, iOS, Switch-adjacent (PS4 with licensed source), Wasm/Emscripten, UWP, and a working WebGPU backend via Dawn Native. Sixteen years of continuous commits from a single focused author means the codebase has accumulated real battle-hardening: the frame graph, occlusion queries, and instancing paths have all been stress-tested in shipped titles.

The build system is GENie, not CMake. Integrating bgfx into an existing CMake project requires either a third-party wrapper or writing your own FindBgfx.cmake, and the GENie docs are thin. The API is deliberately C-style — opaque integer handles, no RAII, no destructors — which is fine for C bindings but means modern C++ codebases end up writing their own RAII wrappers before they can use it idiomatically. Single-maintainer bus factor is a real concern: Branimir Karadzic has been the sole author since 2010, and the project's health is entirely tied to his availability. The shaderc offline compilation step adds friction early — you can't just drop bgfx in and start writing shaders; you need the tool built and wired into your asset pipeline before you see anything on screen.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
17,150
Forks
2,102
Language
C
License
BSD-2-Clause
Last commit
13 Jun 2026

// nearby

If bgfx isn't quite it.

All repos →