Overview¶
What is it?¶
Cross-platform, graphics API agnostic, “Bring Your Own Engine/Framework” style rendering library, licensed under permissive BSD-2 clause open source license.
Supported rendering backends¶
-
Direct3D 11
Direct3D 12
GNM (only for licensed PS4 developers, search DevNet forums for source)
Metal
OpenGL 2.1
OpenGL 3.1+
OpenGL ES 2
OpenGL ES 3.1
Vulkan
WebGL 1.0
WebGL 2.0
Supported Platforms¶
Android (14+)
iOS/iPadOS/tvOS (16.0+)
Linux (both X11 and Wayland)
macOS (13.0+)
PlayStation 4
RaspberryPi
UWP (Universal Windows, Xbox One)
Wasm/Emscripten
Windows (7+)
Supported Compilers¶
Clang 11 and above
GCC 8 and above
VS2019 and above
Apple clang 12 and above
Supported Languages¶
Project Page¶
Contact¶
GitHub @bkaradzic
Twitter @bkaradzic
Debugging and Profiling¶
RenderDoc¶
Loading of RenderDoc is integrated in bgfx when using DX11 or OpenGL
renderer. You can drop in renderdoc.dll
from RenderDoc distribution
into working directory, and it will be automatically loaded during bgfx
initialization. This allows frame capture at any time by pressing
F11.
Download: RenderDoc
RenderDoc How do I …? documentation.
Shader debugging with RenderDoc and MSVC.
SDL, GLFW, etc.¶
It is possible to use bgfx with SDL, GLFW and similar cross platform windowing libraries. The main requirement is that windowing library provides access to native window handle that’s used to create Direct3D device or OpenGL context.
For more info see: API Reference.
Note
You can use --with-sdl
when running GENie to enable SDL2 integration with examples:
genie --with-sdl vs2012
Note
--with-glfw
is also available, but it’s just simple stub to be used to test GLFW
integration API.
Note
Special care is necessary to make custom windowing to work with multithreaded renderer.
Each platform has rules about where renderer can be and how multithreading interacts
with context/device. To disable multithreaded render use BGFX_CONFIG_MULTITHREADED=0
preprocessor define.
Getting Involved¶
Everyone is welcome to contribute to bgfx by submitting bug reports, testing on different platforms, writing examples (see ideas), improving documentation, profiling and optimizing, etc.
Note
When contributing to the bgfx project you must agree to the BSD 2-clause licensing terms.
Contributors¶
Chronological order:
Branimir Karadžić (@bkaradzic)
Garett Bass (@garettbass) - macOS port.
Jeremie Roy (@jeremieroy) - 10-font, and 11-fontsdf examples.
Miloš Tošić (@milostosic) - 12-lod example.
Dario Manesku (@dariomanesku) - 13-stencil, 14-shadowvolumes, 15-shadowmaps-simple, 16-shadowmaps, 18-ibl, and 28-wireframe example.
James Gray (@james4k) - Go language API bindings.
Guillaume Piolat (@p0nce) - D language API bindings.
Mike Popoloski (@MikePopoloski) - C#/VB/F# language API bindings, WinRT/WinPhone support.
Kai Jourdan (@questor) - 23-vectordisplay example.
Daniel Collin (@emoon) - Port of Ocornut’s ImGui to bgfx.
Andre Weissflog (@floooh) - Alternative build system fips.
Andrew Johnson (@ajohnson23) - TeamCity build.
Tony McCrary (@enleeten) - Java language API bindings.
Attila Kocsis (@attilaz) - Metal rendering backend, various macOS and iOS improvements and bug fixes, 39-assao example.
Richard Gale (@RichardGale) - Emscripten entry input handling.
Andrew Mac (@andr3wmac) - 27-terrain example.
Oliver Charles (@ocharles) - Haskel language API bindings.
Johan Sköld (@rhoot) - Rust language API bindings.
Jean-François Verdon (@Nodrev) - Alternative deployment for Android.
Jason Nadro (@jnadro) - Python language API bindings.
Krzysztof Kondrak (@kondrak) - OculusVR integration.
Colby Klein (@excessive) - Lua language API bindings.
Stuart Carnie (@stuartcarnie) - Swift language API bindings.
Joseph Cherlin (@jcherlin) - 30-picking, and 31-rsm example.
Olli Wang (@olliwang) - Various NanoVG integration improvements.
Cory Golden (@Halsys) - Nim language API bindings.
Camilla Berglund (@elmindreda) - GLFW support.
Daniel Ludwig (@code-disaster) - Lightweight Java Game Library 3 bindings.
Benoit Jacquier (@benoitjacquier) - Added support for cubemap as texture 2D array in a compute shader.
Stanislav Pidhorsky (@podgorskiy) - 36-sky example.
云风 (@cloudwu) - Alternative Lua bindings, bgfx IDL scripts, 42-bunnylod example.
Kostas Anagnostou (@KostasAAA) - 37-gpudrivenrendering example.
Andrew Willmott (@andrewwillmott) - ATC and ASTC support.
Matt Chiasson (@mchiasson) - Various fixes and improvements.
Phil Peron (@pperon) - Tutorial how to use bgfx API.
Vincent Cruz (@BlockoS) - Wayland support.
Jonathan Young (@jpcy) - Renderer for ioquake3 that uses bgfx, minimal bgfx example.
Nick Waanders (@NickWaanders) - shaderc: Metal fixes.
Vladimir Vukićević (@vvuk) - HTML5 context.
Daniel Gavin (@DanielGavin) - 41-tess example.
Ji-yong Kwon (@rinthel) - Vulkan rendering backend.
Leandro Freire (@leandrolfre).
Ari Vuollet (@GoaLitiuM) IDL generator for D language bindings.
Sebastian Marketsmueller (@sebastianmunity3d).
Cedric Guillemet (@CedricGuillemet).
Pablo Escobar (@pezcode) - Various Vulkan fixes.
Paul Gruenbacher (@pgruenbacher) - Various bug fixes.
Jukka Jylänki (@juj) - Various WebGL optimizations and fixes.
Hugo Amnov (@hugoam) - WebGPU/Dawn rendering backend.
Christophe Dehais (@goodartistscopy) - Various bug fixes.
elvencache (@elvencache) - 43-denoise, 44-sss, and 45-bokeh example.
Richard Schubert (@Hemofektik) - 46-fsr example.
Sandy Carter (@bwrsandman) - 47-pixelformats example, and various fixes and improvements.
Liam Twigger (@SnapperTT) - 48-drawindirect example.
Preetish Kakkar (@blackhole) - 49-hextile example.
Biswapriyo Nath (@Biswa96) - GitHub Actions CI.
Raziel Alphadios (@RazielXYZ) - Various fixes and improvements.
IchorDev (@IchorDev) - Improved D language bindings.
and others…
Repository visualization¶