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 9

  • Direct3D 11

  • Direct3D 12

  • 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+, ARM, x86, MIPS)

  • asm.js/Emscripten (1.25.0)

  • FreeBSD

  • iOS (iPhone, iPad, AppleTV)

  • Linux

  • MIPS Creator CI20

  • OSX (10.12+)

  • RaspberryPi

  • SteamLink

  • Windows (XP, Vista, 7, 8, 10)

  • WinRT (WinPhone 8.0+)

Supported Compilers

  • Clang 3.3 and above

  • GCC 5 and above

  • vs2017 and above

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.

IntelGPA

Right click Intel GPA Monitor tray icon, choose preferences, check “Auto-detect launched applications” option. Find InjectionList.txt in GPA directory and add examples-* to the list.

Download: IntelGPA

Other Debuggers and Profilers

Name

OS

DX9

DX11

DX12

Metal

GL

GLES

Vulkan

Source

APITrace

Linux/OSX/Win

CodeXL

Linux/Win

Dissector

Win

IntelGPA

Linux/OSX/Win

Nsight

Win

PerfHUD

Win

PerfStudio

Win

PIX

Win

RGP

Win

RenderDoc

Win/Linux

vogl

Linux

Download:

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 runnning 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

Chrnonological order:

and others

Repository visualization