bgfx is a bring-your-own-engine rendering library that works across many GPUs and operating systems. It exposes C/C++ APIs and bindings in several languages.
Overview
bgfx is a cross-platform rendering library that does not tie you to one graphics API. Teams embed it inside their own engine or framework rather than adopting a full game engine stack.
It can target Direct3D 11 and 12, Metal, OpenGL 4.3+, OpenGL ES 3.0+, Vulkan, WebGL 2.0, and WebGPU through Dawn Native, among other backends. Documented platforms include Android, iOS and iPadOS, Linux, macOS, Windows, UWP, Wasm via Emscripten, Raspberry Pi, and PlayStation 4 for licensed developers.
The project ships API documentation for C and C++, plus language bindings such as C#, Python, Java, Zig, and Rust. Examples cover fonts, shadows, image-based lighting, terrain, and similar graphics tasks.
Windowing can come from SDL, GLFW, or custom code as long as native handles are available for device or context creation. RenderDoc integration on Direct3D 11 and OpenGL supports in-process frame capture.
Key features
- Multiple GPU rendering backends
- Bring-your-own-engine integration style
- C and C++ core API
- Bindings for many programming languages
- SDL and GLFW windowing support
- RenderDoc capture on DX11 and OpenGL
- Multithreaded renderer with opt-out flag
- Extensive graphics examples
Use cases
- Custom game engine rendering
- Cross-platform game and tool graphics
- Replacing legacy Direct3D renderers
- Graphics research and demo projects