Skip to content

Commit 2f7a848

Browse files
authored
chore: update filament (remove patch) + update bullet3 (#207)
update submodules dependencies + remove patch from filament as one of our PRs was merged: - google/filament#7686 ~~Currently blocked by android build errors:~~ - ~~google/filament#7931 Not blocked any longer since react-native apps now use NDK 27 since version 0.77
1 parent 42dca91 commit 2f7a848

252 files changed

Lines changed: 14525 additions & 6382 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/AppExampleFabric/scripts/compile-materials.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -e
44

55
# Make sure the filament matc tool is available:
6-
matc_path=../../../filament/out/cmake-release/tools/matc/matc
6+
matc_path=../../filament/out/cmake-release/tools/matc/matc
77
if [ ! -f "$matc_path" ]; then
88
echo "The filament matc tool is missing. Did you build Filament properly?"
99
exit 1
1.22 KB
Binary file not shown.
-268 KB
Binary file not shown.

filament

Submodule filament updated 38791 files

package/android/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ target_include_directories(
112112
"${NODE_MODULES_DIR}/react-native/ReactAndroid/src/main/jni/react/turbomodule" # <-- CallInvokerHolder JNI wrapper
113113
"${FILAMENT_DIR}/include"
114114
"${BULLET3_DIR}/include"
115+
"${CMAKE_CURRENT_SOURCE_DIR}/../../filament/filament/backend/include" # <-- Filament backend private headers (dev)
116+
"${FILAMENT_DIR}/include/private" # <-- Filament private headers (distributed package)
115117
)
116118

117119
# Link everything together

package/android/gradle.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Filament_kotlinVersion=1.7.0
2-
Filament_minSdkVersion=21
3-
Filament_targetSdkVersion=31
4-
Filament_compileSdkVersion=31
5-
Filament_ndkversion=25.1.8937393
2+
Filament_minSdkVersion=24
3+
Filament_targetSdkVersion=35
4+
Filament_compileSdkVersion=35
5+
Filament_ndkversion=27.1.12297006

package/android/libs/filament/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ Copy your platform's Makefile below into a `Makefile` inside the same directory.
9292
### Linux
9393
9494
```make
95-
FILAMENT_LIBS=-lfilament -lbackend -lbluegl -lbluevk -lfilabridge -lfilaflat -lutils -lgeometry -lsmol-v -lvkshaders -libl
95+
FILAMENT_LIBS=-lfilament -lbackend -lbluegl -lbluevk -lfilabridge -lfilaflat -lutils -lgeometry -lsmol-v -libl -labseil
9696
CC=clang++
9797
9898
main: main.o
9999
$(CC) -Llib/x86_64/ main.o $(FILAMENT_LIBS) -lpthread -lc++ -ldl -o main
100100
101101
main.o: main.cpp
102-
$(CC) -Iinclude/ -std=c++17 -pthread -c main.cpp
102+
$(CC) -Iinclude/ -std=c++20 -pthread -c main.cpp
103103
104104
clean:
105105
rm -f main main.o
@@ -110,15 +110,16 @@ clean:
110110
### macOS
111111

112112
```make
113-
FILAMENT_LIBS=-lfilament -lbackend -lbluegl -lbluevk -lfilabridge -lfilaflat -lutils -lgeometry -lsmol-v -lvkshaders -libl
113+
FILAMENT_LIBS=-lfilament -lbackend -lbluegl -lbluevk -lfilabridge -lfilaflat -lutils -lgeometry -lsmol-v -libl -labseil
114114
FRAMEWORKS=-framework Cocoa -framework Metal -framework CoreVideo
115115
CC=clang++
116+
ARCH ?= $(shell uname -m)
116117

117118
main: main.o
118-
$(CC) -Llib/x86_64/ main.o $(FILAMENT_LIBS) $(FRAMEWORKS) -o main
119+
$(CC) -Llib/$(ARCH)/ main.o $(FILAMENT_LIBS) $(FRAMEWORKS) -o main
119120

120121
main.o: main.cpp
121-
$(CC) -Iinclude/ -std=c++17 -c main.cpp
122+
$(CC) -Iinclude/ -std=c++20 -c main.cpp
122123

123124
clean:
124125
rm -f main main.o
@@ -139,15 +140,15 @@ used to change the run-time library version.
139140

140141
```make
141142
FILAMENT_LIBS=filament.lib backend.lib bluegl.lib bluevk.lib filabridge.lib filaflat.lib \
142-
utils.lib geometry.lib smol-v.lib ibl.lib vkshaders.lib
143+
utils.lib geometry.lib smol-v.lib ibl.lib abseil.lib
143144
CC=cl.exe
144145

145146
main.exe: main.obj
146147
$(CC) main.obj /link /libpath:"lib\\x86_64\\mt\\" $(FILAMENT_LIBS) \
147148
gdi32.lib user32.lib opengl32.lib
148149

149150
main.obj: main.cpp
150-
$(CC) /MT /Iinclude\\ /std:c++17 /c main.cpp
151+
$(CC) /MT /Iinclude\\ /std:c++20 /c main.cpp
151152

152153
clean:
153154
del main.exe main.obj

package/android/libs/filament/include/backend/AcquiredImage.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#define TNT_FILAMENT_BACKEND_PRIVATE_ACQUIREDIMAGE_H
1919

2020
#include <backend/DriverEnums.h>
21+
#include <math/mat3.h>
2122

2223
namespace filament::backend {
2324

package/android/libs/filament/include/backend/BufferDescriptor.h

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,15 @@
2020
#define TNT_FILAMENT_BACKEND_BUFFERDESCRIPTOR_H
2121

2222
#include <utils/compiler.h>
23-
#include <utils/ostream.h>
23+
24+
#include <utility>
2425

2526
#include <stddef.h>
2627

28+
namespace utils::io {
29+
class ostream;
30+
} // namespace utils::io
31+
2732
namespace filament::backend {
2833

2934
class CallbackHandler;
@@ -89,20 +94,21 @@ class UTILS_PUBLIC BufferDescriptor {
8994
* @param callback A callback used to release the CPU buffer from this BufferDescriptor
9095
* @param user An opaque user pointer passed to the callback function when it's called
9196
*/
92-
BufferDescriptor(void const* buffer, size_t size,
93-
Callback callback = nullptr, void* user = nullptr) noexcept
97+
BufferDescriptor(void const* buffer, size_t const size,
98+
Callback const callback = nullptr, void* user = nullptr) noexcept
9499
: buffer(const_cast<void*>(buffer)), size(size), mCallback(callback), mUser(user) {
95100
}
96101

97102
/**
98103
* Creates a BufferDescriptor that references a CPU memory-buffer
99104
* @param buffer Memory address of the CPU buffer to reference
100105
* @param size Size of the CPU buffer in bytes
106+
* @param handler A custom handler for the callback
101107
* @param callback A callback used to release the CPU buffer from this BufferDescriptor
102108
* @param user An opaque user pointer passed to the callback function when it's called
103109
*/
104-
BufferDescriptor(void const* buffer, size_t size,
105-
CallbackHandler* handler, Callback callback, void* user = nullptr) noexcept
110+
BufferDescriptor(void const* buffer, size_t const size,
111+
CallbackHandler* handler, Callback const callback, void* user = nullptr) noexcept
106112
: buffer(const_cast<void*>(buffer)), size(size),
107113
mCallback(callback), mUser(user), mHandler(handler) {
108114
}
@@ -116,8 +122,9 @@ class UTILS_PUBLIC BufferDescriptor {
116122
*
117123
* @param buffer Memory address of the CPU buffer to reference
118124
* @param size Size of the CPU buffer in bytes
125+
* @param data A pointer to the data
119126
* @param handler Handler to use to dispatch the callback, or nullptr for the default handler
120-
* @return a new BufferDescriptor
127+
* @return A new BufferDescriptor
121128
*/
122129
template<typename T, void(T::*method)(void const*, size_t)>
123130
static BufferDescriptor make(void const* buffer, size_t size, T* data,
@@ -164,7 +171,7 @@ class UTILS_PUBLIC BufferDescriptor {
164171
* @param callback The new callback function
165172
* @param user An opaque user pointer passed to the callbeck function when it's called
166173
*/
167-
void setCallback(Callback callback, void* user = nullptr) noexcept {
174+
void setCallback(Callback const callback, void* user = nullptr) noexcept {
168175
this->mCallback = callback;
169176
this->mUser = user;
170177
this->mHandler = nullptr;
@@ -176,7 +183,7 @@ class UTILS_PUBLIC BufferDescriptor {
176183
* @param callback The new callback function
177184
* @param user An opaque user pointer passed to the callbeck function when it's called
178185
*/
179-
void setCallback(CallbackHandler* handler, Callback callback, void* user = nullptr) noexcept {
186+
void setCallback(CallbackHandler* handler, Callback const callback, void* user = nullptr) noexcept {
180187
mCallback = callback;
181188
mUser = user;
182189
mHandler = handler;

0 commit comments

Comments
 (0)