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.
.. raw:: html
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
~~~~~~~~~~~~~~~~~~~
- `C/C++ API documentation `__
- `Beef API bindings `__
- `C# language API bindings #1 `__
- `D language API bindings `__
- `Go language API bindings `__
- `Haskell language API bindings `__
- `Lightweight Java Game Library 3 bindings `__
- `Lua language API bindings `__
- `Nim language API bindings `__
- `Pascal language API bindings `__
- `Python language API bindings #1 `__
- `Python language API bindings #2 `__
- `Rust language API bindings `__
- `Swift language API bindings `__
- `Zig language API bindings `__
Project Page
~~~~~~~~~~~~
- https://github.com/bkaradzic/bgfx
Contact
~~~~~~~
- `GitHub Discussions `__
- `Discord Chat `__
- 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: :doc:`bgfx`.
.. 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.
- Stanlo Slasinski (`@stanlo `__) -
`24-nbody `__ 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.
- Apoorva Joshi (`@ApoorvaJ `__) -
`33-pom `__ example.
- 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.
- Aleš Mlakar (`@jazzbre `__) -
`40-svt `__ example.
- 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
~~~~~~~~~~~~~~~~~~~~~~~~
.. image:: https://api.star-history.com/svg?repos=bkaradzic/bgfx&type=Date
.. raw:: html