Skip to content

Comments

gltfio: Allow compile-time override of GLTFIO_USE_FILESYSTEM#9733

Open
nmfisher wants to merge 1 commit intogoogle:mainfrom
nmfisher:gltfio-filesystem-override
Open

gltfio: Allow compile-time override of GLTFIO_USE_FILESYSTEM#9733
nmfisher wants to merge 1 commit intogoogle:mainfrom
nmfisher:gltfio-filesystem-override

Conversation

@nmfisher
Copy link
Contributor

GLTFIO_USE_FILESYSTEM is hardcoded in FFilamentAsset.h depending on target platform (0 for emscripten/Android/iOS, 1 for others). This isn't flexible, consumers may want to disable the filesystem to force all gltf resources to be loaded from in-memory buffers (e.g. running on a sandboxed macos app with no filesystem access). This doesn't work under the current implementation because loadCgltfBuffers will always try to load from the filesystem when GLTFIO_USE_FILESYSTEM=1.

This PR adds a #ifndef GLTFIO_USE_FILESYSTEM check before defining GLTFIO_USE_FILESYSTEM so downstream consumers can decide at build time whether this is enabled or disabled by adding a CMake flag -DGLTFIO_USE_FILESYSTEM=0 or -DGLTFIO_USE_FILESYSTEM=1.

@nmfisher nmfisher force-pushed the gltfio-filesystem-override branch from 652c6b8 to cd3d01f Compare February 20, 2026 10:57
@nmfisher nmfisher force-pushed the gltfio-filesystem-override branch from cd3d01f to 65b27cd Compare February 20, 2026 10:59
@pixelflinger pixelflinger added the internal Issue/PR does not affect clients label Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Issue/PR does not affect clients

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants