Update bgfx.cmake to converged bgfx (539e1feb); drop platform.h include#1774
Open
bkaradzic-microsoft wants to merge 1 commit into
Open
Update bgfx.cmake to converged bgfx (539e1feb); drop platform.h include#1774bkaradzic-microsoft wants to merge 1 commit into
bkaradzic-microsoft wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the project’s bgfx.cmake dependency pin to a converged bgfx revision and adjusts Babylon Native sources/build settings to match upstream header/layout changes.
Changes:
- Bump
bgfx.cmakepin to a newer commit that vendors convergedBabylonJS/bgfx. - Remove redundant
#include <bgfx/platform.h>from all in-repo consumers (now covered by generatedbgfx.h). - Disable bgfx video decoding support via
BGFX_CONFIG_VIDEO=0in the bgfx build.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| CMakeLists.txt | Updates the bgfx.cmake FetchContent pin to the newer commit. |
| Dependencies/CMakeLists.txt | Adds BGFX_CONFIG_VIDEO=0 compile definition for the bgfx target. |
| Core/Graphics/InternalInclude/Babylon/Graphics/BgfxCallback.h | Drops bgfx/platform.h include (now redundant with bgfx.h). |
| Core/Graphics/InternalInclude/Babylon/Graphics/DeviceContext.h | Drops bgfx/platform.h include (now redundant with bgfx.h). |
| Core/Graphics/Source/DeviceImpl.h | Drops bgfx/platform.h include (now redundant with bgfx.h). |
| Plugins/NativeEngine/Source/NativeEngine.h | Drops bgfx/platform.h include (now redundant with bgfx.h). |
| Plugins/TestUtils/Source/TestUtils.cpp | Drops bgfx/platform.h include (now redundant with bgfx.h). |
| Plugins/NativeCamera/Source/Apple/CameraDevice.mm | Drops bgfx/platform.h include (now redundant with bgfx.h). |
| Plugins/NativeCamera/Source/Android/CameraDevice.cpp | Drops bgfx/platform.h include (now redundant with bgfx.h). |
Bumps the bgfx.cmake pin to 9c64597 (BabylonJS/bgfx.cmake), which vendors the converged BabylonJS/bgfx at 539e1feb and carries the CMake fixes for bimg (WIC image_decode_wic, etcpak rename, AVIF/dav1d wiring) so they match the GENie build. The converged bgfx removes include/bgfx/platform.h (upstream #3761); its declarations now live in the generated bgfx.h. Remove the now-redundant #include <bgfx/platform.h> from the BN consumers that carried it (each already includes <bgfx/bgfx.h> directly above), which also drops the need for the BGFX_IDL_CPP compile shim. Also disable two unused bgfx config features to save binary size: * BGFX_CONFIG_VIDEO=0 - video decoding is unused by Babylon Native. * BGFX_CONFIG_C99_API=0 - BN uses the C++ API only. Validated: Playground Release builds clean; full headless validation suite passes 295/295 (exit 0) on Win32 D3D11. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
e42b022 to
8479681
Compare
bghgary
approved these changes
Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps the
bgfx.cmakepin to9c64597, which vendors the converged BabylonJS/bgfx @539e1feband carries the CMake fixes that bring bimg's CMake build in line with its GENie build:image_decode_wic.cppis now globbed (WIC decoder),etcpak,Because the converged bgfx drops
include/bgfx/platform.h(upstream #3761 — its declarations now live in the generatedbgfx.h), this removes the now-redundant#include <bgfx/platform.h>from the seven BN consumers that carried it (each already includes<bgfx/bgfx.h>directly above). That in turn removes the need for theBGFX_IDL_CPPcompile shim.Also disables two unused bgfx config features to save binary size:
BGFX_CONFIG_VIDEO=0— video decoding is unused by Babylon Native.BGFX_CONFIG_C99_API=0— BN uses the C++ API only.Changes
CMakeLists.txt:bgfx.cmakepin68762dd→9c64597Dependencies/CMakeLists.txt: addBGFX_CONFIG_VIDEO=0andBGFX_CONFIG_C99_API=0#include <bgfx/platform.h>from 7 files (BgfxCallback.h, DeviceContext.h, DeviceImpl.h, NativeEngine.h, TestUtils.cpp, NativeCamera Apple/Android CameraDevice)Validation
ran=295 passed=295 failed=0 missingRef=0, exit 0.