finds.dev← search

// the find

bkaradzic/bgfx

★ 17,150 · C · BSD-2-Clause · updated Jun 2026

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

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.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →