59 Commits

Author SHA1 Message Date
Mathias Agopian
f9e56a11d1 feat: Make C++ exceptions and RTTI configurable (#9913)
Introduced the FILAMENT_ENABLE_EXCEPTIONS (default ON) and
FILAMENT_ENABLE_RTTI (default OFF) CMake options to control these
features globally. This replaces previous hardcoded, platform-specific
overrides.

Added a -E flag to build.sh to easily disable exceptions during
build configuration.

Removed hardcoded -fno-exceptions and -fno-rtti from
android/build.gradle to allow CMake to control these flags, but kept
-fno-rtti enabled by default for the Java/Android build as requested.

Documented in CMakeLists.txt and BUILDING.md that the JNI library
(Android/Java build) requires exceptions to be enabled.

Enabled RTTI specifically for the assimp target in
third_party/libassimp/tnt/CMakeLists.txt to fix compilation errors
caused by its use of dynamic_cast.

SIZEGUARD_BYPASS
2026-04-23 09:52:26 -07:00
Powei Feng
05dde7e2cf Update emsdk to 5.0.4 (#9921)
- Bumped GITHUB_EMSDK_VERSION to 5.0.4 in build scripts and docs.
- Fixed a compilation error in web/filament-js/jsbindings.cpp where stricter
  pointer binding rules in Emscripten 5.0.4 caused a build failure when
  returning a raw pointer wrapped in `emscripten::val`. Changed the lambda
  to return the raw pointer directly, leveraging Embind's `allow_raw_pointers()`.
2026-04-22 09:18:24 -07:00
Powei Feng
b6a7226213 Bump clang dep version from 16 to 17 (#9919)
The latest version of third_party/dawn requires clang 17.
2026-04-21 23:40:55 +00:00
Sungun Park
562b66c715 doc: Clarify MSVC support for windows
See issue #9894 for more context
2026-04-13 21:18:25 -07:00
Powei Feng
d4e0d051b1 docs: make docs more consistent and complete (#9620)
- Add documentation for specgen along with proper math rendering
- Adjust the heading size, capitalization of various READMEs.
- Add backend test README to the doc
- Rename the CI related tests to have prefix "CI:"
2026-01-21 22:22:12 +00:00
Powei Feng
af480a58c4 Reapply "build: improve build.sh for Android with documentation (#9500)"
This reverts commit 192738ecb9.
2025-12-11 17:09:20 -08:00
Powei Feng
192738ecb9 Revert "build: improve build.sh for Android with documentation (#9500)"
This reverts commit 32fcc1a81b.
2025-12-11 16:55:49 -08:00
Powei Feng
32fcc1a81b build: improve build.sh for Android with documentation (#9500)
- Fix Android build in build.sh so that the tools dir are
   properly set to corresponding folders for debug vs. release.
 - Update/consolidate documentation to explain the Android Studio
   workflow better.
 - Move documentation from outdated apps folder to BUILDING.md
2025-12-12 00:46:00 +00:00
Powei Feng
778cbe09d1 build: allow building tools separately (#9384)
Building tools separately is necessary for the existing
cross-complation usecase.  We generalize this by introducing
two cmake vars that enable exporting and importing
prebuilt tools.

The intended usecase is to enable ASAN-built filament without
having to run ASAN-built matc (which is prohibitively slow).

build.sh has been modified to add a `-y` flag forprebuilding
tools.
2025-10-31 22:23:15 +00:00
Mathias Agopian
f8e8c27c04 Add a Renderer API to force skipping frames (#9313)
* Add a Renderer API to force skipping frames

Renderer::skipNextFrames(size_t) can be used to force filament to
pretend the next N frames must be skipped. This is mostly useful for
debugging.

* Add DebugOptions to Settings

We still need to move the "Debug" features of gltf_viewer to this,
but this give us a framework to do it. 
Currently there is one debug option that allows to set a number of
frames to skip.

ViewerGui propose a button to skip 10 frames using this framework

* Update libs/viewer/src/Settings.cpp

Co-authored-by: Powei Feng <powei@google.com>

* Update libs/viewer/src/Settings.cpp

Co-authored-by: Powei Feng <powei@google.com>

---------

Co-authored-by: Powei Feng <powei@google.com>
2025-10-13 12:52:17 -07:00
Powei Feng
e0bd647955 github: Update to clang-16 for CI builds (#9093)
Also update documentation on official recommendation of clang
version.
2025-08-12 22:06:30 +00:00
Konrad Piascik
130e02da5c Add helper script to linux documentation (#8783) 2025-05-30 14:16:36 +00:00
Powei Feng
3d10ae3ee3 github: more build file refactoring (#8678)
- Move emscripten download into its own script
 - Refactor the common "CI choice" prompt into its own file.
 - Move the content of `build/common/ci-common.sh` to the
   "CI choice" script.
 - Mention the get-emscripten.sh script in BUILDING.md
2025-05-07 19:39:11 +00:00
Ben Doherty
ac0aea98c9 Fix Web build, update Emscripten SDK to 3.1.60 (#8350) 2025-01-15 11:42:39 -08:00
Powei Feng
ab12984912 Add Mesa software rasterizer BUILD.md instructions (#7860) 2024-05-16 10:03:50 -07:00
Powei Feng
85eb724a90 Reduce explicit swiftshader paths (#7848)
- Use custom ICD path to enable Swiftshader instead of
   specifying direct path to the lib.
   - Remove unused `swiftshader` directory in `build`
   - Remove swiftshader options in `build.sh` and cmakefiles
   - Change BUILD.md
 - Correctly handle XCB-only swapchain surface in VulkanPlatform
   for swiftshader.
 - Refactor `VulkanPlatform::ExtensionSet` so that `utils::CString`
   is used instead of string_view, so that we don't get into
   tricky lifetime issues with `const char*`
2024-05-14 17:40:54 +00:00
Sungun Park
7c6103a458 Update BUILDING.md for the latest instruction (#7267)
- filament can be built with Visual Studio 2022 as well.
- Fix the link to the Windows SDK.
2023-10-14 00:13:54 -07:00
Eliza Velasquez
58017a0e6a Tweak documentation
This is admittedly a very nitpicky change.

For most of the changes, I went through the various Markdown files and added
language names to the source blocks for better syntax highlighting on GitHub. It
also makes it easier to copy and paste commands without copying the leading `$`.
I avoided changing anything in `third_party`.

Additionally, I added some instructions for compiling the Android samples on the
command line and fixed some typos.
2023-09-12 20:28:46 +00:00
Romain Guy
96cccc83c6 Update BUILDING.md 2023-08-06 08:44:55 -07:00
조다니엘(Daniel Cho)
47e3be11f0 Fix typo in BUILDING.md (#6942) 2023-07-07 08:13:37 -07:00
Romain Guy
9fb96cd200 Upgrade to AGP/Gradle 8.0.0, and other dependency upgrades (#6753)
This upgrade lets us remove several hacks we needed to properly publish
our artifacts on Maven.
2023-04-20 18:02:23 -07:00
Powei Feng
ddb6a7fa93 Update Linux build instructions (#6438) 2023-01-10 16:42:44 -08:00
Romain Guy
8dae181c2f Upgrade AGP and dependencies including plugins (#6078)
This moves to a new, maintained Maven publishing plugin.
2022-09-15 16:05:18 -07:00
Philip Rideout
bfe8a8aa18 WASM: Allow clients to enable pthreads.
Filament does not yet fully support threads with WASM, but this is a
baby step in that direction.

To enable experimental pthreads support, enable the WEBGL_PTHREADS CMake
option. This will enable pthreads support in `gltfio` and `utils`, which
is known to work, but not when served with GitHub Pages.

The web server must emit COOP, COEP and CORP headers, so our build
instructions now recommend the use of `emrun` for local testing.

This also changes our demos so that they do not use unpkg, which
does not work when using `emrun`, due to cross-origin restrictions.
2022-08-12 15:43:00 -07:00
Philip Rideout
4afd0c5456 Upgrade to emscripten 3.1.15 and remove workaround.
Starting with 3.1.14, embind started to support for `noexcept`
which caused multiple definition errors since we have a workaround
in place that alreadys supplies template instantiations for `noexcept`.

This change should not affect G3 since our JS bindings are not used
in G3.

The upstream fix is here:
https://github.com/emscripten-core/emscripten/pull/17140

Fixes #5789.
2022-07-27 09:10:29 -07:00
Philip Rideout
74346d0046 Update instructions for Vulkan + macOS. (#5693) 2022-06-15 11:50:33 -07:00
Philip Rideout
3a8685cd15 Upgrade emsdk to 3.1.9 2022-05-03 08:10:26 -07:00
Philip Rideout
fa6d9a4b01 Upgrade emsripten to 3.1.5 2022-02-18 14:36:20 -08:00
Romain Guy
0181584735 Update build tools (#4866)
* Update build tools

SDK API level 31
NDK 23
Kotlin 1.6

* Preserve tool suffix for Windows
2021-11-17 13:19:45 -08:00
Romain Guy
095179eeb3 Enabled Gradle configuration caching and rename properties (#4769)
* Fix configurationg caching problems

* Enable Gradle configuration caching

* Update BUILDING.md

* Update RELEASE_NOTES.md

Co-authored-by: Mathias Agopian <mathias@google.com>

Co-authored-by: Benjamin Doherty <bendoherty@google.com>
2021-10-26 12:47:35 -07:00
Romain Guy
2dadad1e87 Upgrade AGP (#4402)
* Upgrade AGP

* Request Java 11 to build Android artifacts with AGP 7.0

* Add distribution

* Use a cheaper method to pick Java 11
2021-07-28 15:43:03 -07:00
Romain Guy
a5221fc816 Update BUILDING.md 2021-07-15 09:21:36 -07:00
Romain Guy
29f6616cee Update BUILDING.md 2021-07-15 09:19:50 -07:00
Romain Guy
d6b32e5923 Remove support for Java/desktop builds (#4263)
* Remove support for Java/desktop builds

These builds are never tested nor used on our end. We cannot
guarantee their proper support. It should also be possible
for an app to handle this itself.

* Remove Tungsten since it cannot be compiled anymore
2021-07-07 17:18:58 -07:00
Philip Rideout
8ef4c54712 Upgrade emsdk to 2.0.23 2021-06-08 08:36:32 -07:00
Ben Doherty
bd8ea711fd Add a FILAMENT_SUPPORTS_OPENGL CMake option (#3966) 2021-05-15 14:40:06 -07:00
Romain Guy
c66915209e Update our build to the latest and greatest (#3902)
The new requirements are as follow:
- CMake 3.19
- Ninja 1.10
- Android Studio 4.2
- Android NDK 22.1
- Gradle 7.0
- Kotlin 1.5
2021-05-06 10:13:10 -07:00
Philip Rideout
f76084213c Update emscripten to 2.0.17
The latest version of emscripten includes major updates to LLVM and
Binaryen.
2021-04-14 10:13:24 -07:00
Romain Guy
411ae23512 Update Kotlin, Gradle and NDK dependencies (#3470)
* Update Kotlin, Gradle and NDK dependencies

* Update CI build
2021-01-29 12:09:08 -08:00
Philip Rideout
7805687f7a Update emsdk version in README. 2021-01-16 09:17:56 -08:00
Philip Rideout
75c4f36f96 Add Dockerfile and test script for SwiftShader.
This adds a Dockerfile and a new bash script that makes it
east to invoke the appopriate Docker commands.

This does not yet enable a GitHub Action because of intermittent
issues that we have not yet ironed out.
2020-10-21 10:50:25 -07:00
Philip Rideout
696327b35a Add SwiftShader to BUILDING.md 2020-08-31 11:34:07 -07:00
Philip Rideout
2f294549a7 Migrate the SwiftShader build to Vulkan.
This also adds a -t flag to the easy build script for convenience.

SwiftShader on Vulkan can now be used as follows.

    git clone https://github.com/google/swiftshader.git
    cd swiftshader/build
    cmake .. &&  make -j && export SWIFTSHADER_LD_LIBRARY_PATH=`pwd`
    cd ../filament
    ./build.sh -t debug && ./out/cmake-debug/samples/gltf_viewer -a vulkan

Note that third_party/swiftshader does not need to exist since we
already have Vulkan headers. I will remove it in a subsequent PR.
2020-08-28 09:47:29 -07:00
Philip Rideout
fe280c0c3b BUILDING.md, add Windows hints. (#2997)
* BUILDING.md, add Windows hints.

* Update BUILDING.md

Co-authored-by: Ben Doherty <bendoherty@google.com>

* Update BUILDING.md

Co-authored-by: Ben Doherty <bendoherty@google.com>

Co-authored-by: Ben Doherty <bendoherty@google.com>
2020-08-24 13:42:31 -07:00
Romain Guy
c6d9d4a9ae Update AGP, NDK and androidx.core (#2826) 2020-07-17 09:24:33 -07:00
Philip Rideout
6eac638fd2 Remove old method for JS doc generation.
The new way is to follow the instructions at the top of
`web/docs/build.py`.

The option in build.sh has been unused for a while. Invoking Python from
CMake was pointless, especially since I don't want to force other
developers to install a specific version of Python etc.
2020-07-13 16:07:49 -07:00
Philip Rideout
4fa987c698 WebGL: Upgrade emsdk and refactor initialization.
Since postRun can no longer be set from within the extern post JS, we
now use the promise rather than postRun.

This upgrades emsdk to 1.39.19 (see note in #2800).
2020-07-13 13:02:26 -07:00
Romain Guy
1f29df6da4 Add a note about AGP 4.0.0 2020-05-28 14:05:20 -07:00
Mathias Agopian
d08a4e8bd9 Very basic SwiftShader support (#2523)
* Very basic SwiftShader support

- we only provide SwiftShader's khornos headers in third_party

- swiftshader itself must be available on the host (for instance it
  can be compiled from source).

- to enable pass -DFILAMENT_USE_SWIFTSHADER=ON option to cmake

- only GLES 3.0 is supported. Vulkan is not yet supported.

CMake should find the swiftshader libraries automatically, but if
they're installed in a non-standard place, the environment variable
SWIFTSHADER_LD_LIBRARY_PATH can be set to that place.


We also use the GLES 3.0 headers everywhere, since we don't rely on 3.1
at this point.

* add a tnt folder with a README
2020-05-12 17:45:16 -07:00
Philip Rideout
823f5c9c1f WebGL: upgrade and accommodate EMSDK.
Fixes #2515.
2020-05-11 13:58:07 -07:00