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

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:

and others

Repository visualization

https://api.star-history.com/svg?repos=bkaradzic/bgfx&type=Date