HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
bkaradzic
bgfx
C++2014–2026
bkaradzic / bgfx

bgfx

Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.

42Distinct people
43Mentions
0Explicit recommenders
17.6KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year43 dated mentions

Observed mentions: 2014-04-18 03:43:32 UTC to 2026-06-13 17:44:48 UTC.

0123452014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 3 mentions; 2 submissions, 1 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 4 mentions; 2 submissions, 2 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC202
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC312
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC404
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC312
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC321
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC422
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC303
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC514
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC303
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC404
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC505
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC211
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC202

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
bgfx - Cross-platform rendering library What is it? - Building - Getting Involved - Examples - API Reference - Tools - Who is using it? - License GitHub Discussions Discord Chat GitHub Actions What is it? Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library. Supported rendering backends: Direct3D 11 Direct3D 12 GNM (only for licensed PS4 developers, search DevNet forums for source) Metal OpenGL 4.3+ OpenGL ES 3.0+ Vulkan WebGL 2.0 WebGPU (Dawn Native only) Supported platforms: Android (4.0+) - API 14 or later iOS/iPadOS/tvOS (16.0+) Linux macOS (13.0+) PlayStation 4 RaspberryPi UWP (Universal Windows, Xbox One) Wasm/Emscripten Windows (7+) Supported compilers: Clang 11 and above GCC 11 and above VS2022 and above Apple clang 12 and above Languages: C/C++ API documentation Beef API bindings C# language API bindings C3 language API bindings Python language API bindings D language API bindings Go language API bindings Haskell language API bindings Lightweight Java Game Library 3 bindings Java language API bindings Lua language API bindings Nim language API bindings Pascal language API bindings Rust language API bindings (new) Swift language API bindings Zig language API bindings Who is using it? #madewithbgfx AirMech https://www.carbongames.com/airmech-strike - AirMech is a free-to-play futuristic action real-time strategy video game developed and published by Carbon Games. cmftStudio https://github.com/dariomanesku/cmftStudio - cmftStudio - Cubemap filtering tool. Crown https://github.com/crownengine/crown - Crown is a complete and cross-platform game engine designed for flexibility, performance, and fast-iterations. Offroad Legends 2 http://www.dogbytegames.com/ - Dogbyte Games is an indie mobile developer studio focusing on racing games. Torque6 https://github.com/andr3wmac/Torque6 - Torque 6 is an MIT licensed 3D engine loosely based on Torque2D. Being neither Torque2D or Torque3D it is the 6th derivative of the original Torque Engine. Kepler Orbits https://github.com/podgorskiy/KeplerOrbits - KeplerOrbits - Tool that calculates positions of celestial bodies using their orbital elements. CETech https://github.com/cyberegoorg/cetech - CETech is a data-driven game engine and toolbox inspired by Bitsquid/Stingray engine. ioquake3 https://github.com/jpcy/ioq3-renderer-bgfx - A renderer for ioquake3 written in C++ and using bgfx to support multiple rendering APIs. DLS http://makingartstudios.itch.io/dls - DLS, the digital logic simulator game. http://dls.makingartstudios.com/sandbox/ - DLS: The Sandbox. MAME https://github.com/mamedev/mame - MAME - Multiple Arcade Machine Emulator. Blackshift https://store.steampowered.com/app/741110/Blackshift/ - Blackshift is a grid-based action puzzle game game full of guns, blocks, robots, bombs, lasers, conveyor belts, mirrors, machines, landmines, keys, doors, teleports, crystals, force fields, secrets and mysteries. Real-Time Polygonal-Light Shading with Linearly Transformed Cosines https://eheitzresearch.wordpress.com/415-2/ - Real-Time Polygonal-Light Shading with Linearly Transformed Cosines, Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt, ACM SIGGRAPH 2016. Dead Venture http://www.dogbytegames.com/dead_venture.html - Dead Venture is a new Drive 'N Gun game where you help a handful of survivals reach the safe haven: a military base on a far island. REGoth https://github.com/degenerated1123/REGoth - REGoth is an open-source reimplementation of the zEngine, used by the game "Gothic" and "Gothic II". Ethereal Engine https://github.com/volcoma/EtherealEngine - EtherealEngine is a C++ game engine and WYSIWYG editor. Go Rally http://gorallygame.com/ - Go Rally is top-down rally game with a career mode, multiplayer time challenges, and a track creator. vg-renderer https://github.com/jdryg/vg-renderer#vg-renderer - vg-renderer is a vector graphics renderer for bgfx, based on ideas from both NanoVG and ImDrawList (Dear ImGUI). Zombie Safari http://www.dogbytegames.com/zombie_safari.html - Do what you please in this open-world offroad driving game: explore massive landscapes, complete challenges, smash zombies, find secret locations, unlock and upgrade cars and weapons, it's up to you! Smith and Winston http://www.smithandwinston.com/ - Smith and Winston is an exploration twin stick shooter for PC, PS4 & XBoxOne arriving in late 2018. Smith and Winston features a massively destructible voxel world, rapid twin stick combat, physics puzzles and Metroid-style discovery. Football Manager 2018 http://www.footballmanager.com/ - Football Manager 2018 is a 2017 football management simulation video game developed by Sports Interactive and published by Sega. WonderWorlds http://wonderworlds.me/ - WonderWorlds is a place to play thousands of user-created levels and stories, make your own using the extensive in-game tools and share them with whomever you want. two-io / mud https://hugoam.github.io/two-io/ - An all-purpose c++ app prototyping library, focused towards live graphical apps and games. Talking Tom Pool https://outfit7.com/apps/talking-tom-pool/ - A "sling and match" puzzle game for mobile devices. GPlayEngine https://github.com/fredakilla/GPlayEngine#gplayengine - GPlayEngine is a C++ cross-platform game engine for creating 2D/3D games based on the GamePlay 3D engine v3.0. Off The Road http://www.dogbytegames.com/off_the_road.html - A sandbox off-road driving simulator. Coal Burnout https://beardsvibe.com/ - A multiplayer PVP rhythm game. My Talking Tom 2 https://outfit7.com/apps/my-talking-tom-2/ - Many mini games for mobile devices. NeoAxis Engine https://www.neoaxis.com/ - Versatile 3D project development environment. xatlas https://github.com/jpcy/xatlas#xatlas - Mesh parameterization library. Heroes of Hammerwatch https://store.steampowered.com/app/677120/Heroes_of_Hammerwatch/ - Heroes of Hammerwatch
Read the full README on GitHub

What Hacker News says

43 sources
> for (auto const & ess : esses) { This is allowed by Orthodox C++ > dynamic_cast<Derived> (base_ptr) This isn't because it requires RTTI, but dynamic_cast is also a typical code smell. Orthodox C++ isn't generally against new C++ features, it only advices to wait about 5 years (or at least one C++ version) for stabilization and to apply some common sense before adopting them. The notes about not using RTTI, exceptions and stdlib features that allocate under the hood are all justified by painful experience with those things in the context of game development. In general, the restrictions outlined in the post make a lot of sense when considering that Branimir (of BGFX fame: https://github.com/bkaradzic/bgfx) is coming out of the game dev hemisphere, and from that PoV none of the restrictions are controversial - on the contrary, it would be
Read the rest
highly controversial to suggest going all in on Modern C++ features ;)
In Orthodox C++ (2016)
BGFX (https://github.com/bkaradzic/bgfx) uses a different approach. You basically write your shader in a GLSL-like language but it's all just (either very clever or very horrible) macro expansions that handles all the platform differences. With that you get a very performant backend for OpenGL, WebGL, Vulkan, Metal, Direct3D 11 and 12 and Playstation. It's shader compiler program basically does minimal source level transformations before handing it over to the platforms' own shader compiler if available.
In Layers All the Way Down: The Untold Story of Shader Compilation
I don't use orthodox C++, but the author of this is also the author of bgfx, which is a very popular graphics api abstraction. It runs on (and has commercial products on) Android, ios, Playstation, Xbox, PC, Mac, Linux, and wasm. While the coding style might be unpopular, it has successful projects. https://github.com/bkaradzic/bgfx
In Orthodox C++
>don’t say GitHub Gitlab, Bitbucket. I don't really know what to expect. You want to see good production code, and the FOSS community is way way WAY better at this than some of the bubble gum you'd see in a professional setting. Your question is too general, so I can't exactly give you a specific repository. I could direct you to BGFX[1] for a decent architecture of a cross platform renderer, but if you're not a graphics programmer, that may be a bad exercise, as you'd spend more time learning jargon than studying clean code. Or it uses patterns (or lack of, given graphics programming) that don't apply to your domain. [1]: https://github.com/bkaradzic/bgfx
In Ask HN: Where do I find good code to read?
Didn't know about Skia previously! Thank you for the excellent suggestion! So, let's provide some links: Overview: https://en.wikipedia.org/wiki/Skia_Graphics_Engine Homepage: https://skia.org/ Source: https://skia.googlesource.com/skia/ (or) https://github.com/google/skia Also -- there's this old HN post: https://news.ycombinator.com/item?id=28143972 where the following github projects which involve drawing are mentioned: https://github.com/bkaradzic/bgfx https://github.com/memononen/nanovg https://github.com/wjakob/nanogui In the following article: https://www.cmyr.net/blog/gui-framework-ingredients.html we find the following interesting quote: >"These APIs exist, in subtly different form, on the various platforms. on macOS, there is CoreGraphics [Quartz 2D], on windows Direct2D, and on linux there is Cairo. One approach, then, is to p
Read the rest
resent a common API abstraction over top of these platform APIs, puttying over the rough edges and filling in the gaps. (This is the approach we have currently taken, with the piet library.)" So, some more quick links: https://en.wikipedia.org/wiki/Direct2D https://en.wikipedia.org/wiki/Quartz_(graphics_layer) Piet: https://docs.rs/piet/latest/piet/ https://github.com/linebender/piet Related: 2018 Paper: "A Proposal to Add 2D Graphics Rendering and Display to C++": https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p02...
In Cairo – Open-Source 2D Graphics Layer/API with font support and many back-ends
I've had a decent experience with bgfx (https://github.com/bkaradzic/bgfx). It is solely a rendering library (no input, physics, sound, etc). It operates a layer just above a native rendering library, such as DirectX, OpenGL, Vulkan, Metal, etc - those are the "backend renderers" that bgfx uses. Though I have my complaints about it, I think bgfx gives a good powerful-but-not-too-complicated abstraction over graphics programming; for some design info, see: https://bkaradzic.github.io/bgfx/internals.html
In Vulkan update: version 1.2 conformance for Raspberry Pi 4

Showing the 15 most recent of 43 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.