bgfx Cross-Platform Rendering Library
www.bkaradzic.org
1
Leaving SiteNav
External Link Disclaimer
You are about to visit www.bkaradzic.org. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
bgfx is a cross-platform rendering library designed as a thin abstraction layer over modern graphics APIs, providing a unified interface for rendering on Windows, macOS, Linux, iOS, Android, and WebAssembly. Created by Branimir Karadzic in 2010 and released as open source in 2012, bgfx is used in commercial game engines, visualization tools, and embedded systems. Key features: cross-platform rendering supporting Direct3D 9, Direct3D 11, Direct3D 12 (Windows), Metal (iOS/macOS), OpenGL 2.1, OpenGL ES 2.0/3.0, WebGL 1.0/2.0, and Vulkan, all from a single codebase with no platform-specific code required. Shader cross-compilation: write shaders once in GLSL-like syntax, automatically cross-compiled to HLSL, MSL, GLSL, SPIR-V, or WGSL at build time using shaderc. View-based rendering architecture: each view represents a render pass with clear flags, sorting order, and viewport, enabling flexible multi-pass pipelines (shadow pass, geometry pass, post-processing). State-based API where render state (blend mode, depth test, culling, stencil) is set once and reused, minimizing state changes. Transient and dynamic vertex/index buffers for dynamic geometry. Vertex declarations for flexible vertex layout. Texture formats including compressed (BC1-7, ETC2, ASTC, PVRTC) and floating-point. Frame buffer objects with render-to-texture. Multiple render targets (MRT) for deferred rendering. Compute shaders for GPU computation. Instanced rendering. Occlusion queries. Built-in geometry primitives (cube, sphere, cone, cylinder) for prototyping. Debug rendering with wireframe and text. imgui integration. Used in Mario Kart Tour and System Shock remake. Open source under BSD-2-Clause.
Statistics
1
Views
0
Clicks
0
Like
0
Dislike