Compare commits

...

28 Commits

Author SHA1 Message Date
Nick Fisher
5feaa57d81 update Android CMakeLists to support Manipulator.cpp 2023-10-11 17:17:21 +11:00
Nick Fisher
5fdb420f30 remove logging 2023-10-11 17:16:51 +11:00
Nick Fisher
f60f8eb4bd update Windows CMakeLists to support Manipulator 2023-10-11 17:16:40 +11:00
Nick Fisher
b7f50df2dc camera fixes for assets with large bounding boxes 2023-10-11 14:12:04 +08:00
Nick Fisher
2923f5907f remove unused loader callback on macOS 2023-10-11 11:11:00 +08:00
Nick Fisher
98bcf5d7ad implement picker/getNameForEntity 2023-10-11 11:10:47 +08:00
Nick Fisher
79292914d2 fix type for nativeTextureId and add picker definition 2023-10-11 09:30:01 +08:00
Nick Fisher
a11be5d9ff recompile macOS libs 2023-10-11 09:28:46 +08:00
Nick Fisher
9801fe9777 add first API method 2023-10-10 21:37:39 +08:00
Nick Fisher
32bff81f53 re-implement pixel buffer on Windows with compile-time switch 2023-10-10 20:08:50 +11:00
Nick Fisher
8c82edd3d2 add Cmake/preprocessor define to switch between ANGLE/OpenGL on Windows 2023-10-10 19:26:31 +11:00
Nick Fisher
e28fb8223a remove now unused assets folder from pubspec 2023-10-10 18:10:31 +11:00
Nick Fisher
135465755d add missing setPostProcessing definitions 2023-10-10 18:10:14 +11:00
Nick Fisher
d45c211ad8 allow asset:// URIs on Windows 2023-10-10 18:10:02 +11:00
Nick Fisher
1da0600c11 move include outside extern C scope to satisfy iOS 2023-10-04 15:46:01 +08:00
Nick Fisher
b68c5117b4 update README 2023-10-04 14:50:54 +08:00
Nick Fisher
a37ac79b07 remove accidentally commited android/.cxx 2023-10-04 14:50:46 +08:00
Nick Fisher
45576466c9 allow passing uberarchive path to FilamentViewer and expose destroy_viewer 2023-10-04 14:49:48 +08:00
Nick Fisher
6980e5cb23 move uberz assets to example project 2023-10-04 14:45:58 +08:00
Nick Fisher
c1f8eae85e add toggle for postprocessing and minor cleanup work 2023-10-03 22:04:37 +08:00
Nick Fisher
d49b43c191 use consistent size/pixel ratio 2023-10-03 21:49:34 +08:00
Nick Fisher
cb7881af09 re-track LFS assets 2023-10-03 21:30:37 +08:00
Nick Fisher
bc0fd6577b re-track LFS assets 2023-10-03 21:30:10 +08:00
Nick Fisher
ba95e5e398 add option to force loading gltf and check for bool when setting camera 2023-10-03 21:29:34 +08:00
Nick Fisher
eeac96a396 more logging and fix return values when setting camera to asset camera 2023-10-03 21:29:34 +08:00
Nick Fisher
af18f18524 update example project to allow setting camera to GLB asset camera 2023-10-03 21:29:34 +08:00
Nick Fisher
efbe556d6f fix asset:// URIs on Android 2023-10-03 21:16:27 +08:00
Nick Fisher
e72bd97450 remove outdated kotlin-extensions 2023-10-03 16:30:36 +08:00
320 changed files with 6206 additions and 5205 deletions

50
.gitattributes vendored
View File

@@ -545,3 +545,53 @@ assets/materials_ios_arm64.uberz filter=lfs diff=lfs merge=lfs -text
example/assets/shapes/ filter=lfs diff=lfs merge=lfs -text
example/assets/shapes/*.* filter=lfs diff=lfs merge=lfs -text
ios/lib/libmikktspace.a filter=lfs diff=lfs merge=lfs -text
example/assets/shapes/texture_test.png filter=lfs diff=lfs merge=lfs -text
example/assets/BusterDrone/scene.bin filter=lfs diff=lfs merge=lfs -text
example/assets/FlightHelmet/FlightHelmet_baseColor4.png filter=lfs diff=lfs merge=lfs -text
example/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic.png filter=lfs diff=lfs merge=lfs -text
example/assets/default_env filter=lfs diff=lfs merge=lfs -text
example/assets/BusterDrone/scene.gltf filter=lfs diff=lfs merge=lfs -text
example/assets/shapes/shapes.gltf filter=lfs diff=lfs merge=lfs -text
example/assets/FlightHelmet filter=lfs diff=lfs merge=lfs -text
example/assets/FlightHelmet/FlightHelmet_baseColor1.png filter=lfs diff=lfs merge=lfs -text
example/assets/FlightHelmet/FlightHelmet_baseColor2.png filter=lfs diff=lfs merge=lfs -text
example/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic2.png filter=lfs diff=lfs merge=lfs -text
example/assets/BusterDrone/textures/Boden_normal.jpg filter=lfs diff=lfs merge=lfs -text
example/assets/BusterDrone/textures/body_baseColor.jpg filter=lfs diff=lfs merge=lfs -text
example/assets/BusterDrone/textures/body_emissive.jpg filter=lfs diff=lfs merge=lfs -text
example/assets/BusterDrone/textures/material_baseColor.jpg filter=lfs diff=lfs merge=lfs -text
example/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic3.png filter=lfs diff=lfs merge=lfs -text
example/assets/BusterDrone/textures/Boden_metallicRoughness.jpg filter=lfs diff=lfs merge=lfs -text
example/assets/FlightHelmet/FlightHelmet_normal.png filter=lfs diff=lfs merge=lfs -text
example/assets/FlightHelmet/FlightHelmet_normal1.png filter=lfs diff=lfs merge=lfs -text
example/assets/FlightHelmet/FlightHelmet_normal3.png filter=lfs diff=lfs merge=lfs -text
example/assets/FlightHelmet/FlightHelmet.gltf filter=lfs diff=lfs merge=lfs -text
example/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic4.png filter=lfs diff=lfs merge=lfs -text
example/assets/FlightHelmet/README.md filter=lfs diff=lfs merge=lfs -text
example/assets/background.ktx filter=lfs diff=lfs merge=lfs -text
example/assets/default_env/default_env_skybox.ktx filter=lfs diff=lfs merge=lfs -text
example/assets/shapes/shapes.blend filter=lfs diff=lfs merge=lfs -text
example/assets/BusterDrone filter=lfs diff=lfs merge=lfs -text
example/assets/BusterDrone/textures/material_metallicRoughness.jpg filter=lfs diff=lfs merge=lfs -text
example/assets/FlightHelmet/FlightHelmet_normal2.png filter=lfs diff=lfs merge=lfs -text
example/assets/background.png filter=lfs diff=lfs merge=lfs -text
example/assets/shapes/shapes.bin filter=lfs diff=lfs merge=lfs -text
example/assets/BusterDrone/textures filter=lfs diff=lfs merge=lfs -text
example/assets/BusterDrone/textures/body_normal.jpg filter=lfs diff=lfs merge=lfs -text
example/assets/BusterDrone/textures/material_normal.jpg filter=lfs diff=lfs merge=lfs -text
example/assets/FlightHelmet/FlightHelmet_baseColor.png filter=lfs diff=lfs merge=lfs -text
example/assets/FlightHelmet/FlightHelmet_normal4.png filter=lfs diff=lfs merge=lfs -text
example/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic1.png filter=lfs diff=lfs merge=lfs -text
example/assets/default_env/default_env_ibl.ktx filter=lfs diff=lfs merge=lfs -text
example/assets/shapes/shapes.glb filter=lfs diff=lfs merge=lfs -text
example/assets/BusterDrone/textures/Boden_baseColor.jpg filter=lfs diff=lfs merge=lfs -text
example/assets/BusterDrone/textures/body_metallicRoughness.jpg filter=lfs diff=lfs merge=lfs -text
example/assets/FlightHelmet/FlightHelmet.bin filter=lfs diff=lfs merge=lfs -text
example/assets/FlightHelmet/FlightHelmet_baseColor3.png filter=lfs diff=lfs merge=lfs -text
assets/default.uberz filter=lfs diff=lfs merge=lfs -text
windows/lib/**/*.* filter=lfs diff=lfs merge=lfs -text
windows/lib/Debug/angle/* filter=lfs diff=lfs merge=lfs -text
windows/lib/Debug/opengl/* filter=lfs diff=lfs merge=lfs -text
windows/lib/Release/opengl/* filter=lfs diff=lfs merge=lfs -text
windows/lib/Release/angle/* filter=lfs diff=lfs merge=lfs -text
windows/lib/**/* filter=lfs diff=lfs merge=lfs -text

View File

@@ -71,7 +71,7 @@ dependencies:
path: <path where you cloned the repository>
```
# Usage
# Basic Usage
See the `example` project for a complete sample of the below steps.
@@ -180,6 +180,24 @@ class MyApp extends StatelessWidget {
}
```
## Advanced Usage
If you want to work with custom materials, you will need some (basic knowledge of the underlying Filament library)[https://google.github.io/filament/Materials.html#compilingmaterials].
Things to keep in mind:
- You must compile materials with the correct version of Filament (see the table above). Keep in mind that versions may not be identical across platforms so you may need multiple uberz files for multiple platforms.
e.g. the lit_opaque.uberz file has been created from a Filament build:
```
cd out/cmake-android-release-aarch64/libs/gltfio
uberz -TSHADINGMODEL=lit -TBLENDING=opaque -o lit_opaque_43.uberz lit_opaque
```
(note that the number in the filename corresponds to the Material version, not the Filament version. Not every Filament version requires a new Material version).
# Building Filament from source
```

View File

@@ -1,8 +0,0 @@
{
"allAbis": [
"arm64-v8a"
],
"validAbis": [
"ARM64_V8A"
]
}

View File

@@ -1 +0,0 @@
[]

View File

@@ -1,20 +0,0 @@
{
"ndkHandlerSupportedAbis": [
"ARMEABI_V7A",
"ARM64_V8A",
"X86",
"X86_64"
],
"ndkHandlerDefaultAbis": [
"ARMEABI_V7A",
"ARM64_V8A",
"X86",
"X86_64"
],
"externalNativeBuildAbiFilters": [],
"ndkConfigAbiFilters": [
"arm64-v8a"
],
"splitsFilterAbis": [],
"ideBuildOnlyTargetAbi": true
}

View File

@@ -1,389 +0,0 @@
# This is the CMakeCache file.
# For build in directory: f:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a
# It was generated by CMake: C:/Users/Nick/AppData/Local/Android/Sdk/cmake/3.18.1/bin/cmake.exe
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.
########################
# EXTERNAL cache entries
########################
//No help, variable specified on the command line.
ANDROID_ABI:UNINITIALIZED=arm64-v8a
//No help, variable specified on the command line.
ANDROID_NDK:UNINITIALIZED=C:\Users\Nick\AppData\Local\Android\Sdk\ndk\25.2.9519653
//No help, variable specified on the command line.
ANDROID_PLATFORM:UNINITIALIZED=android-22
//Path to a program.
CMAKE_ADDR2LINE:FILEPATH=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-addr2line.exe
//No help, variable specified on the command line.
CMAKE_ANDROID_ARCH_ABI:UNINITIALIZED=arm64-v8a
//No help, variable specified on the command line.
CMAKE_ANDROID_NDK:UNINITIALIZED=C:\Users\Nick\AppData\Local\Android\Sdk\ndk\25.2.9519653
//Archiver
CMAKE_AR:FILEPATH=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-ar.exe
//Flags used by the compiler during all build types.
CMAKE_ASM_FLAGS:STRING=
//Flags used by the compiler during debug builds.
CMAKE_ASM_FLAGS_DEBUG:STRING=
//Flags used by the compiler during release builds.
CMAKE_ASM_FLAGS_RELEASE:STRING=
//Choose the type of build, options are: None Debug Release RelWithDebInfo
// MinSizeRel ...
CMAKE_BUILD_TYPE:STRING=Debug
//LLVM archiver
CMAKE_CXX_COMPILER_AR:FILEPATH=CMAKE_CXX_COMPILER_AR-NOTFOUND
//Generate index for LLVM archive
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=CMAKE_CXX_COMPILER_RANLIB-NOTFOUND
//Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING=
//Flags used by the compiler during debug builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=
//Flags used by the CXX compiler during MINSIZEREL builds.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the compiler during release builds.
CMAKE_CXX_FLAGS_RELEASE:STRING=
//Flags used by the CXX compiler during RELWITHDEBINFO builds.
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//Libraries linked by default with all C++ applications.
CMAKE_CXX_STANDARD_LIBRARIES:STRING=-latomic -lm
//LLVM archiver
CMAKE_C_COMPILER_AR:FILEPATH=CMAKE_C_COMPILER_AR-NOTFOUND
//Generate index for LLVM archive
CMAKE_C_COMPILER_RANLIB:FILEPATH=CMAKE_C_COMPILER_RANLIB-NOTFOUND
//Flags used by the compiler during all build types.
CMAKE_C_FLAGS:STRING=
//Flags used by the compiler during debug builds.
CMAKE_C_FLAGS_DEBUG:STRING=
//Flags used by the C compiler during MINSIZEREL builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the compiler during release builds.
CMAKE_C_FLAGS_RELEASE:STRING=
//Flags used by the C compiler during RELWITHDEBINFO builds.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//Libraries linked by default with all C applications.
CMAKE_C_STANDARD_LIBRARIES:STRING=-latomic -lm
//Path to a program.
CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND
//Flags used by the linker.
CMAKE_EXE_LINKER_FLAGS:STRING=
//Flags used by the linker during DEBUG builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during MINSIZEREL builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during RELEASE builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during RELWITHDEBINFO builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//No help, variable specified on the command line.
CMAKE_EXPORT_COMPILE_COMMANDS:UNINITIALIZED=ON
//No help, variable specified on the command line.
CMAKE_FIND_ROOT_PATH:UNINITIALIZED=F:\Projects\polyvox\polyvox_filament\android\.cxx\cmake\debug\prefab\arm64-v8a\prefab
//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/Project
//No help, variable specified on the command line.
CMAKE_LIBRARY_OUTPUT_DIRECTORY:UNINITIALIZED=F:\Projects\polyvox\polyvox_filament\example\build\polyvox_filament\intermediates\cmake\debug\obj\arm64-v8a
//Path to a program.
CMAKE_LINKER:FILEPATH=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/ld.lld.exe
//No help, variable specified on the command line.
CMAKE_MAKE_PROGRAM:UNINITIALIZED=C:\Users\Nick\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe
//Flags used by the linker during the creation of modules.
CMAKE_MODULE_LINKER_FLAGS:STRING=
//Flags used by the linker during the creation of modules during
// DEBUG builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during the creation of modules during
// MINSIZEREL builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during the creation of modules during
// RELEASE builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during the creation of modules during
// RELWITHDEBINFO builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Path to a program.
CMAKE_NM:FILEPATH=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-nm.exe
//Path to a program.
CMAKE_OBJCOPY:FILEPATH=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-objcopy.exe
//Path to a program.
CMAKE_OBJDUMP:FILEPATH=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-objdump.exe
//Value Computed by CMake
CMAKE_PROJECT_DESCRIPTION:STATIC=
//Value Computed by CMake
CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
//Value Computed by CMake
CMAKE_PROJECT_NAME:STATIC=Project
//Ranlib
CMAKE_RANLIB:FILEPATH=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-ranlib.exe
//Path to a program.
CMAKE_READELF:FILEPATH=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-readelf.exe
//Flags used by the linker during the creation of dll's.
CMAKE_SHARED_LINKER_FLAGS:STRING=
//Flags used by the linker during the creation of shared libraries
// during DEBUG builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during the creation of shared libraries
// during MINSIZEREL builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during the creation of shared libraries
// during RELEASE builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during the creation of shared libraries
// during RELWITHDEBINFO builds.
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//If set, runtime paths are not added when installing shared libraries,
// but are added when building.
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
//If set, runtime paths are not added when using shared libraries.
CMAKE_SKIP_RPATH:BOOL=NO
//Flags used by the linker during the creation of static libraries
// during all build types.
CMAKE_STATIC_LINKER_FLAGS:STRING=
//Flags used by the linker during the creation of static libraries
// during DEBUG builds.
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during the creation of static libraries
// during MINSIZEREL builds.
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during the creation of static libraries
// during RELEASE builds.
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during the creation of static libraries
// during RELWITHDEBINFO builds.
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Strip
CMAKE_STRIP:FILEPATH=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-strip.exe
//No help, variable specified on the command line.
CMAKE_SYSTEM_NAME:UNINITIALIZED=Android
//No help, variable specified on the command line.
CMAKE_SYSTEM_VERSION:UNINITIALIZED=22
//The CMake toolchain file
CMAKE_TOOLCHAIN_FILE:FILEPATH=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/build/cmake/android.toolchain.cmake
//If this value is on, makefiles will be generated without the
// .SILENT directive, and all commands will be echoed to the console
// during the make. This is useful for debugging only. With Visual
// Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
//Value Computed by CMake
Project_BINARY_DIR:STATIC=F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a
//Value Computed by CMake
Project_SOURCE_DIR:STATIC=F:/Projects/polyvox/polyvox_filament/android
//Dependencies for the target
polyvox_filament_android_LIB_DEPENDS:STATIC=general;FILAMENT_SHADERS;general;-landroid;general;-llog;general;-lgltfio_core;general;-lfilament;general;-lbackend;general;-lgeometry;general;-lfilameshio;general;-lfilamat;general;-lfilabridge;general;-lfilament-iblprefilter;general;-lcamutils;general;-lfilaflat;general;-ldracodec;general;-libl;general;-lktxreader;general;-limageio;general;-limage;general;-lutils;general;-ltinyexr;general;-lstb;general;-lbluevk;general;-lvkshaders;general;-luberzlib;general;-lsmol-v;general;-luberarchive;general;-lmeshoptimizer;general;-lgeometry;general;-lbasis_transcoder;general;-lEGL;general;-lGLESv3;general;-lpng;general;-lz;general;-lzstd;
########################
# INTERNAL cache entries
########################
//ADVANCED property for variable: CMAKE_ADDR2LINE
CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_AR
CMAKE_AR-ADVANCED:INTERNAL=1
//This is the directory where this CMakeCache.txt was created
CMAKE_CACHEFILE_DIR:INTERNAL=f:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a
//Major version of cmake used to create the current loaded cache
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
//Minor version of cmake used to create the current loaded cache
CMAKE_CACHE_MINOR_VERSION:INTERNAL=18
//Patch version of cmake used to create the current loaded cache
CMAKE_CACHE_PATCH_VERSION:INTERNAL=1
//Path to CMake executable.
CMAKE_COMMAND:INTERNAL=C:/Users/Nick/AppData/Local/Android/Sdk/cmake/3.18.1/bin/cmake.exe
//Path to cpack program executable.
CMAKE_CPACK_COMMAND:INTERNAL=C:/Users/Nick/AppData/Local/Android/Sdk/cmake/3.18.1/bin/cpack.exe
//Path to ctest program executable.
CMAKE_CTEST_COMMAND:INTERNAL=C:/Users/Nick/AppData/Local/Android/Sdk/cmake/3.18.1/bin/ctest.exe
//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR
CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB
CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_STANDARD_LIBRARIES
CMAKE_CXX_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_COMPILER_AR
CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB
CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_STANDARD_LIBRARIES
CMAKE_C_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_DLLTOOL
CMAKE_DLLTOOL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//Name of external makefile project generator.
CMAKE_EXTRA_GENERATOR:INTERNAL=
//Name of generator.
CMAKE_GENERATOR:INTERNAL=Ninja
//Generator instance identifier.
CMAKE_GENERATOR_INSTANCE:INTERNAL=
//Name of generator platform.
CMAKE_GENERATOR_PLATFORM:INTERNAL=
//Name of generator toolset.
CMAKE_GENERATOR_TOOLSET:INTERNAL=
//Source directory with the top level CMakeLists.txt file for this
// project
CMAKE_HOME_DIRECTORY:INTERNAL=F:/Projects/polyvox/polyvox_filament/android
//Install .so files without execute permission.
CMAKE_INSTALL_SO_NO_EXE:INTERNAL=0
//ADVANCED property for variable: CMAKE_LINKER
CMAKE_LINKER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_NM
CMAKE_NM-ADVANCED:INTERNAL=1
//number of local generators
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
//ADVANCED property for variable: CMAKE_OBJCOPY
CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_OBJDUMP
CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
//Platform information initialized
CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RANLIB
CMAKE_RANLIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_READELF
CMAKE_READELF-ADVANCED:INTERNAL=1
//Path to CMake installation.
CMAKE_ROOT:INTERNAL=C:/Users/Nick/AppData/Local/Android/Sdk/cmake/3.18.1/share/cmake-3.18
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_RPATH
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STRIP
CMAKE_STRIP-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1

View File

@@ -1,77 +0,0 @@
set(CMAKE_C_COMPILER "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe")
set(CMAKE_C_COMPILER_ARG1 "")
set(CMAKE_C_COMPILER_ID "Clang")
set(CMAKE_C_COMPILER_VERSION "14.0.7")
set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
set(CMAKE_C_COMPILER_WRAPPER "")
set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11")
set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert")
set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
set(CMAKE_C_PLATFORM_ID "")
set(CMAKE_C_SIMULATE_ID "")
set(CMAKE_C_COMPILER_FRONTEND_VARIANT "GNU")
set(CMAKE_C_SIMULATE_VERSION "")
set(CMAKE_AR "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-ar.exe")
set(CMAKE_C_COMPILER_AR "CMAKE_C_COMPILER_AR-NOTFOUND")
set(CMAKE_RANLIB "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-ranlib.exe")
set(CMAKE_C_COMPILER_RANLIB "CMAKE_C_COMPILER_RANLIB-NOTFOUND")
set(CMAKE_LINKER "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/ld.lld.exe")
set(CMAKE_MT "")
set(CMAKE_COMPILER_IS_GNUCC )
set(CMAKE_C_COMPILER_LOADED 1)
set(CMAKE_C_COMPILER_WORKS TRUE)
set(CMAKE_C_ABI_COMPILED TRUE)
set(CMAKE_COMPILER_IS_MINGW )
set(CMAKE_COMPILER_IS_CYGWIN )
if(CMAKE_COMPILER_IS_CYGWIN)
set(CYGWIN 1)
set(UNIX 1)
endif()
set(CMAKE_C_COMPILER_ENV_VAR "CC")
if(CMAKE_COMPILER_IS_MINGW)
set(MINGW 1)
endif()
set(CMAKE_C_COMPILER_ID_RUN 1)
set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
set(CMAKE_C_LINKER_PREFERENCE 10)
# Save compiler ABI information.
set(CMAKE_C_SIZEOF_DATA_PTR "8")
set(CMAKE_C_COMPILER_ABI "ELF")
set(CMAKE_C_LIBRARY_ARCHITECTURE "")
if(CMAKE_C_SIZEOF_DATA_PTR)
set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
endif()
if(CMAKE_C_COMPILER_ABI)
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
endif()
if(CMAKE_C_LIBRARY_ARCHITECTURE)
set(CMAKE_LIBRARY_ARCHITECTURE "")
endif()
set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
endif()
set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/include;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/local/include;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/aarch64-linux-android;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include")
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "-l:libunwind.a;dl;c;-l:libunwind.a;dl")
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/aarch64;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib")
set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")

View File

@@ -1,89 +0,0 @@
set(CMAKE_CXX_COMPILER "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe")
set(CMAKE_CXX_COMPILER_ARG1 "")
set(CMAKE_CXX_COMPILER_ID "Clang")
set(CMAKE_CXX_COMPILER_VERSION "14.0.7")
set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
set(CMAKE_CXX_COMPILER_WRAPPER "")
set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14")
set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20")
set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters")
set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17")
set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20")
set(CMAKE_CXX_PLATFORM_ID "")
set(CMAKE_CXX_SIMULATE_ID "")
set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "GNU")
set(CMAKE_CXX_SIMULATE_VERSION "")
set(CMAKE_AR "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-ar.exe")
set(CMAKE_CXX_COMPILER_AR "CMAKE_CXX_COMPILER_AR-NOTFOUND")
set(CMAKE_RANLIB "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-ranlib.exe")
set(CMAKE_CXX_COMPILER_RANLIB "CMAKE_CXX_COMPILER_RANLIB-NOTFOUND")
set(CMAKE_LINKER "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/ld.lld.exe")
set(CMAKE_MT "")
set(CMAKE_COMPILER_IS_GNUCXX )
set(CMAKE_CXX_COMPILER_LOADED 1)
set(CMAKE_CXX_COMPILER_WORKS TRUE)
set(CMAKE_CXX_ABI_COMPILED TRUE)
set(CMAKE_COMPILER_IS_MINGW )
set(CMAKE_COMPILER_IS_CYGWIN )
if(CMAKE_COMPILER_IS_CYGWIN)
set(CYGWIN 1)
set(UNIX 1)
endif()
set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
if(CMAKE_COMPILER_IS_MINGW)
set(MINGW 1)
endif()
set(CMAKE_CXX_COMPILER_ID_RUN 1)
set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP)
set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
foreach (lang C OBJC OBJCXX)
if (CMAKE_${lang}_COMPILER_ID_RUN)
foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS)
list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension})
endforeach()
endif()
endforeach()
set(CMAKE_CXX_LINKER_PREFERENCE 30)
set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
# Save compiler ABI information.
set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
set(CMAKE_CXX_COMPILER_ABI "ELF")
set(CMAKE_CXX_LIBRARY_ARCHITECTURE "")
if(CMAKE_CXX_SIZEOF_DATA_PTR)
set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
endif()
if(CMAKE_CXX_COMPILER_ABI)
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
endif()
if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
set(CMAKE_LIBRARY_ARCHITECTURE "")
endif()
set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
endif()
set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/include;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/local/include;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/aarch64-linux-android;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include")
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "c++;m;-l:libunwind.a;dl;c;-l:libunwind.a;dl")
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/aarch64;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib")
set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")

View File

@@ -1,15 +0,0 @@
set(CMAKE_HOST_SYSTEM "Windows-10.0.19045")
set(CMAKE_HOST_SYSTEM_NAME "Windows")
set(CMAKE_HOST_SYSTEM_VERSION "10.0.19045")
set(CMAKE_HOST_SYSTEM_PROCESSOR "AMD64")
include("C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/build/cmake/android.toolchain.cmake")
set(CMAKE_SYSTEM "Android-1")
set(CMAKE_SYSTEM_NAME "Android")
set(CMAKE_SYSTEM_VERSION "1")
set(CMAKE_SYSTEM_PROCESSOR "aarch64")
set(CMAKE_CROSSCOMPILING "TRUE")
set(CMAKE_SYSTEM_LOADED 1)

View File

@@ -1,242 +0,0 @@
The target system is: Android - 1 - aarch64
The host system is: Windows - 10.0.19045 - AMD64
Detecting C compiler ABI info compiled with the following output:
Change Dir: F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/CMakeTmp
Run Build Command(s):C:\Users\Nick\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe cmTC_ad214 && [1/2] Building C object CMakeFiles/cmTC_ad214.dir/CMakeCCompilerABI.c.o
Android (9352603, based on r450784d1) clang version 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6)
Target: aarch64-none-linux-android22
Thread model: posix
InstalledDir: C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin
(in-process)
"C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe" -cc1 -triple aarch64-none-linux-android22 -emit-obj -mrelax-all --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -target-feature +neon -target-feature +v8a -target-feature +fix-cortex-a53-835769 -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -v -ffunction-sections -fdata-sections -fcoverage-compilation-dir=F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/CMakeTmp -resource-dir C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7 -dependency-file "CMakeFiles\\cmTC_ad214.dir\\CMakeCCompilerABI.c.o.d" -MT CMakeFiles/cmTC_ad214.dir/CMakeCCompilerABI.c.o -sys-header-deps -D ANDROID -D _FORTIFY_SOURCE=2 -isysroot C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -internal-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/include -internal-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/local/include -internal-externc-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/aarch64-linux-android -internal-externc-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/include -internal-externc-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include -Wformat -fdebug-compilation-dir=F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/CMakeTmp -ferror-limit 19 -stack-protector 2 -fno-signed-char -fgnuc-version=4.2.1 -target-feature +outline-atomics -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_ad214.dir/CMakeCCompilerABI.c.o -x c C:/Users/Nick/AppData/Local/Android/Sdk/cmake/3.18.1/share/cmake-3.18/Modules/CMakeCCompilerABI.c
clang -cc1 version 14.0.7 based upon LLVM 14.0.7git default target x86_64-w64-windows-gnu
ignoring nonexistent directory "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/include"
#include "..." search starts here:
#include <...> search starts here:
C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/include
C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/local/include
C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/aarch64-linux-android
C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include
End of search list.
[2/2] Linking C executable cmTC_ad214
Android (9352603, based on r450784d1) clang version 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6)
Target: aarch64-none-linux-android22
Thread model: posix
InstalledDir: C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin
"C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/ld" --sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -pie -EL --fix-cortex-a53-843419 --warn-shared-textrel -z now -z relro -z max-page-size=4096 --hash-style=both --enable-new-dtags --eh-frame-hdr -m aarch64linux -dynamic-linker /system/bin/linker64 -o cmTC_ad214 C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22/crtbegin_dynamic.o -LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/aarch64 -LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22 -LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android -LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib --build-id=sha1 --no-rosegment --fatal-warnings --no-undefined CMakeFiles/cmTC_ad214.dir/CMakeCCompilerABI.c.o C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/libclang_rt.builtins-aarch64-android.a -l:libunwind.a -ldl -lc C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/libclang_rt.builtins-aarch64-android.a -l:libunwind.a -ldl C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22/crtend_android.o
Parsed C implicit include dir info from above output: rv=done
found start of include info
found start of implicit include info
add: [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/include]
add: [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/local/include]
add: [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/aarch64-linux-android]
add: [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include]
end of search list found
collapse include dir [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/include] ==> [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/include]
collapse include dir [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/local/include] ==> [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/local/include]
collapse include dir [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/aarch64-linux-android] ==> [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/aarch64-linux-android]
collapse include dir [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include] ==> [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include]
implicit include dirs: [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/include;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/local/include;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/aarch64-linux-android;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include]
Parsed C implicit link information from above output:
link line regex: [^( *|.*[/\])(ld\.lld\.exe|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
ignore line: [Change Dir: F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/CMakeTmp]
ignore line: []
ignore line: [Run Build Command(s):C:\Users\Nick\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe cmTC_ad214 && [1/2] Building C object CMakeFiles/cmTC_ad214.dir/CMakeCCompilerABI.c.o]
ignore line: [Android (9352603 based on r450784d1) clang version 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6)]
ignore line: [Target: aarch64-none-linux-android22]
ignore line: [Thread model: posix]
ignore line: [InstalledDir: C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin]
ignore line: [ (in-process)]
ignore line: [ "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe" -cc1 -triple aarch64-none-linux-android22 -emit-obj -mrelax-all --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -target-feature +neon -target-feature +v8a -target-feature +fix-cortex-a53-835769 -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -v -ffunction-sections -fdata-sections -fcoverage-compilation-dir=F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/CMakeTmp -resource-dir C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7 -dependency-file "CMakeFiles\\cmTC_ad214.dir\\CMakeCCompilerABI.c.o.d" -MT CMakeFiles/cmTC_ad214.dir/CMakeCCompilerABI.c.o -sys-header-deps -D ANDROID -D _FORTIFY_SOURCE=2 -isysroot C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -internal-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/include -internal-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/local/include -internal-externc-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/aarch64-linux-android -internal-externc-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/include -internal-externc-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include -Wformat -fdebug-compilation-dir=F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/CMakeTmp -ferror-limit 19 -stack-protector 2 -fno-signed-char -fgnuc-version=4.2.1 -target-feature +outline-atomics -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_ad214.dir/CMakeCCompilerABI.c.o -x c C:/Users/Nick/AppData/Local/Android/Sdk/cmake/3.18.1/share/cmake-3.18/Modules/CMakeCCompilerABI.c]
ignore line: [clang -cc1 version 14.0.7 based upon LLVM 14.0.7git default target x86_64-w64-windows-gnu]
ignore line: [ignoring nonexistent directory "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/include"]
ignore line: [#include "..." search starts here:]
ignore line: [#include <...> search starts here:]
ignore line: [ C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/include]
ignore line: [ C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/local/include]
ignore line: [ C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/aarch64-linux-android]
ignore line: [ C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include]
ignore line: [End of search list.]
ignore line: [[2/2] Linking C executable cmTC_ad214]
ignore line: [Android (9352603 based on r450784d1) clang version 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6)]
ignore line: [Target: aarch64-none-linux-android22]
ignore line: [Thread model: posix]
ignore line: [InstalledDir: C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin]
link line: [ "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/ld" --sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -pie -EL --fix-cortex-a53-843419 --warn-shared-textrel -z now -z relro -z max-page-size=4096 --hash-style=both --enable-new-dtags --eh-frame-hdr -m aarch64linux -dynamic-linker /system/bin/linker64 -o cmTC_ad214 C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22/crtbegin_dynamic.o -LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/aarch64 -LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22 -LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android -LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib --build-id=sha1 --no-rosegment --fatal-warnings --no-undefined CMakeFiles/cmTC_ad214.dir/CMakeCCompilerABI.c.o C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/libclang_rt.builtins-aarch64-android.a -l:libunwind.a -ldl -lc C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/libclang_rt.builtins-aarch64-android.a -l:libunwind.a -ldl C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22/crtend_android.o]
arg [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/ld] ==> ignore
arg [--sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot] ==> ignore
arg [-pie] ==> ignore
arg [-EL] ==> ignore
arg [--fix-cortex-a53-843419] ==> ignore
arg [--warn-shared-textrel] ==> ignore
arg [-znow] ==> ignore
arg [-zrelro] ==> ignore
arg [-zmax-page-size=4096] ==> ignore
arg [--hash-style=both] ==> ignore
arg [--enable-new-dtags] ==> ignore
arg [--eh-frame-hdr] ==> ignore
arg [-m] ==> ignore
arg [aarch64linux] ==> ignore
arg [-dynamic-linker] ==> ignore
arg [/system/bin/linker64] ==> ignore
arg [-o] ==> ignore
arg [cmTC_ad214] ==> ignore
arg [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22/crtbegin_dynamic.o] ==> ignore
arg [-LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/aarch64] ==> dir [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/aarch64]
arg [-LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22] ==> dir [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22]
arg [-LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android] ==> dir [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android]
arg [-LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib] ==> dir [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib]
arg [--build-id=sha1] ==> ignore
arg [--no-rosegment] ==> ignore
arg [--fatal-warnings] ==> ignore
arg [--no-undefined] ==> ignore
arg [CMakeFiles/cmTC_ad214.dir/CMakeCCompilerABI.c.o] ==> ignore
arg [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/libclang_rt.builtins-aarch64-android.a] ==> lib [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/libclang_rt.builtins-aarch64-android.a]
arg [-l:libunwind.a] ==> lib [-l:libunwind.a]
arg [-ldl] ==> lib [dl]
arg [-lc] ==> lib [c]
arg [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/libclang_rt.builtins-aarch64-android.a] ==> lib [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/libclang_rt.builtins-aarch64-android.a]
arg [-l:libunwind.a] ==> lib [-l:libunwind.a]
arg [-ldl] ==> lib [dl]
arg [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22/crtend_android.o] ==> ignore
remove lib [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/libclang_rt.builtins-aarch64-android.a]
remove lib [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/libclang_rt.builtins-aarch64-android.a]
collapse library dir [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/aarch64] ==> [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/aarch64]
collapse library dir [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22] ==> [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22]
collapse library dir [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android] ==> [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android]
collapse library dir [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib] ==> [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib]
implicit libs: [-l:libunwind.a;dl;c;-l:libunwind.a;dl]
implicit dirs: [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/aarch64;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib]
implicit fwks: []
Detecting CXX compiler ABI info compiled with the following output:
Change Dir: F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/CMakeTmp
Run Build Command(s):C:\Users\Nick\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe cmTC_1c8e8 && [1/2] Building CXX object CMakeFiles/cmTC_1c8e8.dir/CMakeCXXCompilerABI.cpp.o
Android (9352603, based on r450784d1) clang version 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6)
Target: aarch64-none-linux-android22
Thread model: posix
InstalledDir: C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin
(in-process)
"C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe" -cc1 -triple aarch64-none-linux-android22 -emit-obj -mrelax-all --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name CMakeCXXCompilerABI.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -target-feature +neon -target-feature +v8a -target-feature +fix-cortex-a53-835769 -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -v -ffunction-sections -fdata-sections -fcoverage-compilation-dir=F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/CMakeTmp -resource-dir C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7 -dependency-file "CMakeFiles\\cmTC_1c8e8.dir\\CMakeCXXCompilerABI.cpp.o.d" -MT CMakeFiles/cmTC_1c8e8.dir/CMakeCXXCompilerABI.cpp.o -sys-header-deps -D ANDROID -D _FORTIFY_SOURCE=2 -isysroot C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -internal-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1 -internal-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/include -internal-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/local/include -internal-externc-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/aarch64-linux-android -internal-externc-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/include -internal-externc-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include -Wformat -fdeprecated-macro -fdebug-compilation-dir=F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/CMakeTmp -ferror-limit 19 -stack-protector 2 -fno-signed-char -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -target-feature +outline-atomics -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_1c8e8.dir/CMakeCXXCompilerABI.cpp.o -x c++ C:/Users/Nick/AppData/Local/Android/Sdk/cmake/3.18.1/share/cmake-3.18/Modules/CMakeCXXCompilerABI.cpp
clang -cc1 version 14.0.7 based upon LLVM 14.0.7git default target x86_64-w64-windows-gnu
ignoring nonexistent directory "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/include"
#include "..." search starts here:
#include <...> search starts here:
C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1
C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/include
C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/local/include
C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/aarch64-linux-android
C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include
End of search list.
[2/2] Linking CXX executable cmTC_1c8e8
Android (9352603, based on r450784d1) clang version 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6)
Target: aarch64-none-linux-android22
Thread model: posix
InstalledDir: C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin
"C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/ld" --sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -pie -EL --fix-cortex-a53-843419 --warn-shared-textrel -z now -z relro -z max-page-size=4096 --hash-style=both --enable-new-dtags --eh-frame-hdr -m aarch64linux -dynamic-linker /system/bin/linker64 -o cmTC_1c8e8 C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22/crtbegin_dynamic.o -LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/aarch64 -LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22 -LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android -LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib --build-id=sha1 --no-rosegment --fatal-warnings --no-undefined CMakeFiles/cmTC_1c8e8.dir/CMakeCXXCompilerABI.cpp.o -Bstatic -lc++ -Bdynamic -lm C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/libclang_rt.builtins-aarch64-android.a -l:libunwind.a -ldl -lc C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/libclang_rt.builtins-aarch64-android.a -l:libunwind.a -ldl C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22/crtend_android.o
Parsed CXX implicit include dir info from above output: rv=done
found start of include info
found start of implicit include info
add: [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1]
add: [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/include]
add: [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/local/include]
add: [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/aarch64-linux-android]
add: [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include]
end of search list found
collapse include dir [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1] ==> [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1]
collapse include dir [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/include] ==> [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/include]
collapse include dir [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/local/include] ==> [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/local/include]
collapse include dir [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/aarch64-linux-android] ==> [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/aarch64-linux-android]
collapse include dir [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include] ==> [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include]
implicit include dirs: [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/include;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/local/include;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/aarch64-linux-android;C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include]
Parsed CXX implicit link information from above output:
link line regex: [^( *|.*[/\])(ld\.lld\.exe|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
ignore line: [Change Dir: F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/CMakeTmp]
ignore line: []
ignore line: [Run Build Command(s):C:\Users\Nick\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe cmTC_1c8e8 && [1/2] Building CXX object CMakeFiles/cmTC_1c8e8.dir/CMakeCXXCompilerABI.cpp.o]
ignore line: [Android (9352603 based on r450784d1) clang version 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6)]
ignore line: [Target: aarch64-none-linux-android22]
ignore line: [Thread model: posix]
ignore line: [InstalledDir: C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin]
ignore line: [ (in-process)]
ignore line: [ "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe" -cc1 -triple aarch64-none-linux-android22 -emit-obj -mrelax-all --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name CMakeCXXCompilerABI.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -target-feature +neon -target-feature +v8a -target-feature +fix-cortex-a53-835769 -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -v -ffunction-sections -fdata-sections -fcoverage-compilation-dir=F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/CMakeTmp -resource-dir C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7 -dependency-file "CMakeFiles\\cmTC_1c8e8.dir\\CMakeCXXCompilerABI.cpp.o.d" -MT CMakeFiles/cmTC_1c8e8.dir/CMakeCXXCompilerABI.cpp.o -sys-header-deps -D ANDROID -D _FORTIFY_SOURCE=2 -isysroot C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -internal-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1 -internal-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/include -internal-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/local/include -internal-externc-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/aarch64-linux-android -internal-externc-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/include -internal-externc-isystem C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include -Wformat -fdeprecated-macro -fdebug-compilation-dir=F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/CMakeTmp -ferror-limit 19 -stack-protector 2 -fno-signed-char -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -target-feature +outline-atomics -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_1c8e8.dir/CMakeCXXCompilerABI.cpp.o -x c++ C:/Users/Nick/AppData/Local/Android/Sdk/cmake/3.18.1/share/cmake-3.18/Modules/CMakeCXXCompilerABI.cpp]
ignore line: [clang -cc1 version 14.0.7 based upon LLVM 14.0.7git default target x86_64-w64-windows-gnu]
ignore line: [ignoring nonexistent directory "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/include"]
ignore line: [#include "..." search starts here:]
ignore line: [#include <...> search starts here:]
ignore line: [ C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1]
ignore line: [ C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/include]
ignore line: [ C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/local/include]
ignore line: [ C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/aarch64-linux-android]
ignore line: [ C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include]
ignore line: [End of search list.]
ignore line: [[2/2] Linking CXX executable cmTC_1c8e8]
ignore line: [Android (9352603 based on r450784d1) clang version 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6)]
ignore line: [Target: aarch64-none-linux-android22]
ignore line: [Thread model: posix]
ignore line: [InstalledDir: C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin]
link line: [ "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/ld" --sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -pie -EL --fix-cortex-a53-843419 --warn-shared-textrel -z now -z relro -z max-page-size=4096 --hash-style=both --enable-new-dtags --eh-frame-hdr -m aarch64linux -dynamic-linker /system/bin/linker64 -o cmTC_1c8e8 C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22/crtbegin_dynamic.o -LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/aarch64 -LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22 -LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android -LC:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib --build-id=sha1 --no-rosegment --fatal-warnings --no-undefined CMakeFiles/cmTC_1c8e8.dir/CMakeCXXCompilerABI.cpp.o -Bstatic -lc++ -Bdynamic -lm C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/libclang_rt.builtins-aarch64-android.a -l:libunwind.a -ldl -lc C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/14.0.7/lib/linux/libclang_rt.builtins-aarch64-android.a -l:libunwind.a -ldl C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/22/crtend_android.o]
arg [C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/ld] ==> ignore
arg [--sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot] ==> ignore
arg [-pie] ==> ignore
arg [-EL] ==> ignore
arg [--fix-cortex-a53-843419] ==> ignore
arg [--warn-shared-textrel] ==> ignore

View File

@@ -1,4 +0,0 @@
F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/polyvox_filament_android.dir
F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/FILAMENT_SHADERS.dir
F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/edit_cache.dir
F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/rebuild_cache.dir

View File

@@ -1 +0,0 @@
# This file is generated by cmake for dependency checking of the CMakeCache.txt file

View File

@@ -1,83 +0,0 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Ninja" Generator, CMake Version 3.18
# This file contains all the rules used to get the outputs files
# built from the input files.
# It is included in the main 'build.ninja'.
# =============================================================================
# Project: Project
# Configurations: Debug
# =============================================================================
# =============================================================================
#############################################
# Rule for compiling CXX files.
rule CXX_COMPILER__polyvox_filament_android_Debug
depfile = $DEP_FILE
deps = gcc
command = C:\Users\Nick\AppData\Local\Android\Sdk\ndk\25.2.9519653\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android22 --sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in
description = Building CXX object $out
#############################################
# Rule for linking CXX shared library.
rule CXX_SHARED_LIBRARY_LINKER__polyvox_filament_android_Debug
command = cmd.exe /C "$PRE_LINK && C:\Users\Nick\AppData\Local\Android\Sdk\ndk\25.2.9519653\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android22 --sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC $LANGUAGE_COMPILE_FLAGS $ARCH_FLAGS $LINK_FLAGS -shared $SONAME_FLAG$SONAME -o $TARGET_FILE $in $LINK_PATH $LINK_LIBRARIES && $POST_BUILD"
description = Linking CXX shared library $TARGET_FILE
restat = $RESTAT
#############################################
# Rule for compiling C files.
rule C_COMPILER__FILAMENT_SHADERS_Debug
depfile = $DEP_FILE
deps = gcc
command = C:\Users\Nick\AppData\Local\Android\Sdk\ndk\25.2.9519653\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=aarch64-none-linux-android22 --sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in
description = Building C object $out
#############################################
# Rule for linking C shared library.
rule C_SHARED_LIBRARY_LINKER__FILAMENT_SHADERS_Debug
command = cmd.exe /C "$PRE_LINK && C:\Users\Nick\AppData\Local\Android\Sdk\ndk\25.2.9519653\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=aarch64-none-linux-android22 --sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC $LANGUAGE_COMPILE_FLAGS $ARCH_FLAGS $LINK_FLAGS -shared $SONAME_FLAG$SONAME -o $TARGET_FILE $in $LINK_PATH $LINK_LIBRARIES && $POST_BUILD"
description = Linking C shared library $TARGET_FILE
restat = $RESTAT
#############################################
# Rule for running custom commands.
rule CUSTOM_COMMAND
command = $COMMAND
description = $DESC
#############################################
# Rule for re-running cmake.
rule RERUN_CMAKE
command = C:\Users\Nick\AppData\Local\Android\Sdk\cmake\3.18.1\bin\cmake.exe --regenerate-during-build -SF:\Projects\polyvox\polyvox_filament\android -BF:\Projects\polyvox\polyvox_filament\android\.cxx\cmake\debug\arm64-v8a
description = Re-running CMake...
generator = 1
#############################################
# Rule for cleaning all built files.
rule CLEAN
command = C:\Users\Nick\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe $FILE_ARG -t clean $TARGETS
description = Cleaning all built files...
#############################################
# Rule for printing all primary targets available.
rule HELP
command = C:\Users\Nick\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe -t targets
description = All primary targets available:

View File

@@ -1,98 +0,0 @@
{
"stringTable": {
"0": "F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a",
"1": "--target=aarch64-none-linux-android22 --sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Dpolyvox_filament_android_EXPORTS -I../../../../../ios/src -I../../../../../ios/include -I../../../../../ios/include/stb -I../../../../src/main/cpp -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -std=c++17 -fno-limit-debug-info -fPIC",
"2": "--target=aarch64-none-linux-android22 --sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DFILAMENT_SHADERS_EXPORTS -I../../../../../ios/src -I../../../../../ios/include -I../../../../../ios/include/stb -I../../../../src/main/cpp -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -fPIC"
},
"buildFiles": [
"F:\\Projects\\polyvox\\polyvox_filament\\android\\CMakeLists.txt",
"C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\build\\cmake\\android.toolchain.cmake",
"C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\build\\cmake\\android-legacy.toolchain.cmake",
"C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\build\\cmake\\platforms.cmake",
"C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\build\\cmake\\compiler_id.cmake"
],
"cleanCommands": [
"C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\cmake\\3.18.1\\bin\\ninja.exe -C \"F:\\Projects\\polyvox\\polyvox_filament\\android\\.cxx\\cmake\\debug\\arm64-v8a\" clean"
],
"buildTargetsCommand": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\cmake\\3.18.1\\bin\\ninja.exe -C \"F:\\Projects\\polyvox\\polyvox_filament\\android\\.cxx\\cmake\\debug\\arm64-v8a\" {LIST_OF_TARGETS_TO_BUILD}",
"libraries": {
"polyvox_filament_android-Debug-arm64-v8a": {
"buildCommand": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\cmake\\3.18.1\\bin\\ninja.exe -C \"F:\\Projects\\polyvox\\polyvox_filament\\android\\.cxx\\cmake\\debug\\arm64-v8a\" polyvox_filament_android",
"buildType": "debug",
"toolchain": "387160768",
"abi": "arm64-v8a",
"artifactName": "polyvox_filament_android",
"files": [
{
"src": "F:\\Projects\\polyvox\\polyvox_filament\\ios\\src\\PolyvoxFilamentApi.cpp",
"flagsOrdinal": 1,
"workingDirectoryOrdinal": 0
},
{
"src": "F:\\Projects\\polyvox\\polyvox_filament\\android\\src\\main\\cpp\\FilamentAndroid.cpp",
"flagsOrdinal": 1,
"workingDirectoryOrdinal": 0
},
{
"src": "F:\\Projects\\polyvox\\polyvox_filament\\ios\\src\\AssetManager.cpp",
"flagsOrdinal": 1,
"workingDirectoryOrdinal": 0
},
{
"src": "F:\\Projects\\polyvox\\polyvox_filament\\ios\\src\\FilamentViewer.cpp",
"flagsOrdinal": 1,
"workingDirectoryOrdinal": 0
},
{
"src": "F:\\Projects\\polyvox\\polyvox_filament\\ios\\src\\StreamBufferAdapter.cpp",
"flagsOrdinal": 1,
"workingDirectoryOrdinal": 0
},
{
"src": "F:\\Projects\\polyvox\\polyvox_filament\\ios\\src\\TimeIt.cpp",
"flagsOrdinal": 1,
"workingDirectoryOrdinal": 0
}
],
"headers": [],
"output": "F:\\Projects\\polyvox\\polyvox_filament\\example\\build\\polyvox_filament\\intermediates\\cmake\\debug\\obj\\arm64-v8a\\libpolyvox_filament_android.so",
"runtimeFiles": [
"F:\\Projects\\polyvox\\polyvox_filament\\example\\build\\polyvox_filament\\intermediates\\cmake\\debug\\obj\\arm64-v8a\\libFILAMENT_SHADERS.so"
]
},
"FILAMENT_SHADERS-Debug-arm64-v8a": {
"buildCommand": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\cmake\\3.18.1\\bin\\ninja.exe -C \"F:\\Projects\\polyvox\\polyvox_filament\\android\\.cxx\\cmake\\debug\\arm64-v8a\" FILAMENT_SHADERS",
"buildType": "debug",
"toolchain": "387160768",
"abi": "arm64-v8a",
"artifactName": "FILAMENT_SHADERS",
"files": [
{
"src": "F:\\Projects\\polyvox\\polyvox_filament\\ios\\include\\material\\image.c",
"flagsOrdinal": 2,
"workingDirectoryOrdinal": 0
},
{
"src": "F:\\Projects\\polyvox\\polyvox_filament\\ios\\include\\material\\unlit_opaque.c",
"flagsOrdinal": 2,
"workingDirectoryOrdinal": 0
}
],
"headers": [],
"output": "F:\\Projects\\polyvox\\polyvox_filament\\example\\build\\polyvox_filament\\intermediates\\cmake\\debug\\obj\\arm64-v8a\\libFILAMENT_SHADERS.so",
"runtimeFiles": []
}
},
"toolchains": {
"387160768": {
"cCompilerExecutable": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\clang.exe",
"cppCompilerExecutable": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\clang++.exe"
}
},
"cFileExtensions": [
"c"
],
"cppFileExtensions": [
"cpp"
]
}

View File

@@ -1,31 +0,0 @@
{
"buildFiles": [
"F:\\Projects\\polyvox\\polyvox_filament\\android\\CMakeLists.txt",
"C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\build\\cmake\\android.toolchain.cmake",
"C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\build\\cmake\\android-legacy.toolchain.cmake",
"C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\build\\cmake\\platforms.cmake",
"C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\build\\cmake\\compiler_id.cmake"
],
"cleanCommands": [
"C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\cmake\\3.18.1\\bin\\ninja.exe -C \"F:\\Projects\\polyvox\\polyvox_filament\\android\\.cxx\\cmake\\debug\\arm64-v8a\" clean"
],
"buildTargetsCommand": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\cmake\\3.18.1\\bin\\ninja.exe -C \"F:\\Projects\\polyvox\\polyvox_filament\\android\\.cxx\\cmake\\debug\\arm64-v8a\" {LIST_OF_TARGETS_TO_BUILD}",
"libraries": {
"polyvox_filament_android-Debug-arm64-v8a": {
"artifactName": "polyvox_filament_android",
"buildCommand": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\cmake\\3.18.1\\bin\\ninja.exe -C \"F:\\Projects\\polyvox\\polyvox_filament\\android\\.cxx\\cmake\\debug\\arm64-v8a\" polyvox_filament_android",
"abi": "arm64-v8a",
"output": "F:\\Projects\\polyvox\\polyvox_filament\\example\\build\\polyvox_filament\\intermediates\\cmake\\debug\\obj\\arm64-v8a\\libpolyvox_filament_android.so",
"runtimeFiles": [
"F:\\Projects\\polyvox\\polyvox_filament\\example\\build\\polyvox_filament\\intermediates\\cmake\\debug\\obj\\arm64-v8a\\libFILAMENT_SHADERS.so"
]
},
"FILAMENT_SHADERS-Debug-arm64-v8a": {
"artifactName": "FILAMENT_SHADERS",
"buildCommand": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\cmake\\3.18.1\\bin\\ninja.exe -C \"F:\\Projects\\polyvox\\polyvox_filament\\android\\.cxx\\cmake\\debug\\arm64-v8a\" FILAMENT_SHADERS",
"abi": "arm64-v8a",
"output": "F:\\Projects\\polyvox\\polyvox_filament\\example\\build\\polyvox_filament\\intermediates\\cmake\\debug\\obj\\arm64-v8a\\libFILAMENT_SHADERS.so",
"runtimeFiles": []
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,21 +0,0 @@
Executable : C:\Users\Nick\AppData\Local\Android\Sdk\cmake\3.18.1\bin\cmake.exe
arguments :
-HF:\Projects\polyvox\polyvox_filament\android
-DCMAKE_FIND_ROOT_PATH=F:\Projects\polyvox\polyvox_filament\android\.cxx\cmake\debug\prefab\arm64-v8a\prefab
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_TOOLCHAIN_FILE=C:\Users\Nick\AppData\Local\Android\Sdk\ndk\25.2.9519653\build\cmake\android.toolchain.cmake
-DANDROID_ABI=arm64-v8a
-DANDROID_NDK=C:\Users\Nick\AppData\Local\Android\Sdk\ndk\25.2.9519653
-DANDROID_PLATFORM=android-22
-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a
-DCMAKE_ANDROID_NDK=C:\Users\Nick\AppData\Local\Android\Sdk\ndk\25.2.9519653
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=F:\Projects\polyvox\polyvox_filament\example\build\polyvox_filament\intermediates\cmake\debug\obj\arm64-v8a
-DCMAKE_MAKE_PROGRAM=C:\Users\Nick\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe
-DCMAKE_SYSTEM_NAME=Android
-DCMAKE_SYSTEM_VERSION=22
-BF:\Projects\polyvox\polyvox_filament\android\.cxx\cmake\debug\arm64-v8a
-GNinja
jvmArgs :
Build command args:

View File

@@ -1,205 +0,0 @@
{
"abi": "ARM64_V8A",
"abiPlatformVersion": 22,
"buildSettings": {
"environmentVariables": []
},
"cmake": {
"cmakeArtifactsBaseFolder": "F:\\Projects\\polyvox\\polyvox_filament\\android\\.cxx\\cmake\\debug\\arm64-v8a",
"cmakeServerLogFile": "F:\\Projects\\polyvox\\polyvox_filament\\android\\.cxx\\cmake\\debug\\arm64-v8a\\cmake_server_log.txt",
"cmakeWrappingBaseFolder": "F:\\Projects\\polyvox\\polyvox_filament\\android\\.cxx\\cxx\\debug\\arm64-v8a",
"effectiveConfiguration": {
"name": "traditional-android-studio-cmake-environment",
"description": "Composite reified CMakeSettings configuration",
"generator": "Ninja",
"inheritEnvironments": [
"ndk"
],
"buildRoot": "F:\\Projects\\polyvox\\polyvox_filament\\android\\.cxx\\cmake\\debug\\arm64-v8a",
"cmakeToolchain": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\build\\cmake\\android.toolchain.cmake",
"cmakeExecutable": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\cmake\\3.18.1\\bin\\cmake.exe",
"variables": [
{
"name": "CMAKE_FIND_ROOT_PATH",
"value": "F:\\Projects\\polyvox\\polyvox_filament\\android\\.cxx\\cmake\\debug\\prefab\\arm64-v8a\\prefab"
},
{
"name": "CMAKE_BUILD_TYPE",
"value": "Debug"
},
{
"name": "CMAKE_TOOLCHAIN_FILE",
"value": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\build\\cmake\\android.toolchain.cmake"
},
{
"name": "ANDROID_ABI",
"value": "arm64-v8a"
},
{
"name": "ANDROID_NDK",
"value": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653"
},
{
"name": "ANDROID_PLATFORM",
"value": "android-22"
},
{
"name": "CMAKE_ANDROID_ARCH_ABI",
"value": "arm64-v8a"
},
{
"name": "CMAKE_ANDROID_NDK",
"value": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653"
},
{
"name": "CMAKE_EXPORT_COMPILE_COMMANDS",
"value": "ON"
},
{
"name": "CMAKE_LIBRARY_OUTPUT_DIRECTORY",
"value": "F:\\Projects\\polyvox\\polyvox_filament\\example\\build\\polyvox_filament\\intermediates\\cmake\\debug\\obj\\arm64-v8a"
},
{
"name": "CMAKE_MAKE_PROGRAM",
"value": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\cmake\\3.18.1\\bin\\ninja.exe"
},
{
"name": "CMAKE_SYSTEM_NAME",
"value": "Android"
},
{
"name": "CMAKE_SYSTEM_VERSION",
"value": "22"
}
]
}
},
"cxxBuildFolder": "F:\\Projects\\polyvox\\polyvox_filament\\android\\.cxx\\cmake\\debug\\arm64-v8a",
"info": {
"abi": "ARM64_V8A",
"bitness": 64,
"deprecated": false,
"default": true
},
"originalCxxBuildFolder": "F:\\Projects\\polyvox\\polyvox_filament\\android\\.cxx\\cmake\\debug\\arm64-v8a",
"variant": {
"buildSystemArgumentList": [],
"buildTargetSet": [],
"implicitBuildTargetSet": [],
"cFlagsList": [],
"cmakeSettingsConfiguration": "android-gradle-plugin-predetermined-name",
"cppFlagsList": [],
"isDebuggableEnabled": true,
"module": {
"buildSystem": "CMAKE",
"cmake": {
"cmakeExe": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\cmake\\3.18.1\\bin\\cmake.exe",
"minimumCmakeVersion": "3.18.1",
"ninjaExe": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\cmake\\3.18.1\\bin\\ninja.exe"
},
"cmakeToolchainFile": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\build\\cmake\\android.toolchain.cmake",
"cxxFolder": "F:\\Projects\\polyvox\\polyvox_filament\\android\\.cxx",
"gradleModulePathName": ":polyvox_filament",
"intermediatesFolder": "F:\\Projects\\polyvox\\polyvox_filament\\example\\build\\polyvox_filament\\intermediates",
"makeFile": "F:\\Projects\\polyvox\\polyvox_filament\\android\\CMakeLists.txt",
"moduleBuildFile": "F:\\Projects\\polyvox\\polyvox_filament\\android\\build.gradle",
"moduleRootFolder": "F:\\Projects\\polyvox\\polyvox_filament\\android",
"ndkDefaultAbiList": [
"ARMEABI_V7A",
"ARM64_V8A",
"X86",
"X86_64"
],
"ndkFolder": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653",
"ndkMetaAbiList": [
{
"abi": "ARMEABI_V7A",
"bitness": 32,
"deprecated": false,
"default": true
},
{
"abi": "ARM64_V8A",
"bitness": 64,
"deprecated": false,
"default": true
},
{
"abi": "X86",
"bitness": 32,
"deprecated": false,
"default": true
},
{
"abi": "X86_64",
"bitness": 64,
"deprecated": false,
"default": true
}
],
"ndkMetaPlatforms": {
"min": 19,
"max": 33,
"aliases": {
"20": 19,
"25": 24,
"J": 16,
"J-MR1": 17,
"J-MR2": 18,
"K": 19,
"L": 21,
"L-MR1": 22,
"M": 23,
"N": 24,
"N-MR1": 24,
"O": 26,
"O-MR1": 27,
"P": 28,
"Q": 29,
"R": 30,
"S": 31,
"Sv2": 32,
"Tiramisu": 33
}
},
"ndkSupportedAbiList": [
"ARMEABI_V7A",
"ARM64_V8A",
"X86",
"X86_64"
],
"ndkDefaultStl": "LIBCXX_STATIC",
"ndkVersion": "25.2.9519653",
"project": {
"compilerSettingsCacheFolder": "F:\\Projects\\polyvox\\polyvox_filament\\example\\android\\.cxx",
"cxxFolder": "F:\\Projects\\polyvox\\polyvox_filament\\example\\android\\.cxx",
"isBuildOnlyTargetAbiEnabled": true,
"isCmakeBuildCohabitationEnabled": false,
"isNativeCompilerSettingsCacheEnabled": false,
"rootBuildGradleFolder": "F:\\Projects\\polyvox\\polyvox_filament\\example\\android",
"sdkFolder": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk",
"isPrefabEnabled": false
},
"splitsAbiFilterSet": [],
"stlSharedObjectMap": {
"LIBCXX_SHARED": {
"ARMEABI_V7A": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\toolchains\\llvm\\prebuilt\\windows-x86_64\\sysroot\\usr\\lib\\arm-linux-androideabi\\libc++_shared.so",
"ARM64_V8A": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\toolchains\\llvm\\prebuilt\\windows-x86_64\\sysroot\\usr\\lib\\aarch64-linux-android\\libc++_shared.so",
"X86": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\toolchains\\llvm\\prebuilt\\windows-x86_64\\sysroot\\usr\\lib\\i686-linux-android\\libc++_shared.so",
"X86_64": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\toolchains\\llvm\\prebuilt\\windows-x86_64\\sysroot\\usr\\lib\\x86_64-linux-android\\libc++_shared.so"
},
"LIBCXX_STATIC": {},
"NONE": {},
"SYSTEM": {}
}
},
"objFolder": "F:\\Projects\\polyvox\\polyvox_filament\\example\\build\\polyvox_filament\\intermediates\\cmake\\debug\\obj",
"variantName": "debug",
"validAbiList": [
"ARM64_V8A"
],
"prefabDirectory": "F:\\Projects\\polyvox\\polyvox_filament\\android\\.cxx\\cmake\\debug\\prefab",
"prefabPackageDirectoryList": []
},
"prefabFolder": "F:\\Projects\\polyvox\\polyvox_filament\\android\\.cxx\\cmake\\debug\\prefab\\arm64-v8a"
}

View File

@@ -1,60 +0,0 @@
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning at C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/build/cmake/android-legacy.toolchain.cmake:418 (message):
An old version of CMake is being used that cannot automatically detect
compiler attributes. Compiler identification is being bypassed. Some
values may be wrong or missing. Update to CMake 3.19 or newer to use
CMake's built-in compiler identification.
Call Stack (most recent call first):
C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/build/cmake/android.toolchain.cmake:54 (include)
C:/Users/Nick/AppData/Local/Android/Sdk/cmake/3.18.1/share/cmake-3.18/Modules/CMakeDetermineSystem.cmake:93 (include)
Detecting C compiler ABI info
CMake Warning at C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/build/cmake/android-legacy.toolchain.cmake:418 (message):
An old version of CMake is being used that cannot automatically detect
compiler attributes. Compiler identification is being bypassed. Some
values may be wrong or missing. Update to CMake 3.19 or newer to use
CMake's built-in compiler identification.
Call Stack (most recent call first):
C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/build/cmake/android.toolchain.cmake:54 (include)
F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/3.18.1-g262b901-dirty/CMakeSystem.cmake:6 (include)
F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/CMakeTmp/CMakeLists.txt:2 (project)
Detecting C compiler ABI info - done
Check for working C compiler: C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped
Detecting C compile features
Detecting C compile features - done
Detecting CXX compiler ABI info
CMake Warning at C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/build/cmake/android-legacy.toolchain.cmake:418 (message):
An old version of CMake is being used that cannot automatically detect
compiler attributes. Compiler identification is being bypassed. Some
values may be wrong or missing. Update to CMake 3.19 or newer to use
CMake's built-in compiler identification.
Call Stack (most recent call first):
C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/build/cmake/android.toolchain.cmake:54 (include)
F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/3.18.1-g262b901-dirty/CMakeSystem.cmake:6 (include)
F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/CMakeFiles/CMakeTmp/CMakeLists.txt:2 (project)
Detecting CXX compiler ABI info - done
Check for working CXX compiler: C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - skipped
Detecting CXX compile features
Detecting CXX compile features - done
Configuring done
CMake Deprecation Warning:
The 'cmake-server(7)' is deprecated. Please port clients to use the
'cmake-file-api(7)' instead.

View File

@@ -1,54 +0,0 @@
# Install script for directory: F:/Projects/polyvox/polyvox_filament/android
# Set the install prefix
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/Project")
endif()
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# Set the install configuration name.
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
if(BUILD_TYPE)
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
else()
set(CMAKE_INSTALL_CONFIG_NAME "Debug")
endif()
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
endif()
# Set the component getting installed.
if(NOT CMAKE_INSTALL_COMPONENT)
if(COMPONENT)
message(STATUS "Install component: \"${COMPONENT}\"")
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
else()
set(CMAKE_INSTALL_COMPONENT)
endif()
endif()
# Install shared libraries without execute permission?
if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
set(CMAKE_INSTALL_SO_NO_EXE "0")
endif()
# Is this installation the result of a crosscompile?
if(NOT DEFINED CMAKE_CROSSCOMPILING)
set(CMAKE_CROSSCOMPILING "TRUE")
endif()
# Set default install directory permissions.
if(NOT DEFINED CMAKE_OBJDUMP)
set(CMAKE_OBJDUMP "C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-objdump.exe")
endif()
if(CMAKE_INSTALL_COMPONENT)
set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
else()
set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
endif()
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
"${CMAKE_INSTALL_MANIFEST_FILES}")
file(WRITE "F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a/${CMAKE_INSTALL_MANIFEST}"
"${CMAKE_INSTALL_MANIFEST_CONTENT}")

File diff suppressed because one or more lines are too long

View File

@@ -1,42 +0,0 @@
[
{
"directory": "F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a",
"command": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\clang++.exe --target=aarch64-none-linux-android22 --sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Dpolyvox_filament_android_EXPORTS -I../../../../../ios/src -I../../../../../ios/include -I../../../../../ios/include/stb -I../../../../src/main/cpp -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -std=c++17 -fno-limit-debug-info -fPIC -o CMakeFiles\\polyvox_filament_android.dir\\F_\\Projects\\polyvox\\polyvox_filament\\ios\\src\\PolyvoxFilamentApi.cpp.o -c F:\\Projects\\polyvox\\polyvox_filament\\ios\\src\\PolyvoxFilamentApi.cpp",
"file": "F:\\Projects\\polyvox\\polyvox_filament\\ios\\src\\PolyvoxFilamentApi.cpp"
},
{
"directory": "F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a",
"command": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\clang++.exe --target=aarch64-none-linux-android22 --sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Dpolyvox_filament_android_EXPORTS -I../../../../../ios/src -I../../../../../ios/include -I../../../../../ios/include/stb -I../../../../src/main/cpp -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -std=c++17 -fno-limit-debug-info -fPIC -o CMakeFiles\\polyvox_filament_android.dir\\src\\main\\cpp\\FilamentAndroid.cpp.o -c F:\\Projects\\polyvox\\polyvox_filament\\android\\src\\main\\cpp\\FilamentAndroid.cpp",
"file": "F:/Projects/polyvox/polyvox_filament/android/src/main/cpp/FilamentAndroid.cpp"
},
{
"directory": "F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a",
"command": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\clang++.exe --target=aarch64-none-linux-android22 --sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Dpolyvox_filament_android_EXPORTS -I../../../../../ios/src -I../../../../../ios/include -I../../../../../ios/include/stb -I../../../../src/main/cpp -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -std=c++17 -fno-limit-debug-info -fPIC -o CMakeFiles\\polyvox_filament_android.dir\\F_\\Projects\\polyvox\\polyvox_filament\\ios\\src\\AssetManager.cpp.o -c F:\\Projects\\polyvox\\polyvox_filament\\ios\\src\\AssetManager.cpp",
"file": "F:\\Projects\\polyvox\\polyvox_filament\\ios\\src\\AssetManager.cpp"
},
{
"directory": "F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a",
"command": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\clang++.exe --target=aarch64-none-linux-android22 --sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Dpolyvox_filament_android_EXPORTS -I../../../../../ios/src -I../../../../../ios/include -I../../../../../ios/include/stb -I../../../../src/main/cpp -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -std=c++17 -fno-limit-debug-info -fPIC -o CMakeFiles\\polyvox_filament_android.dir\\F_\\Projects\\polyvox\\polyvox_filament\\ios\\src\\FilamentViewer.cpp.o -c F:\\Projects\\polyvox\\polyvox_filament\\ios\\src\\FilamentViewer.cpp",
"file": "F:\\Projects\\polyvox\\polyvox_filament\\ios\\src\\FilamentViewer.cpp"
},
{
"directory": "F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a",
"command": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\clang++.exe --target=aarch64-none-linux-android22 --sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Dpolyvox_filament_android_EXPORTS -I../../../../../ios/src -I../../../../../ios/include -I../../../../../ios/include/stb -I../../../../src/main/cpp -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -std=c++17 -fno-limit-debug-info -fPIC -o CMakeFiles\\polyvox_filament_android.dir\\F_\\Projects\\polyvox\\polyvox_filament\\ios\\src\\StreamBufferAdapter.cpp.o -c F:\\Projects\\polyvox\\polyvox_filament\\ios\\src\\StreamBufferAdapter.cpp",
"file": "F:\\Projects\\polyvox\\polyvox_filament\\ios\\src\\StreamBufferAdapter.cpp"
},
{
"directory": "F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a",
"command": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\clang++.exe --target=aarch64-none-linux-android22 --sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Dpolyvox_filament_android_EXPORTS -I../../../../../ios/src -I../../../../../ios/include -I../../../../../ios/include/stb -I../../../../src/main/cpp -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -std=c++17 -fno-limit-debug-info -fPIC -o CMakeFiles\\polyvox_filament_android.dir\\F_\\Projects\\polyvox\\polyvox_filament\\ios\\src\\TimeIt.cpp.o -c F:\\Projects\\polyvox\\polyvox_filament\\ios\\src\\TimeIt.cpp",
"file": "F:\\Projects\\polyvox\\polyvox_filament\\ios\\src\\TimeIt.cpp"
},
{
"directory": "F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a",
"command": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\clang.exe --target=aarch64-none-linux-android22 --sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DFILAMENT_SHADERS_EXPORTS -I../../../../../ios/src -I../../../../../ios/include -I../../../../../ios/include/stb -I../../../../src/main/cpp -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -fPIC -o CMakeFiles\\FILAMENT_SHADERS.dir\\F_\\Projects\\polyvox\\polyvox_filament\\ios\\include\\material\\image.c.o -c F:\\Projects\\polyvox\\polyvox_filament\\ios\\include\\material\\image.c",
"file": "F:\\Projects\\polyvox\\polyvox_filament\\ios\\include\\material\\image.c"
},
{
"directory": "F:/Projects/polyvox/polyvox_filament/android/.cxx/cmake/debug/arm64-v8a",
"command": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\clang.exe --target=aarch64-none-linux-android22 --sysroot=C:/Users/Nick/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DFILAMENT_SHADERS_EXPORTS -I../../../../../ios/src -I../../../../../ios/include -I../../../../../ios/include/stb -I../../../../src/main/cpp -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -fPIC -o CMakeFiles\\FILAMENT_SHADERS.dir\\F_\\Projects\\polyvox\\polyvox_filament\\ios\\include\\material\\unlit_opaque.c.o -c F:\\Projects\\polyvox\\polyvox_filament\\ios\\include\\material\\unlit_opaque.c",
"file": "F:\\Projects\\polyvox\\polyvox_filament\\ios\\include\\material\\unlit_opaque.c"
}
]

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +0,0 @@
{
"enabled": false,
"packages": []
}

View File

@@ -1,11 +0,0 @@
{
"ndk": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653",
"revision": {
"mMajor": 25,
"mMinor": 2,
"mMicro": 9519653,
"mPreview": 0,
"mPrecision": "MICRO",
"mPreviewSeparator": " "
}
}

View File

@@ -1,22 +0,0 @@
[
{
"level": "INFO",
"message": "android.ndkVersion from module build.gradle is [25.2.9519653]"
},
{
"level": "INFO",
"message": "android.ndkPath from module build.gradle is not set"
},
{
"level": "INFO",
"message": "ndk.dir in local.properties is not set"
},
{
"level": "INFO",
"message": "Not considering ANDROID_NDK_HOME because support was removed after deprecation period."
},
{
"level": "INFO",
"message": "sdkFolder is C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk"
}
]

View File

@@ -1,16 +0,0 @@
{
"ndkVersionFromDsl": "25.2.9519653",
"sdkFolder": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk",
"sideBySideNdkFolderNames": [
"19.2.5345600",
"21.1.6352462",
"21.4.7075529",
"22.0.7026061",
"22.1.7171670",
"23.0.7599858",
"23.1.7779620",
"23.2.8568313",
"24.0.8215888",
"25.2.9519653"
]
}

View File

@@ -1,11 +0,0 @@
{
"ndk": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653",
"revision": {
"mMajor": 25,
"mMinor": 2,
"mMicro": 9519653,
"mPreview": 0,
"mPrecision": "MICRO",
"mPreviewSeparator": " "
}
}

View File

@@ -1,38 +0,0 @@
[
{
"level": "INFO",
"message": "android.ndkVersion from module build.gradle is [25.2.9519653]"
},
{
"level": "INFO",
"message": "android.ndkPath from module build.gradle is not set"
},
{
"level": "INFO",
"message": "ndk.dir in local.properties is not set"
},
{
"level": "INFO",
"message": "Not considering ANDROID_NDK_HOME because support was removed after deprecation period."
},
{
"level": "INFO",
"message": "sdkFolder is C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk"
},
{
"level": "INFO",
"message": "Folder C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653 does not exist. Ignoring."
},
{
"level": "INFO",
"message": "Folder C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk-bundle does not exist. Ignoring."
},
{
"level": "INFO",
"message": "No NDK was found. Trying to download it now."
},
{
"level": "INFO",
"message": "NDK 25.2.9519653 was downloaded to C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653. Using that."
}
]

View File

@@ -1,15 +0,0 @@
{
"ndkVersionFromDsl": "25.2.9519653",
"sdkFolder": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk",
"sideBySideNdkFolderNames": [
"19.2.5345600",
"21.1.6352462",
"21.4.7075529",
"22.0.7026061",
"22.1.7171670",
"23.0.7599858",
"23.1.7779620",
"23.2.8568313",
"24.0.8215888"
]
}

View File

@@ -15,6 +15,8 @@ add_library(polyvox_filament_android SHARED
"${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/FilamentViewer.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/StreamBufferAdapter.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/TimeIt.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/camutils/Manipulator.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/camutils/Bookmark.cpp"
)
add_library(FILAMENT_SHADERS SHARED

View File

@@ -23,8 +23,6 @@ rootProject.allprojects {
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 33

View File

@@ -98,20 +98,24 @@ class PolyvoxFilamentPlugin: FlutterPlugin, MethodCallHandler, ActivityAware, Lo
if(path!!.startsWith("file://")) {
data = File(path!!.substring(6)).readBytes()
} else {
var assetPath = path
if(assetPath.startsWith("asset://")) {
assetPath = assetPath!!.substring(8)
}
val loader = FlutterInjector.instance().flutterLoader()
val key = loader.getLookupKeyForAsset(path)
val key = loader.getLookupKeyForAsset(assetPath)
val hotReloadPath = HotReloadPathHelper.getAssetPath(key, activity.getPackageName())
if (hotReloadPath != null) {
data = File(hotReloadPath).readBytes()
} else {
Log.i("polyvox_filament", "Loading resource from main asset bundle")
Log.i("polyvox_filament", "Loading resource from main asset bundle at ${assetPath}")
val assetManager: AssetManager = activity.assets
try {
data = assetManager.open(key).readBytes()
Log.i("polyvox_filament", "Loaded ${data.size} bytes")
} catch (e:Exception) {
Log.e("polyvox_filament", "Failed to open asset at ${path}", null)
Log.e("polyvox_filament", "Failed to open asset at ${assetPath}", null)
}
}
}

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5bf3d1e3dcfeb6d5e37ff5d95d6981564ecd86bf7b94089c1be9312c7ebed45c
size 201793

5
example/.gitattributes vendored Normal file
View File

@@ -0,0 +1,5 @@
assets/lit_opaque_43.uberz filter=lfs diff=lfs merge=lfs -text
assets/BusterDrone filter=lfs diff=lfs merge=lfs -text
assets/FlightHelmet filter=lfs diff=lfs merge=lfs -text
assets/lit_opaque_32.uberz filter=lfs diff=lfs merge=lfs -text
windows/lib/**/*.* filter=lfs diff=lfs merge=lfs -text

2
example/.gitignore vendored
View File

@@ -44,3 +44,5 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release
/android/.cxx/**/*

View File

@@ -6,6 +6,8 @@ gradle-wrapper.jar
/local.properties
GeneratedPluginRegistrant.java
.cxx/
# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 KiB

After

Width:  |  Height:  |  Size: 131 B

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cded95729bd217f86db59866042260dd8049bbff25bbde8fb52f37bd605653fa
size 212643

View File

@@ -1,3 +1,4 @@
import 'dart:async';
import 'dart:io';
import 'dart:typed_data';
import 'package:flutter/material.dart';
@@ -5,11 +6,11 @@ import 'package:flutter/material.dart';
import 'package:polyvox_filament/filament_controller.dart';
import 'package:polyvox_filament/animations/bone_animation_data.dart';
import 'package:polyvox_filament/filament_controller_ffi.dart';
import 'package:polyvox_filament/filament_gesture_detector.dart';
import 'package:polyvox_filament/filament_widget.dart';
import 'package:polyvox_filament/animations/animation_builder.dart';
import 'package:path_provider/path_provider.dart';
import 'package:polyvox_filament/widgets/filament_gesture_detector.dart';
import 'package:polyvox_filament/widgets/filament_widget.dart';
void main() {
runApp(const MyApp());
@@ -40,21 +41,24 @@ class ExampleWidget extends StatefulWidget {
}
class _ExampleWidgetState extends State<ExampleWidget> {
final _filamentController = FilamentControllerFFI();
FilamentControllerFFI? _filamentController;
FilamentEntity? _shapes;
FilamentEntity? _flightHelmet;
List<String>? _animations;
FilamentEntity? _light;
late StreamSubscription _pickResultListener;
String? picked;
final weights = List.filled(255, 0.0);
bool _loop = false;
bool _vertical = false;
bool _rendering = false;
int _framerate = 60;
bool _initialized = false;
bool _postProcessing = true;
bool _active = false;
bool _coneHidden = false;
bool _frustumCulling = true;
@@ -64,216 +68,282 @@ class _ExampleWidgetState extends State<ExampleWidget> {
getApplicationSupportDirectory().then((dir) {
print(dir);
});
super.initState();
}
@override
void dispose() {
super.dispose();
_pickResultListener.cancel();
}
Widget _item(void Function() onTap, String text) {
return GestureDetector(
onTap: onTap,
onTap: () {
setState(() {
onTap();
});
},
child: Container(
color: Colors.transparent,
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
child: Text(text)));
}
void _createController({String? uberArchivePath}) {
_filamentController =
FilamentControllerFFI(uberArchivePath: uberArchivePath);
_filamentController!.pickResult.listen((entityId) {
setState(() {
picked = _filamentController!.getNameForEntity(entityId);
});
});
}
@override
Widget build(BuildContext context) {
var children = [
_item(() {
_filamentController.render();
}, "render"),
_item(() {
setState(() {
_rendering = !_rendering;
_filamentController.setRendering(_rendering);
});
}, "Rendering: $_rendering "),
_item(() {
setState(() {
_framerate = _framerate == 60 ? 30 : 60;
_filamentController.setFrameRate(_framerate);
});
}, "$_framerate fps"),
_item(() {
_filamentController.setBackgroundColor(Color(0xFF73C9FA));
}, "set background color"),
_item(() {
_filamentController.setBackgroundImage('assets/background.ktx');
}, "load background image"),
_item(() {
_filamentController.setBackgroundImage('assets/background.ktx',
fillHeight: true);
}, "load background image (fill height)"),
_item(() {
_filamentController
.loadSkybox('assets/default_env/default_env_skybox.ktx');
}, 'load skybox'),
_item(() {
_filamentController.loadIbl('assets/default_env/default_env_ibl.ktx');
}, 'load IBL'),
_item(
() {
_filamentController.removeSkybox();
},
'remove skybox',
),
_item(() async {
_shapes = await _filamentController.loadGlb('assets/shapes/shapes.glb');
_animations = await _filamentController.getAnimationNames(_shapes!);
setState(() {});
}, 'load shapes GLB'),
_item(() async {
if (_coneHidden) {
_filamentController.reveal(_shapes!, "Cone");
} else {
_filamentController.hide(_shapes!, "Cone");
}
setState(() {
_coneHidden = !_coneHidden;
});
}, _coneHidden ? 'show cone' : 'hide cone'),
_item(() async {
if (_shapes != null) {
_filamentController.removeAsset(_shapes!);
}
_shapes =
await _filamentController.loadGltf('assets/shapes/shapes.gltf', 'assets/shapes');
}, 'load shapes GLTF'),
_item(() async {
_filamentController.transformToUnitCube(_shapes!);
}, 'transform to unit cube'),
_item(() async {
_filamentController.setPosition(_shapes!, 1.0, 1.0, -1.0);
}, 'set shapes position to 1, 1, -1'),
_item(() async {
_filamentController.setPosition(_shapes!, 1.0, 1.0, -1.0);
}, 'move camera to shapes position'),
_item(() async {
var frameData = Float32List.fromList(
List<double>.generate(120, (i) => i / 120).expand((x) {
var vals = List<double>.filled(7, x);
vals[3] = 1.0;
// vals[4] = 0;
vals[5] = 0;
vals[6] = 0;
return vals;
}).toList());
var children = <Widget>[];
_filamentController.setBoneAnimation(
_shapes!,
BoneAnimationData(
"Bone.001", ["Cube.001"], frameData, 1000.0 / 60.0));
// ,
// "Bone.001",
// "Cube.001",
// BoneTransform([Vec3(x: 0, y: 0.0, z: 0.0)],
// [Quaternion(x: 1, y: 1, z: 1, w: 1)]));
}, 'construct bone animation'),
_item(() async {
_filamentController.removeAsset(_shapes!);
_shapes = null;
}, 'remove shapes'),
_item(() async {
_filamentController.clearAssets();
_shapes = null;
}, 'clear all assets'),
_item(() async {
var names =
await _filamentController.getMorphTargetNames(_shapes!, "Cylinder");
await showDialog(
context: context,
builder: (ctx) {
return Container(
height: 100,
width: 100,
color: Colors.white,
child: Text(names.join(",")));
});
}, "show morph target names for Cylinder"),
_item(() {
_filamentController.setMorphTargetWeights(
_shapes!, "Cylinder", List.filled(4, 1.0));
}, "set Cylinder morph weights to 1"),
_item(() {
_filamentController.setMorphTargetWeights(
_shapes!, "Cylinder", List.filled(4, 0.0));
}, "set Cylinder morph weights to 0.0"),
_item(() async {
var morphs =
await _filamentController.getMorphTargetNames(_shapes!, "Cylinder");
final animation = AnimationBuilder(
availableMorphs: morphs, framerate: 30, meshName: "Cylinder")
.setDuration(4)
.setMorphTargets(["Key 1", "Key 2"])
.interpolateMorphWeights(0, 4, 0, 1)
.build();
_filamentController.setMorphAnimationData(_shapes!, animation);
}, "animate cylinder morph weights #1 and #2"),
_item(() async {
var morphs =
await _filamentController.getMorphTargetNames(_shapes!, "Cylinder");
final animation = AnimationBuilder(
availableMorphs: morphs, framerate: 30, meshName: "Cylinder")
.setDuration(4)
.setMorphTargets(["Key 3", "Key 4"])
.interpolateMorphWeights(0, 4, 0, 1)
.build();
_filamentController.setMorphAnimationData(_shapes!, animation);
}, "animate cylinder morph weights #3 and #4"),
_item(() async {
var morphs =
await _filamentController.getMorphTargetNames(_shapes!, "Cube");
final animation = AnimationBuilder(
availableMorphs: morphs, framerate: 30, meshName: "Cube")
.setDuration(4)
.setMorphTargets(["Key 1", "Key 2"])
.interpolateMorphWeights(0, 4, 0, 1)
.build();
_filamentController.setMorphAnimationData(_shapes!, animation);
}, "animate shapes morph weights #1 and #2"),
_item(() {
_filamentController.setMaterialColor(_shapes!, "Cone", 0, Colors.purple);
}, "set cone material color to purple"),
_item(() {
_loop = !_loop;
setState(() {});
}, "toggle animation looping ${_loop ? "OFF" : "ON"}")
];
if (_animations != null) {
children.addAll(_animations!.map((a) => _item(() {
_filamentController.playAnimation(_shapes!, _animations!.indexOf(a),
replaceActive: true, crossfade: 0.5, loop: _loop);
}, "play animation ${_animations!.indexOf(a)} (replace/fade)")));
children.addAll(_animations!.map((a) => _item(() {
_filamentController.playAnimation(_shapes!, _animations!.indexOf(a),
replaceActive: false, loop: _loop);
}, "play animation ${_animations!.indexOf(a)} (noreplace)")));
if (_filamentController == null) {
children.addAll([
_item(() {
_createController();
}, "create viewer (default ubershader)"),
_item(() {
_createController(
uberArchivePath: Platform.isWindows
? "assets/lit_opaque_32.uberz"
: "assets/lit_opaque_43.uberz");
}, "create viewer (custom ubershader - lit opaque only)"),
]);
} else {
children.addAll([
_item(() {
_filamentController!.destroy();
_filamentController = null;
}, "destroy viewer/texture")
]);
}
children.add(_item(() {
_filamentController.setToneMapping(ToneMapper.LINEAR);
}, "Set tone mapping to linear"));
if (_filamentController != null) {
children.addAll([
_item(() {
_filamentController!.render();
}, "render"),
_item(() {
setState(() {
_rendering = !_rendering;
_filamentController!.setRendering(_rendering);
});
}, "Rendering: $_rendering "),
_item(() {
setState(() {
_framerate = _framerate == 60 ? 30 : 60;
_filamentController!.setFrameRate(_framerate);
});
}, "$_framerate fps"),
_item(() {
_filamentController!.setBackgroundColor(Color(0xFF73C9FA));
}, "set background color"),
_item(() {
_filamentController!.setBackgroundImage('assets/background.ktx');
}, "load background image"),
_item(() {
_filamentController!
.setBackgroundImage('assets/background.ktx', fillHeight: true);
}, "load background image (fill height)"),
_item(() {
_filamentController!
.loadSkybox('assets/default_env/default_env_skybox.ktx');
}, 'load skybox'),
_item(() {
_filamentController!
.loadIbl('assets/default_env/default_env_ibl.ktx');
}, 'load IBL'),
_item(() {
setState(() {
_postProcessing = !_postProcessing;
});
_filamentController!.setPostProcessing(_postProcessing);
}, "${_postProcessing ? "Disable" : "Enable"} postprocessing"),
_item(
() {
_filamentController!.removeSkybox();
},
'remove skybox',
),
_item(() async {
_shapes =
await _filamentController!.loadGlb('assets/shapes/shapes.glb');
_animations = await _filamentController!.getAnimationNames(_shapes!);
setState(() {});
}, 'load shapes GLB'),
_item(() async {
_animations = await _filamentController!.setCamera(_shapes!, null);
setState(() {});
}, 'set camera to first camera in shapes GLB'),
_item(() async {
if (_coneHidden) {
_filamentController!.reveal(_shapes!, "Cone");
} else {
_filamentController!.hide(_shapes!, "Cone");
}
setState(() {
_coneHidden = !_coneHidden;
});
}, _coneHidden ? 'show cone' : 'hide cone'),
_item(() async {
if (_shapes != null) {
_filamentController!.removeAsset(_shapes!);
}
_shapes = await _filamentController!
.loadGltf('assets/shapes/shapes.gltf', 'assets/shapes');
}, 'load shapes GLTF'),
_item(() async {
_filamentController!.transformToUnitCube(_shapes!);
}, 'transform to unit cube'),
_item(() async {
_filamentController!.setPosition(_shapes!, 1.0, 1.0, -1.0);
}, 'set shapes position to 1, 1, -1'),
_item(() async {
_filamentController!.setPosition(_shapes!, 1.0, 1.0, -1.0);
}, 'move camera to shapes position'),
_item(() async {
var frameData = Float32List.fromList(
List<double>.generate(120, (i) => i / 120).expand((x) {
var vals = List<double>.filled(7, x);
vals[3] = 1.0;
// vals[4] = 0;
vals[5] = 0;
vals[6] = 0;
return vals;
}).toList());
children.add(_item(() {
_filamentController.moveCameraToAsset(_shapes!);
}, "Move camera to asset"));
_filamentController!.setBoneAnimation(
_shapes!,
BoneAnimationData(
"Bone.001", ["Cube.001"], frameData, 1000.0 / 60.0));
// ,
// "Bone.001",
// "Cube.001",
// BoneTransform([Vec3(x: 0, y: 0.0, z: 0.0)],
// [Quaternion(x: 1, y: 1, z: 1, w: 1)]));
}, 'construct bone animation'),
_item(() async {
_filamentController!.removeAsset(_shapes!);
_shapes = null;
}, 'remove shapes'),
_item(() async {
_filamentController!.clearAssets();
_shapes = null;
}, 'clear all assets'),
_item(() async {
var names = await _filamentController!
.getMorphTargetNames(_shapes!, "Cylinder");
await showDialog(
context: context,
builder: (ctx) {
return Container(
height: 100,
width: 100,
color: Colors.white,
child: Text(names.join(",")));
});
}, "show morph target names for Cylinder"),
_item(() {
_filamentController!
.setMorphTargetWeights(_shapes!, "Cylinder", List.filled(4, 1.0));
}, "set Cylinder morph weights to 1"),
_item(() {
_filamentController!
.setMorphTargetWeights(_shapes!, "Cylinder", List.filled(4, 0.0));
}, "set Cylinder morph weights to 0.0"),
_item(() async {
var morphs = await _filamentController!
.getMorphTargetNames(_shapes!, "Cylinder");
final animation = AnimationBuilder(
availableMorphs: morphs, framerate: 30, meshName: "Cylinder")
.setDuration(4)
.setMorphTargets(["Key 1", "Key 2"])
.interpolateMorphWeights(0, 4, 0, 1)
.build();
_filamentController!.setMorphAnimationData(_shapes!, animation);
}, "animate cylinder morph weights #1 and #2"),
_item(() async {
var morphs = await _filamentController!
.getMorphTargetNames(_shapes!, "Cylinder");
final animation = AnimationBuilder(
availableMorphs: morphs, framerate: 30, meshName: "Cylinder")
.setDuration(4)
.setMorphTargets(["Key 3", "Key 4"])
.interpolateMorphWeights(0, 4, 0, 1)
.build();
_filamentController!.setMorphAnimationData(_shapes!, animation);
}, "animate cylinder morph weights #3 and #4"),
_item(() async {
var morphs =
await _filamentController!.getMorphTargetNames(_shapes!, "Cube");
final animation = AnimationBuilder(
availableMorphs: morphs, framerate: 30, meshName: "Cube")
.setDuration(4)
.setMorphTargets(["Key 1", "Key 2"])
.interpolateMorphWeights(0, 4, 0, 1)
.build();
_filamentController!.setMorphAnimationData(_shapes!, animation);
}, "animate shapes morph weights #1 and #2"),
_item(() {
_filamentController!
.setMaterialColor(_shapes!, "Cone", 0, Colors.purple);
}, "set cone material color to purple"),
_item(() {
_loop = !_loop;
setState(() {});
}, "toggle animation looping ${_loop ? "OFF" : "ON"}")
]);
if (_animations != null) {
children.addAll(_animations!.map((a) => _item(() {
_filamentController!.playAnimation(
_shapes!, _animations!.indexOf(a),
replaceActive: true, crossfade: 0.5, loop: _loop);
}, "play animation ${_animations!.indexOf(a)} (replace/fade)")));
children.addAll(_animations!.map((a) => _item(() {
_filamentController!.playAnimation(
_shapes!, _animations!.indexOf(a),
replaceActive: false, loop: _loop);
}, "play animation ${_animations!.indexOf(a)} (noreplace)")));
}
children.add(_item(() {
setState(() {
_frustumCulling = !_frustumCulling;
});
children.add(_item(() {
_filamentController!.setToneMapping(ToneMapper.LINEAR);
}, "Set tone mapping to linear"));
_filamentController.setViewFrustumCulling(_frustumCulling);
}, "${_frustumCulling ? "Disable" : "Enable"} frustum culling"));
children.add(_item(() {
_filamentController!.moveCameraToAsset(_shapes!);
}, "Move camera to asset"));
children.add(_item(() {
setState(() {
_frustumCulling = !_frustumCulling;
});
_filamentController!.setViewFrustumCulling(_frustumCulling);
}, "${_frustumCulling ? "Disable" : "Enable"} frustum culling"));
}
return Stack(children: [
Positioned.fill(
child: FilamentGestureDetector(
showControlOverlay: true,
controller: _filamentController,
child: FilamentWidget(
controller: _filamentController,
))),
_filamentController != null
? Positioned.fill(
child: FilamentGestureDetector(
showControlOverlay: true,
controller: _filamentController!,
child: FilamentWidget(
controller: _filamentController!,
)))
: Container(),
Positioned(
right: 50,
top: 50,
child: Text(picked ?? "",
style: TextStyle(color: Colors.green, fontSize: 24))),
Positioned(
bottom: 0,
left: 0,
@@ -314,7 +384,7 @@ class _ExampleWidgetState extends State<ExampleWidget> {
// _item(30 () async { 'remove light'),
// _item(31 () async { 'clear all lights'),
// _item(32 () async { 'set camera model matrix'),
)))),
))))
]);
}
}
@@ -323,26 +393,26 @@ class _ExampleWidgetState extends State<ExampleWidget> {
// break;
// case -2:
// _filamentController.render();
// _filamentController!.render();
// break;
// case -4:
// setState(() {
// _rendering = !_rendering;
// _filamentController.setRendering(_rendering);
// _filamentController!.setRendering(_rendering);
// });
// break;
// case -5:
// setState(() {
// _framerate = _framerate == 60 ? 30 : 60;
// _filamentController.setFrameRate(_framerate);
// _filamentController!.setFrameRate(_framerate);
// });
// break;
// case -6:
// _filamentController.setBackgroundColor(Color(0xFF73C9FA));
// _filamentController!.setBackgroundColor(Color(0xFF73C9FA));
// break;
// case 5:
// _flightHelmet ??= await _filamentController.loadGltf(
// _flightHelmet ??= await _filamentController!.loadGltf(
// 'assets/FlightHelmet/FlightHelmet.gltf', 'assets/FlightHelmet');
// break;
@@ -352,14 +422,14 @@ class _ExampleWidgetState extends State<ExampleWidget> {
// });
// break;
// case 14:
// _filamentController.setCamera(_shapes!, "Camera_Orientation");
// _filamentController!.setCamera(_shapes!, "Camera_Orientation");
// break;
// case 15:
// break;
// case 17:
// var animationNames =
// await _filamentController.getAnimationNames(_shapes!);
// await _filamentController!.getAnimationNames(_shapes!);
// await showDialog(
// context: context,
@@ -373,17 +443,17 @@ class _ExampleWidgetState extends State<ExampleWidget> {
// break;
// case 18:
// _filamentController.panStart(1, 1);
// _filamentController.panUpdate(1, 2);
// _filamentController.panEnd();
// _filamentController!.panStart(1, 1);
// _filamentController!.panUpdate(1, 2);
// _filamentController!.panEnd();
// break;
// case 19:
// _filamentController.panStart(1, 1);
// _filamentController.panUpdate(0, 0);
// _filamentController.panEnd();
// _filamentController!.panStart(1, 1);
// _filamentController!.panUpdate(0, 0);
// _filamentController!.panEnd();
// break;
// case 20:
// _filamentController.clearAssets();
// _filamentController!.clearAssets();
// break;
// case 21:
// break;
@@ -392,7 +462,7 @@ class _ExampleWidgetState extends State<ExampleWidget> {
// case 23:
// break;
// case 24:
// _filamentController.setRotation(_shapes!, pi / 2, 0.0, 1.0, 0.0);
// _filamentController!.setRotation(_shapes!, pi / 2, 0.0, 1.0, 0.0);
// break;
// case 25:
// setState(() {
@@ -400,28 +470,28 @@ class _ExampleWidgetState extends State<ExampleWidget> {
// });
// break;
// case 26:
// _filamentController.setCameraPosition(0, 0, 3);
// _filamentController.setCameraRotation(0, 0, 1, 0);
// _filamentController!.setCameraPosition(0, 0, 3);
// _filamentController!.setCameraRotation(0, 0, 1, 0);
// break;
// case 27:
// _framerate = _framerate == 60 ? 30 : 60;
// _filamentController.setFrameRate(_framerate);
// _filamentController!.setFrameRate(_framerate);
// break;
// case 28:
// _filamentController.setBackgroundImagePosition(25, 25);
// _filamentController!.setBackgroundImagePosition(25, 25);
// break;
// case 29:
// _light = await _filamentController.addLight(
// _light = await _filamentController!.addLight(
// 1, 6500, 15000000, 0, 1, 0, 0, -1, 0, true);
// break;
// case 30:
// if (_light != null) {
// _filamentController.removeLight(_light!);
// _filamentController!.removeLight(_light!);
// _light = null;
// }
// break;
// case 31:
// _filamentController.clearLights();
// _filamentController!.clearLights();
// break;
// case 32:
@@ -432,8 +502,8 @@ class _ExampleWidgetState extends State<ExampleWidget> {
// break;
// case 34:
// var duration =
// await _filamentController.getAnimationDuration(_shapes!, 0);
// _filamentController.playAnimation(_shapes!, 0,
// await _filamentController!.getAnimationDuration(_shapes!, 0);
// _filamentController!.playAnimation(_shapes!, 0,
// loop: false, crossfade: 0.5);
// await Future.delayed(
// Duration(milliseconds: (duration * 1000.0).toInt()));
@@ -449,13 +519,13 @@ class _ExampleWidgetState extends State<ExampleWidget> {
// // });
// break;
// case 35:
// _filamentController.playAnimation(_shapes!, 1,
// _filamentController!.playAnimation(_shapes!, 1,
// loop: false, crossfade: 0.5);
// break;
// case 36:
// _filamentController.playAnimation(_shapes!, 2,
// _filamentController!.playAnimation(_shapes!, 2,
// loop: false, crossfade: 0.5);
// break;
// case 37:
// _filamentController.stopAnimation(_shapes!, 0);
// _filamentController!.stopAnimation(_shapes!, 0);
// break;

View File

@@ -18,9 +18,10 @@ namespace polyvox {
class AssetManager {
public:
AssetManager(const ResourceLoaderWrapper* const loader,
NameComponentManager *ncm,
Engine *engine,
Scene *scene);
NameComponentManager* ncm,
Engine* engine,
Scene* scene,
const char* uberArchivePath);
~AssetManager();
EntityId loadGltf(const char* uri, const char* relativeResourcePath);
EntityId loadGlb(const char* uri, bool unlit);
@@ -69,6 +70,7 @@ namespace polyvox {
void setAnimationFrame(EntityId entity, int animationIndex, int animationFrame);
bool hide(EntityId entity, const char* meshName);
bool reveal(EntityId entity, const char* meshName);
const char* getNameForEntity(EntityId entityId);
private:
AssetLoader* _assetLoader = nullptr;

View File

@@ -49,7 +49,7 @@ namespace polyvox {
class FilamentViewer {
public:
FilamentViewer(const void* context, const ResourceLoaderWrapper* const resourceLoaderWrapper, void* const platform=nullptr);
FilamentViewer(const void* context, const ResourceLoaderWrapper* const resourceLoaderWrapper, void* const platform=nullptr, const char* uberArchivePath=nullptr);
~FilamentViewer();
void setToneMapping(ToneMapping toneMapping);
@@ -106,6 +106,9 @@ namespace polyvox {
int32_t addLight(LightManager::Type t, float colour, float intensity, float posX, float posY, float posZ, float dirX, float dirY, float dirZ, bool shadows);
void removeLight(EntityId entityId);
void clearLights();
void setPostProcessing(bool enabled);
void pick(uint32_t x, uint32_t y, EntityId* entityId);
AssetManager* const getAssetManager() {
return (AssetManager* const) _assetManager;
@@ -174,7 +177,7 @@ namespace polyvox {
void loadPngTexture(string path, ResourceBuffer data);
void loadTextureFromPath(string path);
Manipulator<double>* _manipulator = nullptr;
void _createManipulator();
uint32_t _lastFrameTimeInNanos;
};

View File

@@ -53,7 +53,7 @@ extern "C" {
#endif
typedef int32_t EntityId;
FLUTTER_PLUGIN_EXPORT const void* create_filament_viewer(const void* const context, const ResourceLoaderWrapper* const loader, void* const platform);
FLUTTER_PLUGIN_EXPORT const void* create_filament_viewer(const void* const context, const ResourceLoaderWrapper* const loader, void* const platform, const char* uberArchivePath);
FLUTTER_PLUGIN_EXPORT void destroy_filament_viewer(const void* const viewer);
FLUTTER_PLUGIN_EXPORT ResourceLoaderWrapper* make_resource_loader(LoadFilamentResourceFromOwner loadFn, FreeFilamentResourceFromOwner freeFn, void* owner);
FLUTTER_PLUGIN_EXPORT void* get_asset_manager(const void* const viewer);
@@ -150,6 +150,9 @@ FLUTTER_PLUGIN_EXPORT void set_camera_focal_length(const void* const viewer, flo
FLUTTER_PLUGIN_EXPORT void set_camera_focus_distance(const void* const viewer, float focusDistance);
FLUTTER_PLUGIN_EXPORT int hide_mesh(void* assetManager, EntityId asset, const char* meshName);
FLUTTER_PLUGIN_EXPORT int reveal_mesh(void* assetManager, EntityId asset, const char* meshName);
FLUTTER_PLUGIN_EXPORT void set_post_processing(void* const viewer, bool enabled);
FLUTTER_PLUGIN_EXPORT void pick(void* const viewer, int x, int y, EntityId* entityId);
FLUTTER_PLUGIN_EXPORT const char* get_name_for_entity(void* const assetManager, const EntityId entityId);
FLUTTER_PLUGIN_EXPORT void ios_dummy();
#ifdef __cplusplus
}

View File

@@ -1,6 +1,8 @@
#ifndef _POLYVOX_FILAMENT_FFI_API_H
#define _POLYVOX_FILAMENT_FFI_API_H
#include "PolyvoxFilamentApi.h"
#ifdef __cplusplus
extern "C" {
#endif
@@ -10,14 +12,12 @@ extern "C" {
/// The intention is that calling one of these methods will call its respective method in PolyvoxFilamentApi.h, but wrapped in some kind of thread runner to ensure thread safety.
///
#include "PolyvoxFilamentApi.h"
typedef int32_t EntityId;
typedef void (*FilamentRenderCallback)(void* const owner);
FLUTTER_PLUGIN_EXPORT void* const create_filament_viewer_ffi(void* const context, void* const platform, const ResourceLoaderWrapper* const loader, void (*renderCallback)(void* const renderCallbackOwner), void* const renderCallbackOwner);
FLUTTER_PLUGIN_EXPORT void* const create_filament_viewer_ffi(void* const context, void* const platform, const char* uberArchivePath, const ResourceLoaderWrapper* const loader, void (*renderCallback)(void* const renderCallbackOwner), void* const renderCallbackOwner);
FLUTTER_PLUGIN_EXPORT void create_swap_chain_ffi(void* const viewer, void* const surface, uint32_t width, uint32_t height);
FLUTTER_PLUGIN_EXPORT void create_render_target_ffi(void* const viewer, uint32_t nativeTextureId, uint32_t width, uint32_t height);
FLUTTER_PLUGIN_EXPORT void create_render_target_ffi(void* const viewer, intptr_t nativeTextureId, uint32_t width, uint32_t height);
FLUTTER_PLUGIN_EXPORT void destroy_filament_viewer_ffi(void* const viewer);
FLUTTER_PLUGIN_EXPORT void render_ffi(void* const viewer);
FLUTTER_PLUGIN_EXPORT FilamentRenderCallback make_render_callback_fn_pointer(FilamentRenderCallback);
@@ -81,10 +81,10 @@ FLUTTER_PLUGIN_EXPORT void set_animation_frame_ffi(void* const assetManager, Ent
FLUTTER_PLUGIN_EXPORT void stop_animation_ffi(void* const assetManager, EntityId asset, int index);
FLUTTER_PLUGIN_EXPORT int get_animation_count_ffi(void* const assetManager, EntityId asset);
FLUTTER_PLUGIN_EXPORT void get_animation_name_ffi(void* const assetManager, EntityId asset, char *const outPtr, int index);
FLUTTER_PLUGIN_EXPORT float get_animation_duration_ffi(void* const assetManager, EntityId asset, int index);
FLUTTER_PLUGIN_EXPORT void get_morph_target_name_ffi(void* const assetManager, EntityId asset, const char *meshName, char *const outPtr, int index);
FLUTTER_PLUGIN_EXPORT int get_morph_target_name_count_ffi(void* const assetManager, EntityId asset, const char *meshName);
FLUTTER_PLUGIN_EXPORT void set_post_processing_ffi(void* const viewer, bool enabled);
FLUTTER_PLUGIN_EXPORT void pick_ffi(void* const viewer, int x, int y, EntityId* entityId);
FLUTTER_PLUGIN_EXPORT void ios_dummy_ffi();
#ifdef __cplusplus

View File

@@ -13,7 +13,7 @@ A new flutter plugin project.
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => 'email@example.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/*', 'src/*', 'src/ios/*', 'include/filament/*', 'include/*', 'include/material/*.c'
s.source_files = 'Classes/*', 'src/*', "src/camutils/*", 'src/ios/*', 'include/filament/*', 'include/*', 'include/material/*.c'
s.public_header_files = 'include/SwiftPolyvoxFilamentPlugin-Bridging-Header.h', 'include/PolyvoxFilamentApi.h', 'include/PolyvoxFilamentFFIApi.h', 'include/ResourceBuffer.hpp', 'include/Log.hpp'
s.dependency 'Flutter'
s.platform = :ios, '12.1'
@@ -26,7 +26,7 @@ A new flutter plugin project.
'OTHER_CFLAGS' => '"-fvisibility=default" "$(inherited)"',
'USER_HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/include" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/include/filament" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/src" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/src/image" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/src/shaders" "$(inherited)"',
'ALWAYS_SEARCH_USER_PATHS' => 'YES',
"OTHER_LDFLAGS" => '-lfilament -lbackend -lfilameshio -lviewer -lfilamat -lgeometry -lutils -lfilabridge -lgltfio_core -lfilament-iblprefilter -limage -limageio -ltinyexr -lcamutils -lgltfio_core -lfilaflat -ldracodec -libl -lktxreader -lpng -lpng16 -lz -lstb -luberzlib -lsmol-v -luberarchive -lzstd -lstdc++',
"OTHER_LDFLAGS" => '-lfilament -lbackend -lfilameshio -lviewer -lfilamat -lgeometry -lutils -lfilabridge -lgltfio_core -lfilament-iblprefilter -limage -limageio -ltinyexr -lgltfio_core -lfilaflat -ldracodec -libl -lktxreader -lpng -lpng16 -lz -lstb -luberzlib -lsmol-v -luberarchive -lzstd -lstdc++',
'LIBRARY_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/lib" "$(inherited)"',
}
@@ -38,7 +38,7 @@ A new flutter plugin project.
'OTHER_CFLAGS' => '"-fvisibility=default" "$(inherited)"',
'USER_HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/include" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/include/filament" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/src" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/src/image" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/src/shaders" "$(inherited)"',
'ALWAYS_SEARCH_USER_PATHS' => 'YES',
"OTHER_LDFLAGS" => '-lfilament -lbackend -lfilameshio -lviewer -lfilamat -lgeometry -lutils -lfilabridge -lgltfio_core -lfilament-iblprefilter -limage -limageio -ltinyexr -lcamutils -lgltfio_core -lfilaflat -ldracodec -libl -lktxreader -lpng -lpng16 -lz -lstb -luberzlib -lsmol-v -luberarchive -lzstd -lstdc++',
"OTHER_LDFLAGS" => '-lfilament -lbackend -lfilameshio -lviewer -lfilamat -lgeometry -lutils -lfilabridge -lgltfio_core -lfilament-iblprefilter -limage -limageio -ltinyexr -lgltfio_core -lfilaflat -ldracodec -libl -lktxreader -lpng -lpng16 -lz -lstb -luberzlib -lsmol-v -luberarchive -lzstd -lstdc++',
'LIBRARY_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/lib" "$(inherited)"',
}

View File

@@ -38,9 +38,10 @@ using namespace filament;
using namespace filament::gltfio;
AssetManager::AssetManager(const ResourceLoaderWrapper* const resourceLoaderWrapper,
NameComponentManager *ncm,
Engine *engine,
Scene *scene)
NameComponentManager* ncm,
Engine* engine,
Scene* scene,
const char* uberArchivePath)
: _resourceLoaderWrapper(resourceLoaderWrapper),
_ncm(ncm),
_engine(engine),
@@ -52,15 +53,17 @@ _scene(scene) {
_gltfResourceLoader = new ResourceLoader({.engine = _engine,
.normalizeSkinningWeights = true });
// TODO - allow passing uberz archive
// e.g. auto uberArchivePath = "packages/polyvox_filament/assets/default.uberz"
// auto uberdata = resourceLoaderWrapper->load(uberArchivePath);
// if (!uberdata.data) {
// Log("Failed to load ubershader material. This is fatal.");
// }
// _ubershaderProvider = gltfio::createUbershaderProvider(_engine, uberdata.data, uberdata.size);
_ubershaderProvider = gltfio::createUbershaderProvider(
if(uberArchivePath) {
auto uberdata = resourceLoaderWrapper->load(uberArchivePath);
if (!uberdata.data) {
Log("Failed to load ubershader material. This is fatal.");
}
_ubershaderProvider = gltfio::createUbershaderProvider(_engine, uberdata.data, uberdata.size);
resourceLoaderWrapper->free(uberdata);
} else {
_ubershaderProvider = gltfio::createUbershaderProvider(
_engine, UBERARCHIVE_DEFAULT_DATA, UBERARCHIVE_DEFAULT_SIZE);
}
Log("Created ubershader provider.");
EntityManager &em = EntityManager::get();
@@ -943,6 +946,16 @@ size_t AssetManager::getLightEntityCount(EntityId entity) const noexcept {
return asset.mAsset->getLightEntityCount();
}
const char* AssetManager::getNameForEntity(EntityId entityId) {
const auto& entity = Entity::import(entityId);
auto nameInstance = _ncm->getInstance(entity);
if(!nameInstance.isValid()) {
Log("Failed to find name instance for entity ID %d", entityId);
return nullptr;
}
return _ncm->getName(nameInstance);
}
} // namespace polyvox

File diff suppressed because it is too large Load Diff

View File

@@ -15,8 +15,8 @@ extern "C" {
#include "PolyvoxFilamentApi.h"
FLUTTER_PLUGIN_EXPORT const void* create_filament_viewer(const void* context, const ResourceLoaderWrapper* const loader, void* const platform) {
return (const void*) new FilamentViewer(context, loader, platform);
FLUTTER_PLUGIN_EXPORT const void* create_filament_viewer(const void* context, const ResourceLoaderWrapper* const loader, void* const platform, const char* uberArchivePath) {
return (const void*) new FilamentViewer(context, loader, platform, uberArchivePath);
}
FLUTTER_PLUGIN_EXPORT ResourceLoaderWrapper* make_resource_loader(LoadFilamentResourceFromOwner loadFn, FreeFilamentResourceFromOwner freeFn, void* const owner) {
@@ -43,32 +43,32 @@ extern "C" {
((FilamentViewer*)viewer)->setBackgroundImage(path, fillHeight);
}
FLUTTER_PLUGIN_EXPORT void set_background_image_position(const void* const viewer, float x, float y, bool clamp) {
FLUTTER_PLUGIN_EXPORT void set_background_image_position(const void* const viewer, float x, float y, bool clamp) {
((FilamentViewer*)viewer)->setBackgroundImagePosition(x, y, clamp);
}
FLUTTER_PLUGIN_EXPORT void set_tone_mapping(const void* const viewer, int toneMapping) {
FLUTTER_PLUGIN_EXPORT void set_tone_mapping(const void* const viewer, int toneMapping) {
((FilamentViewer*)viewer)->setToneMapping((ToneMapping)toneMapping);
}
FLUTTER_PLUGIN_EXPORT void set_bloom(const void* const viewer, float strength) {
FLUTTER_PLUGIN_EXPORT void set_bloom(const void* const viewer, float strength) {
Log("Setting bloom to %f", strength);
((FilamentViewer*)viewer)->setBloom(strength);
}
FLUTTER_PLUGIN_EXPORT void load_skybox(const void* const viewer, const char* skyboxPath) {
FLUTTER_PLUGIN_EXPORT void load_skybox(const void* const viewer, const char* skyboxPath) {
((FilamentViewer*)viewer)->loadSkybox(skyboxPath);
}
FLUTTER_PLUGIN_EXPORT void load_ibl(const void* const viewer, const char* iblPath, float intensity) {
FLUTTER_PLUGIN_EXPORT void load_ibl(const void* const viewer, const char* iblPath, float intensity) {
((FilamentViewer*)viewer)->loadIbl(iblPath, intensity);
}
FLUTTER_PLUGIN_EXPORT void remove_skybox(const void* const viewer) {
FLUTTER_PLUGIN_EXPORT void remove_skybox(const void* const viewer) {
((FilamentViewer*)viewer)->removeSkybox();
}
FLUTTER_PLUGIN_EXPORT void remove_ibl(const void* const viewer) {
FLUTTER_PLUGIN_EXPORT void remove_ibl(const void* const viewer) {
((FilamentViewer*)viewer)->removeIbl();
}
@@ -76,11 +76,11 @@ extern "C" {
return ((FilamentViewer*)viewer)->addLight((LightManager::Type)type, colour, intensity, posX, posY, posZ, dirX, dirY, dirZ, shadows);
}
FLUTTER_PLUGIN_EXPORT void remove_light(const void* const viewer, int32_t entityId) {
FLUTTER_PLUGIN_EXPORT void remove_light(const void* const viewer, int32_t entityId) {
((FilamentViewer*)viewer)->removeLight(entityId);
}
FLUTTER_PLUGIN_EXPORT void clear_lights(const void* const viewer) {
FLUTTER_PLUGIN_EXPORT void clear_lights(const void* const viewer) {
((FilamentViewer*)viewer)->clearLights();
}
@@ -104,27 +104,27 @@ extern "C" {
((FilamentViewer*)viewer)->moveCameraToAsset(asset);
}
FLUTTER_PLUGIN_EXPORT void set_camera_focus_distance(const void* const viewer, float distance) {
FLUTTER_PLUGIN_EXPORT void set_camera_focus_distance(const void* const viewer, float distance) {
((FilamentViewer*)viewer)->setCameraFocusDistance(distance);
}
FLUTTER_PLUGIN_EXPORT void set_camera_exposure(const void* const viewer, float aperture, float shutterSpeed, float sensitivity) {
FLUTTER_PLUGIN_EXPORT void set_camera_exposure(const void* const viewer, float aperture, float shutterSpeed, float sensitivity) {
((FilamentViewer*)viewer)->setCameraExposure(aperture, shutterSpeed, sensitivity);
}
FLUTTER_PLUGIN_EXPORT void set_camera_position(const void* const viewer, float x, float y, float z) {
FLUTTER_PLUGIN_EXPORT void set_camera_position(const void* const viewer, float x, float y, float z) {
((FilamentViewer*)viewer)->setCameraPosition(x, y, z);
}
FLUTTER_PLUGIN_EXPORT void set_camera_rotation(const void* const viewer, float rads, float x, float y, float z) {
FLUTTER_PLUGIN_EXPORT void set_camera_rotation(const void* const viewer, float rads, float x, float y, float z) {
((FilamentViewer*)viewer)->setCameraRotation(rads, x, y, z);
}
FLUTTER_PLUGIN_EXPORT void set_camera_model_matrix(const void* const viewer, const float* const matrix) {
FLUTTER_PLUGIN_EXPORT void set_camera_model_matrix(const void* const viewer, const float* const matrix) {
((FilamentViewer*)viewer)->setCameraModelMatrix(matrix);
}
FLUTTER_PLUGIN_EXPORT void set_camera_focal_length(const void* const viewer, float focalLength) {
FLUTTER_PLUGIN_EXPORT void set_camera_focal_length(const void* const viewer, float focalLength) {
((FilamentViewer*)viewer)->setCameraFocalLength(focalLength);
}
@@ -137,46 +137,46 @@ extern "C" {
((FilamentViewer*)viewer)->render(frameTimeInNanos, pixelBuffer, callback, data);
}
FLUTTER_PLUGIN_EXPORT void set_frame_interval(
FLUTTER_PLUGIN_EXPORT void set_frame_interval(
const void* const viewer,
float frameInterval
) {
((FilamentViewer*)viewer)->setFrameInterval(frameInterval);
}
FLUTTER_PLUGIN_EXPORT void destroy_swap_chain(const void* const viewer) {
FLUTTER_PLUGIN_EXPORT void destroy_swap_chain(const void* const viewer) {
((FilamentViewer*)viewer)->destroySwapChain();
}
FLUTTER_PLUGIN_EXPORT void create_swap_chain(const void* const viewer, const void* const window, uint32_t width, uint32_t height) {
FLUTTER_PLUGIN_EXPORT void create_swap_chain(const void* const viewer, const void* const window, uint32_t width, uint32_t height) {
((FilamentViewer*)viewer)->createSwapChain(window, width, height);
}
FLUTTER_PLUGIN_EXPORT void update_viewport_and_camera_projection(const void* const viewer, uint32_t width, uint32_t height, float scaleFactor) {
FLUTTER_PLUGIN_EXPORT void update_viewport_and_camera_projection(const void* const viewer, uint32_t width, uint32_t height, float scaleFactor) {
return ((FilamentViewer*)viewer)->updateViewportAndCameraProjection(width, height, scaleFactor);
}
FLUTTER_PLUGIN_EXPORT void scroll_update(const void* const viewer, float x, float y, float delta) {
FLUTTER_PLUGIN_EXPORT void scroll_update(const void* const viewer, float x, float y, float delta) {
((FilamentViewer*)viewer)->scrollUpdate(x, y, delta);
}
FLUTTER_PLUGIN_EXPORT void scroll_begin(const void* const viewer) {
FLUTTER_PLUGIN_EXPORT void scroll_begin(const void* const viewer) {
((FilamentViewer*)viewer)->scrollBegin();
}
FLUTTER_PLUGIN_EXPORT void scroll_end(const void* const viewer) {
FLUTTER_PLUGIN_EXPORT void scroll_end(const void* const viewer) {
((FilamentViewer*)viewer)->scrollEnd();
}
FLUTTER_PLUGIN_EXPORT void grab_begin(const void* const viewer, float x, float y, bool pan) {
FLUTTER_PLUGIN_EXPORT void grab_begin(const void* const viewer, float x, float y, bool pan) {
((FilamentViewer*)viewer)->grabBegin(x, y, pan);
}
FLUTTER_PLUGIN_EXPORT void grab_update(const void* const viewer, float x, float y) {
FLUTTER_PLUGIN_EXPORT void grab_update(const void* const viewer, float x, float y) {
((FilamentViewer*)viewer)->grabUpdate(x, y);
}
FLUTTER_PLUGIN_EXPORT void grab_end(const void* const viewer) {
FLUTTER_PLUGIN_EXPORT void grab_end(const void* const viewer) {
((FilamentViewer*)viewer)->grabEnd();
}
@@ -184,7 +184,7 @@ extern "C" {
return (void*)((FilamentViewer*)viewer)->getAssetManager();
}
FLUTTER_PLUGIN_EXPORT void apply_weights(
FLUTTER_PLUGIN_EXPORT void apply_weights(
void* assetManager,
EntityId asset,
const char* const entityName,
@@ -193,7 +193,7 @@ extern "C" {
// ((AssetManager*)assetManager)->setMorphTargetWeights(asset, entityName, weights, count);
}
FLUTTER_PLUGIN_EXPORT void set_morph_target_weights(
FLUTTER_PLUGIN_EXPORT void set_morph_target_weights(
void* assetManager,
EntityId asset,
const char* const entityName,
@@ -232,7 +232,7 @@ extern "C" {
);
}
FLUTTER_PLUGIN_EXPORT void set_bone_animation(
FLUTTER_PLUGIN_EXPORT void set_bone_animation(
void* assetManager,
EntityId asset,
const float* const frameData,
@@ -254,6 +254,10 @@ extern "C" {
);
}
FLUTTER_PLUGIN_EXPORT void set_post_processing(void* const viewer, bool enabled) {
((FilamentViewer*)viewer)->setPostProcessing(enabled);
}
// void set_bone_transform(
@@ -284,7 +288,7 @@ extern "C" {
// }
FLUTTER_PLUGIN_EXPORT void play_animation(
FLUTTER_PLUGIN_EXPORT void play_animation(
void* assetManager,
EntityId asset,
int index,
@@ -295,7 +299,7 @@ extern "C" {
((AssetManager*)assetManager)->playAnimation(asset, index, loop, reverse, replaceActive, crossfade);
}
FLUTTER_PLUGIN_EXPORT void set_animation_frame(
FLUTTER_PLUGIN_EXPORT void set_animation_frame(
void* assetManager,
EntityId asset,
int animationIndex,
@@ -315,7 +319,7 @@ extern "C" {
return (int)names->size();
}
FLUTTER_PLUGIN_EXPORT void get_animation_name(
FLUTTER_PLUGIN_EXPORT void get_animation_name(
void* assetManager,
EntityId asset,
char* const outPtr,
@@ -331,17 +335,17 @@ extern "C" {
return (int)names->size();
}
FLUTTER_PLUGIN_EXPORT void get_morph_target_name(void* assetManager, EntityId asset, const char* meshName, char* const outPtr, int index ) {
FLUTTER_PLUGIN_EXPORT void get_morph_target_name(void* assetManager, EntityId asset, const char* meshName, char* const outPtr, int index ) {
unique_ptr<vector<string>> names = ((AssetManager*)assetManager)->getMorphTargetNames(asset, meshName);
string name = names->at(index);
strcpy(outPtr, name.c_str());
}
FLUTTER_PLUGIN_EXPORT void remove_asset(const void* const viewer, EntityId asset) {
FLUTTER_PLUGIN_EXPORT void remove_asset(const void* const viewer, EntityId asset) {
((FilamentViewer*)viewer)->removeAsset(asset);
}
FLUTTER_PLUGIN_EXPORT void clear_assets(const void* const viewer) {
FLUTTER_PLUGIN_EXPORT void clear_assets(const void* const viewer) {
((FilamentViewer*)viewer)->clearAssets();
}
@@ -349,35 +353,44 @@ extern "C" {
return ((AssetManager*)assetManager)->setMaterialColor(asset, meshName, materialIndex, r, g, b, a);
}
FLUTTER_PLUGIN_EXPORT void transform_to_unit_cube(void* assetManager, EntityId asset) {
FLUTTER_PLUGIN_EXPORT void transform_to_unit_cube(void* assetManager, EntityId asset) {
((AssetManager*)assetManager)->transformToUnitCube(asset);
}
FLUTTER_PLUGIN_EXPORT void set_position(void* assetManager, EntityId asset, float x, float y, float z) {
FLUTTER_PLUGIN_EXPORT void set_position(void* assetManager, EntityId asset, float x, float y, float z) {
((AssetManager*)assetManager)->setPosition(asset, x, y, z);
}
FLUTTER_PLUGIN_EXPORT void set_rotation(void* assetManager, EntityId asset, float rads, float x, float y, float z) {
FLUTTER_PLUGIN_EXPORT void set_rotation(void* assetManager, EntityId asset, float rads, float x, float y, float z) {
((AssetManager*)assetManager)->setRotation(asset, rads, x, y, z);
}
FLUTTER_PLUGIN_EXPORT void set_scale(void* assetManager, EntityId asset, float scale) {
FLUTTER_PLUGIN_EXPORT void set_scale(void* assetManager, EntityId asset, float scale) {
((AssetManager*)assetManager)->setScale(asset, scale);
}
FLUTTER_PLUGIN_EXPORT void stop_animation(void* assetManager, EntityId asset, int index) {
FLUTTER_PLUGIN_EXPORT void stop_animation(void* assetManager, EntityId asset, int index) {
((AssetManager*)assetManager)->stopAnimation(asset, index);
}
int hide_mesh(void* assetManager, EntityId asset, const char* meshName) {
FLUTTER_PLUGIN_EXPORT int hide_mesh(void* assetManager, EntityId asset, const char* meshName) {
return ((AssetManager*)assetManager)->hide(asset, meshName);
}
int reveal_mesh(void* assetManager, EntityId asset, const char* meshName) {
FLUTTER_PLUGIN_EXPORT int reveal_mesh(void* assetManager, EntityId asset, const char* meshName) {
return ((AssetManager*)assetManager)->reveal(asset, meshName);
}
FLUTTER_PLUGIN_EXPORT void ios_dummy() {
FLUTTER_PLUGIN_EXPORT void pick(void* const viewer, int x, int y, EntityId* entityId) {
((FilamentViewer*)viewer)->pick(static_cast<uint32_t>(x), static_cast<uint32_t>(y), static_cast<int32_t*>(entityId));
}
FLUTTER_PLUGIN_EXPORT const char* get_name_for_entity(void* const assetManager, const EntityId entityId) {
return ((AssetManager*)assetManager)->getNameForEntity(entityId);
}
FLUTTER_PLUGIN_EXPORT void ios_dummy() {
Log("Dummy called");
}
}

View File

@@ -44,6 +44,7 @@ public:
void* const createViewer(
void* const context,
void* const platform,
const char* uberArchivePath,
const ResourceLoaderWrapper* const loader,
void (*renderCallback)(void*), void* const owner
) {
@@ -51,7 +52,7 @@ public:
_renderCallbackOwner = owner;
std::packaged_task<FilamentViewer*()> lambda([&]() mutable
{
return new FilamentViewer(context, loader, platform);
return new FilamentViewer(context, loader, platform, uberArchivePath);
});
auto fut = add_task(lambda);
fut.wait();
@@ -59,6 +60,16 @@ public:
return (void* const)_viewer;
}
void destroyViewer() {
std::packaged_task<void()> lambda([&]() mutable {
_rendering = false;
destroy_filament_viewer(_viewer);
_viewer = nullptr;
});
auto fut = add_task(lambda);
fut.wait();
}
void setRendering(bool rendering)
{
_rendering = rendering;
@@ -106,6 +117,7 @@ extern "C"
FLUTTER_PLUGIN_EXPORT void* const create_filament_viewer_ffi(
void* const context,
void* const platform,
const char* uberArchivePath,
const ResourceLoaderWrapper* const loader,
void (*renderCallback)(void* const renderCallbackOwner),
void* const renderCallbackOwner) {
@@ -113,7 +125,11 @@ extern "C"
{
_rl = new RenderLoop();
}
return _rl->createViewer(context, platform, loader, renderCallback, renderCallbackOwner);
return _rl->createViewer(context, platform,uberArchivePath, loader, renderCallback, renderCallbackOwner);
}
FLUTTER_PLUGIN_EXPORT void destroy_filament_viewer_ffi(void* const viewer) {
_rl->destroyViewer();
}
FLUTTER_PLUGIN_EXPORT void create_swap_chain_ffi(void* const viewer, void* const surface, uint32_t width, uint32_t height)
@@ -127,7 +143,7 @@ extern "C"
fut.wait();
}
FLUTTER_PLUGIN_EXPORT void create_render_target_ffi(void* const viewer, uint32_t nativeTextureId, uint32_t width, uint32_t height)
FLUTTER_PLUGIN_EXPORT void create_render_target_ffi(void* const viewer, intptr_t nativeTextureId, uint32_t width, uint32_t height)
{
std::packaged_task<void()> lambda([&]() mutable
{ create_render_target(viewer, nativeTextureId, width, height); });
@@ -267,6 +283,7 @@ extern "C"
auto fut = _rl->add_task(lambda);
fut.wait();
}
FLUTTER_PLUGIN_EXPORT void remove_ibl_ffi(void* const viewer)
{
std::packaged_task<void()> lambda([&]
@@ -274,6 +291,7 @@ extern "C"
auto fut = _rl->add_task(lambda);
fut.wait();
}
EntityId add_light_ffi(void* const viewer, uint8_t type, float colour, float intensity, float posX, float posY, float posZ, float dirX, float dirY, float dirZ, bool shadows)
{
std::packaged_task<EntityId()> lambda([&]
@@ -369,28 +387,31 @@ extern "C"
// TODO
}
void play_animation_ffi(void* const assetManager, EntityId asset, int index, bool loop, bool reverse, bool replaceActive, float crossfade)
FLUTTER_PLUGIN_EXPORT void play_animation_ffi(void* const assetManager, EntityId asset, int index, bool loop, bool reverse, bool replaceActive, float crossfade)
{
std::packaged_task<void()> lambda([&]
{ play_animation(assetManager, asset, index, loop, reverse, replaceActive, crossfade); });
auto fut = _rl->add_task(lambda);
fut.wait();
}
void set_animation_frame_ffi(void* const assetManager, EntityId asset, int animationIndex, int animationFrame)
FLUTTER_PLUGIN_EXPORT void set_animation_frame_ffi(void* const assetManager, EntityId asset, int animationIndex, int animationFrame)
{
std::packaged_task<void()> lambda([&]
{ set_animation_frame(assetManager, asset, animationIndex, animationFrame); });
auto fut = _rl->add_task(lambda);
fut.wait();
}
void stop_animation_ffi(void* const assetManager, EntityId asset, int index)
FLUTTER_PLUGIN_EXPORT void stop_animation_ffi(void* const assetManager, EntityId asset, int index)
{
std::packaged_task<void()> lambda([&]
{ stop_animation(assetManager, asset, index); });
auto fut = _rl->add_task(lambda);
fut.wait();
}
int get_animation_count_ffi(void* const assetManager, EntityId asset)
FLUTTER_PLUGIN_EXPORT int get_animation_count_ffi(void* const assetManager, EntityId asset)
{
std::packaged_task<int()> lambda([&]
{ return get_animation_count(assetManager, asset); });
@@ -398,7 +419,7 @@ extern "C"
fut.wait();
return fut.get();
}
void get_animation_name_ffi(void* const assetManager, EntityId asset, char *const outPtr, int index)
FLUTTER_PLUGIN_EXPORT void get_animation_name_ffi(void* const assetManager, EntityId asset, char *const outPtr, int index)
{
std::packaged_task<void()> lambda([&] {
get_animation_name(assetManager, asset, outPtr, index);
@@ -407,6 +428,32 @@ extern "C"
fut.wait();
}
FLUTTER_PLUGIN_EXPORT void set_post_processing_ffi(void* const viewer, bool enabled) {
std::packaged_task<void()> lambda([&] {
set_post_processing(viewer, enabled);
});
auto fut = _rl->add_task(lambda);
fut.wait();
}
FLUTTER_PLUGIN_EXPORT void pick_ffi(void* const viewer, int x, int y, EntityId* entityId) {
std::packaged_task<void()> lambda([&] {
pick(viewer, x, y, entityId);
});
auto fut = _rl->add_task(lambda);
fut.wait();
}
FLUTTER_PLUGIN_EXPORT const char* get_name_for_entity_ffi(void* const assetManager, const EntityId entityId) {
std::packaged_task<const char*()> lambda([&] {
return get_name_for_entity(assetManager, entityId);
});
auto fut = _rl->add_task(lambda);
fut.wait();
return fut.get();
}
FLUTTER_PLUGIN_EXPORT void ios_dummy_ffi() {
Log("Dummy called");
}

View File

@@ -0,0 +1,98 @@
/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <camutils/Bookmark.h>
#include <camutils/Manipulator.h>
#include <math/scalar.h>
#include <math/vec3.h>
using namespace filament::math;
namespace filament {
namespace camutils {
template <typename FLOAT>
Bookmark<FLOAT> Bookmark<FLOAT>::interpolate(Bookmark<FLOAT> a, Bookmark<FLOAT> b, double t) {
Bookmark<FLOAT> result;
using float3 = filament::math::vec3<FLOAT>;
if (a.mode == Mode::MAP) {
assert(b.mode == Mode::MAP);
const double rho = sqrt(2.0);
const double rho2 = 2, rho4 = 4;
const double ux0 = a.map.center.x, uy0 = a.map.center.y, w0 = a.map.extent;
const double ux1 = b.map.center.x, uy1 = b.map.center.y, w1 = b.map.extent;
const double dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, d1 = sqrt(d2);
const double b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2.0 * w0 * rho2 * d1);
const double b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2.0 * w1 * rho2 * d1);
const double r0 = log(sqrt(b0 * b0 + 1.0) - b0);
const double r1 = log(sqrt(b1 * b1 + 1) - b1);
const double dr = r1 - r0;
const int valid = !std::isnan(dr) && dr != 0;
const double S = (valid ? dr : log(w1 / w0)) / rho;
const double s = t * S;
// This performs Van Wijk interpolation to animate between two waypoints on a map.
if (valid) {
const double coshr0 = cosh(r0);
const double u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));
Bookmark<FLOAT> result;
result.map.center.x = ux0 + u * dx;
result.map.center.y = uy0 + u * dy;
result.map.extent = w0 * coshr0 / cosh(rho * s + r0);
return result;
}
// For degenerate cases, fall back to a simplified interpolation method.
result.map.center.x = ux0 + t * dx;
result.map.center.y = uy0 + t * dy;
result.map.extent = w0 * exp(rho * s);
return result;
}
assert(b.mode == Mode::ORBIT);
result.orbit.phi = lerp(a.orbit.phi, b.orbit.phi, FLOAT(t));
result.orbit.theta = lerp(a.orbit.theta, b.orbit.theta, FLOAT(t));
result.orbit.distance = lerp(a.orbit.distance, b.orbit.distance, FLOAT(t));
result.orbit.pivot = lerp(a.orbit.pivot, b.orbit.pivot, float3(t));
return result;
}
// Uses the Van Wijk method to suggest a duration for animating between two waypoints on a map.
// This does not have units, so just use it as a multiplier.
template <typename FLOAT>
double Bookmark<FLOAT>::duration(Bookmark<FLOAT> a, Bookmark<FLOAT> b) {
assert(a.mode == Mode::ORBIT && b.mode == Mode::ORBIT);
const double rho = sqrt(2.0);
const double rho2 = 2, rho4 = 4;
const double ux0 = a.map.center.x, uy0 = a.map.center.y, w0 = a.map.extent;
const double ux1 = b.map.center.x, uy1 = b.map.center.y, w1 = b.map.extent;
const double dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, d1 = sqrt(d2);
const double b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2.0 * w0 * rho2 * d1);
const double b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2.0 * w1 * rho2 * d1);
const double r0 = log(sqrt(b0 * b0 + 1.0) - b0);
const double r1 = log(sqrt(b1 * b1 + 1) - b1);
const double dr = r1 - r0;
const int valid = !std::isnan(dr) && dr != 0;
const double S = (valid ? dr : log(w1 / w0)) / rho;
return fabs(S);
}
template class Bookmark<float>;
} // namespace camutils
} // namespace filament

View File

@@ -0,0 +1,206 @@
/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef CAMUTILS_FREEFLIGHT_MANIPULATOR_H
#define CAMUTILS_FREEFLIGHT_MANIPULATOR_H
#include <camutils/Manipulator.h>
#include <math/scalar.h>
#include <math/mat3.h>
#include <math/mat4.h>
#include <math/quat.h>
#include <cmath>
namespace filament {
namespace camutils {
using namespace filament::math;
template<typename FLOAT>
class FreeFlightManipulator : public Manipulator<FLOAT> {
public:
using vec2 = filament::math::vec2<FLOAT>;
using vec3 = filament::math::vec3<FLOAT>;
using vec4 = filament::math::vec4<FLOAT>;
using Bookmark = filament::camutils::Bookmark<FLOAT>;
using Base = Manipulator<FLOAT>;
using Config = typename Base::Config;
FreeFlightManipulator(Mode mode, const Config& props) : Base(mode, props) {
setProperties(props);
Base::mEye = Base::mProps.flightStartPosition;
const auto pitch = Base::mProps.flightStartPitch;
const auto yaw = Base::mProps.flightStartYaw;
mTargetEuler = {pitch, yaw};
updateTarget(pitch, yaw);
}
void setProperties(const Config& props) override {
Config resolved = props;
if (resolved.flightPanSpeed == vec2(0, 0)) {
resolved.flightPanSpeed = vec2(0.01, 0.01);
}
if (resolved.flightMaxSpeed == 0.0) {
resolved.flightMaxSpeed = 10.0;
}
if (resolved.flightSpeedSteps == 0) {
resolved.flightSpeedSteps = 80;
}
Base::setProperties(resolved);
}
void updateTarget(FLOAT pitch, FLOAT yaw) {
Base::mTarget = Base::mEye + (mat3::eulerZYX(0, yaw, pitch) * vec3(0.0, 0.0, -1.0));
}
void grabBegin(int x, int y, bool strafe) override {
mGrabWin = {x, y};
mGrabbing = true;
mGrabEuler = mTargetEuler;
}
void grabUpdate(int x, int y) override {
if (!mGrabbing) {
return;
}
const vec2 del = mGrabWin - vec2{x, y};
const auto& grabPitch = mGrabEuler.x;
const auto& grabYaw = mGrabEuler.y;
auto& pitch = mTargetEuler.x;
auto& yaw = mTargetEuler.y;
constexpr double EPSILON = 0.001;
auto panSpeed = Base::mProps.flightPanSpeed;
constexpr FLOAT minPitch = (-F_PI_2 + EPSILON);
constexpr FLOAT maxPitch = ( F_PI_2 - EPSILON);
pitch = clamp(grabPitch + del.y * -panSpeed.y, minPitch, maxPitch);
yaw = fmod(grabYaw + del.x * panSpeed.x, 2.0 * F_PI);
updateTarget(pitch, yaw);
}
void grabEnd() override {
mGrabbing = false;
}
void keyDown(typename Base::Key key) override {
mKeyDown[(int) key] = true;
}
void keyUp(typename Base::Key key) override {
mKeyDown[(int) key] = false;
}
void scroll(int x, int y, FLOAT scrolldelta) override {
const FLOAT halfSpeedSteps = Base::mProps.flightSpeedSteps / 2;
mScrollWheel = clamp(mScrollWheel + scrolldelta, -halfSpeedSteps, halfSpeedSteps);
// Normalize the scroll position from -1 to 1 and calculate the move speed, in world
// units per second.
mScrollPositionNormalized = (mScrollWheel + halfSpeedSteps) / halfSpeedSteps - 1.0;
mMoveSpeed = pow(Base::mProps.flightMaxSpeed, mScrollPositionNormalized);
}
void update(FLOAT deltaTime) override {
vec3 forceLocal { 0.0, 0.0, 0.0 };
if (mKeyDown[(int) Base::Key::FORWARD]) {
forceLocal += vec3{ 0.0, 0.0, -1.0 };
}
if (mKeyDown[(int) Base::Key::LEFT]) {
forceLocal += vec3{ -1.0, 0.0, 0.0 };
}
if (mKeyDown[(int) Base::Key::BACKWARD]) {
forceLocal += vec3{ 0.0, 0.0, 1.0 };
}
if (mKeyDown[(int) Base::Key::RIGHT]) {
forceLocal += vec3{ 1.0, 0.0, 0.0 };
}
const mat4 orientation = mat4::lookAt(Base::mEye, Base::mTarget, Base::mProps.upVector);
vec3 forceWorld = (orientation * vec4{ forceLocal, 0.0f }).xyz;
if (mKeyDown[(int) Base::Key::UP]) {
forceWorld += vec3{ 0.0, 1.0, 0.0 };
}
if (mKeyDown[(int) Base::Key::DOWN]) {
forceWorld += vec3{ 0.0, -1.0, 0.0 };
}
forceWorld *= mMoveSpeed;
const auto dampingFactor = Base::mProps.flightMoveDamping;
if (dampingFactor == 0.0) {
// Without damping, we simply treat the force as our velocity.
mEyeVelocity = forceWorld;
} else {
// The dampingFactor acts as "friction", which acts upon the camera in the direction
// opposite its velocity.
// Force is also multiplied by the dampingFactor, to "make up" for the friction.
// This ensures that the max velocity still approaches mMoveSpeed;
vec3 velocityDelta = (forceWorld - mEyeVelocity) * dampingFactor;
mEyeVelocity += velocityDelta * deltaTime;
}
const vec3 positionDelta = mEyeVelocity * deltaTime;
Base::mEye += positionDelta;
Base::mTarget += positionDelta;
}
Bookmark getCurrentBookmark() const override {
Bookmark bookmark;
bookmark.flight.position = Base::mEye;
bookmark.flight.pitch = mTargetEuler.x;
bookmark.flight.yaw = mTargetEuler.y;
return bookmark;
}
Bookmark getHomeBookmark() const override {
Bookmark bookmark;
bookmark.flight.position = Base::mProps.flightStartPosition;
bookmark.flight.pitch = Base::mProps.flightStartPitch;
bookmark.flight.yaw = Base::mProps.flightStartYaw;
return bookmark;
}
void jumpToBookmark(const Bookmark& bookmark) override {
Base::mEye = bookmark.flight.position;
updateTarget(bookmark.flight.pitch, bookmark.flight.yaw);
}
private:
vec2 mGrabWin;
vec2 mTargetEuler; // (pitch, yaw)
vec2 mGrabEuler; // (pitch, yaw)
bool mKeyDown[(int) Base::Key::COUNT] = {false};
bool mGrabbing = false;
FLOAT mScrollWheel = 0.0f;
FLOAT mScrollPositionNormalized = 0.0f;
FLOAT mMoveSpeed = 1.0f;
vec3 mEyeVelocity;
};
} // namespace camutils
} // namespace filament
#endif /* CAMUTILS_FREEFLIGHT_MANIPULATOR_H */

View File

@@ -0,0 +1,324 @@
/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <camutils/Manipulator.h>
#include <math/scalar.h>
#include "FreeFlightManipulator.h"
#include "MapManipulator.h"
#include "OrbitManipulator.h"
using namespace filament::math;
namespace filament {
namespace camutils {
template <typename FLOAT> typename
Manipulator<FLOAT>::Builder& Manipulator<FLOAT>::Builder::viewport(int width, int height) {
details.viewport[0] = width;
details.viewport[1] = height;
return *this;
}
template <typename FLOAT> typename
Manipulator<FLOAT>::Builder& Manipulator<FLOAT>::Builder::targetPosition(FLOAT x, FLOAT y, FLOAT z) {
details.targetPosition = {x, y, z};
return *this;
}
template <typename FLOAT> typename
Manipulator<FLOAT>::Builder& Manipulator<FLOAT>::Builder::upVector(FLOAT x, FLOAT y, FLOAT z) {
details.upVector = {x, y, z};
return *this;
}
template <typename FLOAT> typename
Manipulator<FLOAT>::Builder& Manipulator<FLOAT>::Builder::zoomSpeed(FLOAT val) {
details.zoomSpeed = val;
return *this;
}
template <typename FLOAT> typename
Manipulator<FLOAT>::Builder& Manipulator<FLOAT>::Builder::orbitHomePosition(FLOAT x, FLOAT y, FLOAT z) {
details.orbitHomePosition = {x, y, z};
return *this;
}
template <typename FLOAT> typename
Manipulator<FLOAT>::Builder& Manipulator<FLOAT>::Builder::orbitSpeed(FLOAT x, FLOAT y) {
details.orbitSpeed = {x, y};
return *this;
}
template <typename FLOAT> typename
Manipulator<FLOAT>::Builder& Manipulator<FLOAT>::Builder::fovDirection(Fov fov) {
details.fovDirection = fov;
return *this;
}
template <typename FLOAT> typename
Manipulator<FLOAT>::Builder& Manipulator<FLOAT>::Builder::fovDegrees(FLOAT degrees) {
details.fovDegrees = degrees;
return *this;
}
template <typename FLOAT> typename
Manipulator<FLOAT>::Builder& Manipulator<FLOAT>::Builder::farPlane(FLOAT distance) {
details.farPlane = distance;
return *this;
}
template <typename FLOAT> typename
Manipulator<FLOAT>::Builder& Manipulator<FLOAT>::Builder::mapExtent(FLOAT worldWidth, FLOAT worldHeight) {
details.mapExtent = {worldWidth, worldHeight};
return *this;
}
template <typename FLOAT> typename
Manipulator<FLOAT>::Builder& Manipulator<FLOAT>::Builder::mapMinDistance(FLOAT mindist) {
details.mapMinDistance = mindist;
return *this;
}
template <typename FLOAT> typename
Manipulator<FLOAT>::Builder& Manipulator<FLOAT>::Builder::flightStartPosition(FLOAT x, FLOAT y, FLOAT z) {
details.flightStartPosition = {x, y, z};
return *this;
}
template <typename FLOAT> typename
Manipulator<FLOAT>::Builder& Manipulator<FLOAT>::Builder::flightStartOrientation(FLOAT pitch, FLOAT yaw) {
details.flightStartPitch = pitch;
details.flightStartYaw = yaw;
return *this;
}
template <typename FLOAT> typename
Manipulator<FLOAT>::Builder& Manipulator<FLOAT>::Builder::flightMaxMoveSpeed(FLOAT maxSpeed) {
details.flightMaxSpeed = maxSpeed;
return *this;
}
template <typename FLOAT> typename
Manipulator<FLOAT>::Builder& Manipulator<FLOAT>::Builder::flightSpeedSteps(int steps) {
details.flightSpeedSteps = steps;
return *this;
}
template <typename FLOAT> typename
Manipulator<FLOAT>::Builder& Manipulator<FLOAT>::Builder::flightPanSpeed(FLOAT x, FLOAT y) {
details.flightPanSpeed = {x, y};
return *this;
}
template <typename FLOAT> typename
Manipulator<FLOAT>::Builder& Manipulator<FLOAT>::Builder::flightMoveDamping(FLOAT damping) {
details.flightMoveDamping = damping;
return *this;
}
template <typename FLOAT> typename
Manipulator<FLOAT>::Builder& Manipulator<FLOAT>::Builder::groundPlane(FLOAT a, FLOAT b, FLOAT c, FLOAT d) {
details.groundPlane = {a, b, c, d};
return *this;
}
template <typename FLOAT> typename
Manipulator<FLOAT>::Builder& Manipulator<FLOAT>::Builder::raycastCallback(RayCallback cb, void* userdata) {
details.raycastCallback = cb;
details.raycastUserdata = userdata;
return *this;
}
template <typename FLOAT>
Manipulator<FLOAT>* Manipulator<FLOAT>::Builder::build(Mode mode) {
switch (mode) {
case Mode::FREE_FLIGHT:
return new FreeFlightManipulator<FLOAT>(mode, details);
case Mode::MAP:
return new MapManipulator<FLOAT>(mode, details);
case Mode::ORBIT:
return new OrbitManipulator<FLOAT>(mode, details);
}
}
template <typename FLOAT>
Manipulator<FLOAT>::Manipulator(Mode mode, const Config& props) : mMode(mode) {
setProperties(props);
}
template <typename FLOAT>
void Manipulator<FLOAT>::setProperties(const Config& props) {
mProps = props;
if (mProps.zoomSpeed == FLOAT(0)) {
mProps.zoomSpeed = 0.01;
}
if (mProps.upVector == vec3(0)) {
mProps.upVector = vec3(0, 1, 0);
}
if (mProps.fovDegrees == FLOAT(0)) {
mProps.fovDegrees = 33;
}
if (mProps.farPlane == FLOAT(0)) {
mProps.farPlane = 5000;
}
if (mProps.mapExtent == vec2(0)) {
mProps.mapExtent = vec2(512);
}
}
template <typename FLOAT>
void Manipulator<FLOAT>::setViewport(int width, int height) {
Config props = mProps;
props.viewport[0] = width;
props.viewport[1] = height;
setProperties(props);
}
template <typename FLOAT>
void Manipulator<FLOAT>::getLookAt(vec3* eyePosition, vec3* targetPosition, vec3* upward) const {
*targetPosition = mTarget;
*eyePosition = mEye;
const vec3 gaze = normalize(mTarget - mEye);
const vec3 right = cross(gaze, mProps.upVector);
*upward = cross(right, gaze);
}
template<typename FLOAT>
static bool raycastPlane(const filament::math::vec3<FLOAT>& origin,
const filament::math::vec3<FLOAT>& dir, FLOAT* t, void* userdata) {
using vec3 = filament::math::vec3<FLOAT>;
using vec4 = filament::math::vec4<FLOAT>;
auto props = (const typename Manipulator<FLOAT>::Config*) userdata;
const vec4 plane = props->groundPlane;
const vec3 n = vec3(plane[0], plane[1], plane[2]);
const vec3 p0 = n * plane[3];
const FLOAT denom = -dot(n, dir);
if (denom > 1e-6) {
const vec3 p0l0 = p0 - origin;
*t = dot(p0l0, n) / -denom;
return *t >= 0;
}
return false;
}
template <typename FLOAT>
void Manipulator<FLOAT>::getRay(int x, int y, vec3* porigin, vec3* pdir) const {
const vec3 gaze = normalize(mTarget - mEye);
const vec3 right = normalize(cross(gaze, mProps.upVector));
const vec3 upward = cross(right, gaze);
const FLOAT width = mProps.viewport[0];
const FLOAT height = mProps.viewport[1];
const FLOAT fov = mProps.fovDegrees * F_PI / 180.0;
// Remap the grid coordinate into [-1, +1] and shift it to the pixel center.
const FLOAT u = 2.0 * (0.5 + x) / width - 1.0;
const FLOAT v = 2.0 * (0.5 + y) / height - 1.0;
// Compute the tangent of the field-of-view angle as well as the aspect ratio.
const FLOAT tangent = tan(fov / 2.0);
const FLOAT aspect = width / height;
// Adjust the gaze so it goes through the pixel of interest rather than the grid center.
vec3 dir = gaze;
if (mProps.fovDirection == Fov::VERTICAL) {
dir += right * tangent * u * aspect;
dir += upward * tangent * v;
} else {
dir += right * tangent * u;
dir += upward * tangent * v / aspect;
}
dir = normalize(dir);
*porigin = mEye;
*pdir = dir;
}
template <typename FLOAT>
bool Manipulator<FLOAT>::raycast(int x, int y, vec3* result) const {
vec3 origin, dir;
getRay(x, y, &origin, &dir);
// Choose either the user's callback function or the plane intersector.
auto callback = mProps.raycastCallback;
auto fallback = raycastPlane<FLOAT>;
void* userdata = mProps.raycastUserdata;
if (!callback) {
callback = fallback;
userdata = (void*) &mProps;
}
// If the ray misses, then try the fallback function.
FLOAT t;
if (!callback(mEye, dir, &t, userdata)) {
if (callback == fallback || !fallback(mEye, dir, &t, (void*) &mProps)) {
return false;
}
}
*result = mEye + dir * t;
return true;
}
template <typename FLOAT>
filament::math::vec3<FLOAT> Manipulator<FLOAT>::raycastFarPlane(int x, int y) const {
const filament::math::vec3<FLOAT> gaze = normalize(mTarget - mEye);
const vec3 right = cross(gaze, mProps.upVector);
const vec3 upward = cross(right, gaze);
const FLOAT width = mProps.viewport[0];
const FLOAT height = mProps.viewport[1];
const FLOAT fov = mProps.fovDegrees * math::F_PI / 180.0;
// Remap the grid coordinate into [-1, +1] and shift it to the pixel center.
const FLOAT u = 2.0 * (0.5 + x) / width - 1.0;
const FLOAT v = 2.0 * (0.5 + y) / height - 1.0;
// Compute the tangent of the field-of-view angle as well as the aspect ratio.
const FLOAT tangent = tan(fov / 2.0);
const FLOAT aspect = width / height;
// Adjust the gaze so it goes through the pixel of interest rather than the grid center.
vec3 dir = gaze;
if (mProps.fovDirection == Fov::VERTICAL) {
dir += right * tangent * u * aspect;
dir += upward * tangent * v;
} else {
dir += right * tangent * u;
dir += upward * tangent * v / aspect;
}
return mEye + dir * mProps.farPlane;
}
template <typename FLOAT>
void Manipulator<FLOAT>::keyDown(Manipulator<FLOAT>::Key key) { }
template <typename FLOAT>
void Manipulator<FLOAT>::keyUp(Manipulator<FLOAT>::Key key) { }
template <typename FLOAT>
void Manipulator<FLOAT>::update(FLOAT deltaTime) { }
template class Manipulator<float>;
template class Manipulator<double>;
} // namespace camutils
} // namespace filament

View File

@@ -0,0 +1,197 @@
/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef CAMUTILS_MAP_MANIPULATOR_H
#define CAMUTILS_MAP_MANIPULATOR_H
#include <camutils/Manipulator.h>
#include <math/vec3.h>
namespace filament {
namespace camutils {
template<typename FLOAT>
class MapManipulator : public Manipulator<FLOAT> {
public:
using vec2 = math::vec2<FLOAT>;
using vec3 = math::vec3<FLOAT>;
using vec4 = math::vec4<FLOAT>;
using Bookmark = filament::camutils::Bookmark<FLOAT>;
using Base = Manipulator<FLOAT>;
using Config = typename Manipulator<FLOAT>::Config;
MapManipulator(Mode mode, const Config& props) : Manipulator<FLOAT>(mode, props) {
const FLOAT width = Base::mProps.mapExtent.x;
const FLOAT height = Base::mProps.mapExtent.y;
const bool horiz = Base::mProps.fovDirection == Fov::HORIZONTAL;
const vec3 targetToEye = Base::mProps.groundPlane.xyz;
const FLOAT halfExtent = (horiz ? width : height) / 2.0;
const FLOAT fov = Base::mProps.fovDegrees * math::F_PI / 180.0;
const FLOAT distance = halfExtent / tan(fov / 2.0);
Base::mTarget = Base::mProps.targetPosition;
Base::mEye = Base::mTarget + distance * targetToEye;
}
void grabBegin(int x, int y, bool strafe) override {
if (strafe || !Base::raycast(x, y, &mGrabScene)) {
return;
}
mGrabFar = Base::raycastFarPlane(x, y);
mGrabEye = Base::mEye;
mGrabTarget = Base::mTarget;
mGrabbing = true;
}
void grabUpdate(int x, int y) override {
if (mGrabbing) {
const FLOAT ulen = distance(mGrabScene, mGrabEye);
const FLOAT vlen = distance(mGrabFar, mGrabScene);
const vec3 translation = (mGrabFar - Base::raycastFarPlane(x, y)) * ulen / vlen;
const vec3 eyePosition = mGrabEye + translation;
const vec3 targetPosition = mGrabTarget + translation;
moveWithConstraints(eyePosition, targetPosition);
}
}
void grabEnd() override {
mGrabbing = false;
}
void scroll(int x, int y, FLOAT scrolldelta) override {
vec3 grabScene;
if (!Base::raycast(x, y, &grabScene)) {
return;
}
// Find the direction of travel for the dolly. We do not normalize since it
// is desirable to move faster when further away from the targetPosition.
vec3 u = grabScene - Base::mEye;
// Prevent getting stuck when zooming in.
if (scrolldelta < 0) {
const FLOAT distanceToSurface = length(u);
if (distanceToSurface < Base::mProps.zoomSpeed) {
return;
}
}
u *= -scrolldelta * Base::mProps.zoomSpeed;
const vec3 eyePosition = Base::mEye + u;
const vec3 targetPosition = Base::mTarget + u;
moveWithConstraints(eyePosition, targetPosition);
}
Bookmark getCurrentBookmark() const override {
const vec3 dir = normalize(Base::mTarget - Base::mEye);
FLOAT distance;
raycastPlane(Base::mEye, dir, &distance);
const FLOAT fov = Base::mProps.fovDegrees * math::F_PI / 180.0;
const FLOAT halfExtent = distance * tan(fov / 2.0);
vec3 targetPosition = Base::mEye + dir * distance;
const vec3 targetToEye = Base::mProps.groundPlane.xyz;
const vec3 uvec = cross(Base::mProps.upVector, targetToEye);
const vec3 vvec = cross(targetToEye, uvec);
const vec3 centerToTarget = targetPosition - Base::mProps.targetPosition;
Bookmark bookmark;
bookmark.mode = Mode::MAP;
bookmark.map.extent = halfExtent * 2.0;
bookmark.map.center.x = dot(uvec, centerToTarget);
bookmark.map.center.y = dot(vvec, centerToTarget);
bookmark.orbit.theta = 0;
bookmark.orbit.phi = 0;
bookmark.orbit.pivot = Base::mProps.targetPosition +
uvec * bookmark.map.center.x +
vvec * bookmark.map.center.y;
bookmark.orbit.distance = halfExtent / tan(fov / 2.0);
return bookmark;
}
Bookmark getHomeBookmark() const override {
const FLOAT fov = Base::mProps.fovDegrees * math::F_PI / 180.0;
const FLOAT width = Base::mProps.mapExtent.x;
const FLOAT height = Base::mProps.mapExtent.y;
const bool horiz = Base::mProps.fovDirection == Fov::HORIZONTAL;
Bookmark bookmark;
bookmark.mode = Mode::MAP;
bookmark.map.extent = horiz ? width : height;
bookmark.map.center.x = 0;
bookmark.map.center.y = 0;
bookmark.orbit.theta = 0;
bookmark.orbit.phi = 0;
bookmark.orbit.pivot = Base::mTarget;
bookmark.orbit.distance = 0.5 * bookmark.map.extent / tan(fov / 2.0);
// TODO: Add optional boundary constraints here.
return bookmark;
}
void jumpToBookmark(const Bookmark& bookmark) override {
const vec3 targetToEye = Base::mProps.groundPlane.xyz;
const FLOAT halfExtent = bookmark.map.extent / 2.0;
const FLOAT fov = Base::mProps.fovDegrees * math::F_PI / 180.0;
const FLOAT distance = halfExtent / tan(fov / 2.0);
vec3 uvec = cross(Base::mProps.upVector, targetToEye);
vec3 vvec = cross(targetToEye, uvec);
uvec = normalize(uvec) * bookmark.map.center.x;
vvec = normalize(vvec) * bookmark.map.center.y;
Base::mTarget = Base::mProps.targetPosition + uvec + vvec;
Base::mEye = Base::mTarget + distance * targetToEye;
}
private:
bool raycastPlane(const vec3& origin, const vec3& dir, FLOAT* t) const {
const vec4 plane = Base::mProps.groundPlane;
const vec3 n = vec3(plane[0], plane[1], plane[2]);
const vec3 p0 = n * plane[3];
const FLOAT denom = -dot(n, dir);
if (denom > 1e-6) {
const vec3 p0l0 = p0 - origin;
*t = dot(p0l0, n) / -denom;
return *t >= 0;
}
return false;
}
void moveWithConstraints(vec3 eye, vec3 targetPosition) {
Base::mEye = eye;
Base::mTarget = targetPosition;
// TODO: Add optional boundary constraints here.
}
private:
bool mGrabbing = false;
vec3 mGrabScene;
vec3 mGrabFar;
vec3 mGrabEye;
vec3 mGrabTarget;
};
} // namespace camutils
} // namespace filament
#endif /* CAMUTILS_MAP_MANIPULATOR_H */

View File

@@ -0,0 +1,201 @@
/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef CAMUTILS_ORBIT_MANIPULATOR_H
#define CAMUTILS_ORBIT_MANIPULATOR_H
#include <camutils/Manipulator.h>
#include <math/scalar.h>
#define MAX_PHI (F_PI / 2.0 - 0.001)
namespace filament {
namespace camutils {
using namespace filament::math;
template<typename FLOAT>
class OrbitManipulator : public Manipulator<FLOAT> {
public:
using vec2 = filament::math::vec2<FLOAT>;
using vec3 = filament::math::vec3<FLOAT>;
using vec4 = filament::math::vec4<FLOAT>;
using Bookmark = filament::camutils::Bookmark<FLOAT>;
using Base = Manipulator<FLOAT>;
using Config = typename Base::Config;
enum GrabState { INACTIVE, ORBITING, PANNING };
OrbitManipulator(Mode mode, const Config& props) : Base(mode, props) {
setProperties(props);
Base::mEye = Base::mProps.orbitHomePosition;
mPivot = Base::mTarget = Base::mProps.targetPosition;
}
void setProperties(const Config& props) override {
Config resolved = props;
if (resolved.orbitHomePosition == vec3(0)) {
resolved.orbitHomePosition = vec3(0, 0, 1);
}
if (resolved.orbitSpeed == vec2(0)) {
resolved.orbitSpeed = vec2(0.01);
}
// By default, place the ground plane so that it aligns with the targetPosition position.
// This is used only when PANNING.
if (resolved.groundPlane == vec4(0)) {
const FLOAT d = length(resolved.targetPosition);
const vec3 n = normalize(resolved.orbitHomePosition - resolved.targetPosition);
resolved.groundPlane = vec4(n, -d);
}
Base::setProperties(resolved);
}
void grabBegin(int x, int y, bool strafe) override {
mGrabState = strafe ? PANNING : ORBITING;
mGrabPivot = mPivot;
mGrabEye = Base::mEye;
mGrabTarget = Base::mTarget;
mGrabBookmark = getCurrentBookmark();
mGrabWinX = x;
mGrabWinY = y;
mGrabFar = Base::raycastFarPlane(x, y);
Base::raycast(x, y, &mGrabScene);
}
void grabUpdate(int x, int y) override {
const int delx = mGrabWinX - x;
const int dely = mGrabWinY - y;
if (mGrabState == ORBITING) {
Bookmark bookmark = getCurrentBookmark();
const FLOAT theta = delx * Base::mProps.orbitSpeed.x;
const FLOAT phi = dely * Base::mProps.orbitSpeed.y;
const FLOAT maxPhi = MAX_PHI;
bookmark.orbit.phi = clamp(mGrabBookmark.orbit.phi + phi, -maxPhi, +maxPhi);
bookmark.orbit.theta = mGrabBookmark.orbit.theta + theta;
jumpToBookmark(bookmark);
}
if (mGrabState == PANNING) {
const FLOAT ulen = distance(mGrabScene, mGrabEye);
const FLOAT vlen = distance(mGrabFar, mGrabScene);
const vec3 translation = (mGrabFar - Base::raycastFarPlane(x, y)) * ulen / vlen;
mPivot = mGrabPivot + translation;
Base::mEye = mGrabEye + translation;
Base::mTarget = mGrabTarget + translation;
}
}
void grabEnd() override {
mGrabState = INACTIVE;
}
void scroll(int x, int y, FLOAT scrolldelta) override {
const vec3 gaze = normalize(Base::mTarget - Base::mEye);
const vec3 movement = gaze * Base::mProps.zoomSpeed * -scrolldelta;
const vec3 v0 = mPivot - Base::mEye;
Base::mEye += movement;
Base::mTarget += movement;
const vec3 v1 = mPivot - Base::mEye;
// Check if the camera has moved past the point of interest.
if (dot(v0, v1) < 0) {
mFlipped = !mFlipped;
}
}
Bookmark getCurrentBookmark() const override {
Bookmark bookmark;
bookmark.mode = Mode::ORBIT;
const vec3 pivotToEye = Base::mEye - mPivot;
const FLOAT d = length(pivotToEye);
const FLOAT x = pivotToEye.x / d;
const FLOAT y = pivotToEye.y / d;
const FLOAT z = pivotToEye.z / d;
bookmark.orbit.phi = asin(y);
bookmark.orbit.theta = atan2(x, z);
bookmark.orbit.distance = mFlipped ? -d : d;
bookmark.orbit.pivot = mPivot;
const FLOAT fov = Base::mProps.fovDegrees * math::F_PI / 180.0;
const FLOAT halfExtent = d * tan(fov / 2.0);
const vec3 targetToEye = Base::mProps.groundPlane.xyz;
const vec3 uvec = cross(Base::mProps.upVector, targetToEye);
const vec3 vvec = cross(targetToEye, uvec);
const vec3 centerToTarget = mPivot - Base::mProps.targetPosition;
bookmark.map.extent = halfExtent * 2;
bookmark.map.center.x = dot(uvec, centerToTarget);
bookmark.map.center.y = dot(vvec, centerToTarget);
return bookmark;
}
Bookmark getHomeBookmark() const override {
Bookmark bookmark;
bookmark.mode = Mode::ORBIT;
bookmark.orbit.phi = FLOAT(0);
bookmark.orbit.theta = FLOAT(0);
bookmark.orbit.pivot = Base::mProps.targetPosition;
bookmark.orbit.distance = distance(Base::mProps.targetPosition, Base::mProps.orbitHomePosition);
const FLOAT fov = Base::mProps.fovDegrees * math::F_PI / 180.0;
const FLOAT halfExtent = bookmark.orbit.distance * tan(fov / 2.0);
bookmark.map.extent = halfExtent * 2;
bookmark.map.center.x = 0;
bookmark.map.center.y = 0;
return bookmark;
}
void jumpToBookmark(const Bookmark& bookmark) override {
mPivot = bookmark.orbit.pivot;
const FLOAT x = sin(bookmark.orbit.theta) * cos(bookmark.orbit.phi);
const FLOAT y = sin(bookmark.orbit.phi);
const FLOAT z = cos(bookmark.orbit.theta) * cos(bookmark.orbit.phi);
Base::mEye = mPivot + vec3(x, y, z) * abs(bookmark.orbit.distance);
mFlipped = bookmark.orbit.distance < 0;
Base::mTarget = Base::mEye + vec3(x, y, z) * (mFlipped ? 1.0 : -1.0);
}
private:
GrabState mGrabState = INACTIVE;
bool mFlipped = false;
vec3 mGrabPivot;
vec3 mGrabScene;
vec3 mGrabFar;
vec3 mGrabEye;
vec3 mGrabTarget;
Bookmark mGrabBookmark;
int mGrabWinX;
int mGrabWinY;
vec3 mPivot;
};
} // namespace camutils
} // namespace filament
#endif /* CAMUTILS_ORBIT_MANIPULATOR_H */

View File

@@ -1,159 +0,0 @@
// import 'dart:async';
// import 'package:flutter/gestures.dart';
// import 'package:flutter/material.dart';
// import 'filament_controller.dart';
// import 'filament_widget.dart';
// enum GestureType { RotateCamera, PanCamera, PanBackground }
// class AvatarGestureDetector extends StatefulWidget {
// final AvatarInstance controller;
// final bool showControls;
// const AvatarGestureDetector({
// Key? key,
// required this.controller,
// this.showControls = false,
// }) : super(key: key);
// @override
// State<StatefulWidget> createState() => _AvatarGestureDetectorState();
// }
// class _AvatarGestureDetectorState extends State<AvatarGestureDetector> {
// GestureType gestureType = GestureType.PanCamera;
// final _icons = {
// GestureType.PanBackground: Icons.image,
// GestureType.PanCamera: Icons.pan_tool,
// GestureType.RotateCamera: Icons.rotate_90_degrees_ccw
// };
// // to avoid duplicating code for pan/rotate (panStart, panUpdate, panEnd, rotateStart, rotateUpdate etc)
// // we have only a single function for start/update/end.
// // when the gesture type is changed, these properties are updated to point to the correct function.
// late Future Function(double x, double y) _functionStart;
// late Future Function(double x, double y) _functionUpdate;
// late Future Function() _functionEnd;
// double _lastScale = 0;
// @override
// void initState() {
// _setFunction();
// super.initState();
// }
// void _setFunction() {
// switch (gestureType) {
// case GestureType.RotateCamera:
// _functionStart = widget.controller.rotateStart;
// _functionUpdate = widget.controller.rotateUpdate;
// _functionEnd = widget.controller.rotateEnd;
// break;
// case GestureType.PanCamera:
// _functionStart = widget.controller.panStart;
// _functionUpdate = widget.controller.panUpdate;
// _functionEnd = widget.controller.panEnd;
// break;
// // TODO
// case GestureType.PanBackground:
// _functionStart = (x, y) async {};
// _functionUpdate = (x, y) async {};
// _functionEnd = () async {};
// }
// }
// @override
// void didUpdateWidget(AvatarGestureDetector oldWidget) {
// if (widget.showControls != oldWidget.showControls) {
// setState(() {});
// }
// super.didUpdateWidget(oldWidget);
// }
// Timer? _scrollTimer;
// @override
// Widget build(BuildContext context) {
// return Stack(children: [
// Positioned.fill(
// // pinch zoom on mobile
// // couldn't find any equivalent for pointerCount in Listener so we use two widgets:
// // - outer is a GestureDetector only for pinch zoom
// // - inner is a Listener for all other gestures
// child: GestureDetector(
// // onScaleStart: (d) async {
// // if (d.pointerCount == 2) {
// // await widget.controller.zoomEnd();
// // await widget.controller.zoomBegin();
// // }
// // },
// // onScaleEnd: (d) async {
// // if (d.pointerCount == 2) {
// // _lastScale = 0;
// // await widget.controller.zoomEnd();
// // }
// // },
// // onScaleUpdate: (d) async {
// // if (d.pointerCount == 2) {
// // if (_lastScale != 0) {
// // await widget.controller
// // .zoomUpdate(100 * (_lastScale - d.scale));
// // }
// // }
// // _lastScale = d.scale;
// // },
// child: Listener(
// onPointerSignal: (pointerSignal) async {
// // scroll-wheel zoom on desktop
// if (pointerSignal is PointerScrollEvent) {
// _scrollTimer?.cancel();
// await widget.controller.zoomBegin();
// await widget.controller.zoomUpdate(
// pointerSignal.scrollDelta.dy > 0 ? 10 : -10);
// _scrollTimer = Timer(Duration(milliseconds: 100), () {
// widget.controller.zoomEnd();
// _scrollTimer = null;
// });
// } else {
// print(pointerSignal);
// }
// },
// onPointerPanZoomStart: (pzs) {},
// onPointerDown: (d) async {
// await _functionStart(
// d.localPosition.dx, d.localPosition.dy);
// },
// onPointerMove: (d) async {
// await _functionUpdate(
// d.localPosition.dx, d.localPosition.dy);
// },
// onPointerUp: (d) async {
// await _functionEnd();
// },
// child: widget.child))),
// widget.showControls
// ? Align(
// alignment: Alignment.bottomRight,
// child: GestureDetector(
// onTap: () {
// setState(() {
// var curIdx = GestureType.values.indexOf(gestureType);
// var nextIdx = curIdx == GestureType.values.length - 1
// ? 0
// : curIdx + 1;
// gestureType = GestureType.values[nextIdx];
// _setFunction();
// });
// },
// child: Container(
// padding: const EdgeInsets.all(50),
// child: Icon(_icons[gestureType], color: Colors.green)),
// ))
// : Container()
// ]);
// }
// }

View File

@@ -1,11 +1,8 @@
import 'dart:async';
import 'dart:ffi';
import 'dart:io';
import 'dart:ui' as ui;
import 'package:flutter/services.dart';
import 'package:polyvox_filament/animations/bone_animation_data.dart';
import 'package:polyvox_filament/animations/morph_animation_data.dart';
import 'package:polyvox_filament/generated_bindings.dart';
typedef FilamentEntity = int;
const FilamentEntity FILAMENT_ASSET_ERROR = 0;
@@ -18,11 +15,48 @@ abstract class FilamentController {
Stream<int?> get textureId;
Future get isReadyForScene;
///
/// The result(s) of calling [pick] (see below).
/// This may be a broadcast stream, so you should ensure you have subscribed to this stream before calling [pick].
/// If [pick] is called without an active subscription to this stream, the results will be silently discarded.
///
Stream<FilamentEntity?> get pickResult;
///
/// Set to true to continuously render the scene at the framerate specified by [setFrameRate] (60 fps by default).
///
Future setRendering(bool render);
///
/// Render a single frame.
///
Future render();
///
/// Sets the framerate for continuous rendering when [setRendering] is enabled.
///
Future setFrameRate(int framerate);
///
/// Called by FilamentGestureDetector to set the pixel ratio (obtained from [MediaQuery]) before creating the texture/viewport.
/// You may call this yourself if you want to increase/decrease the pixel density of the viewport, but calling this method won't do anything on its own.
/// You will need to manually recreate the texture/viewer afterwards.
///
void setPixelRatio(double ratio);
///
/// Destroys the viewer and all backing textures. You can leave the FilamentWidget in the hierarchy after this is called, but
Future destroy();
///
/// Destroys the viewer only, leaving the texture intact. You probably want to call [destroy] instead of this; [destroyViewer] is exposed mostly for lifecycle changes which are handled by FilamentWidget.
///
Future destroyViewer();
///
/// Destroys the backing texture. You probably want to call [destroy] instead of this; this is exposed mostly for lifecycle changes which are handled by FilamentWidget.
///
Future destroyTexture();
///
@@ -68,24 +102,51 @@ abstract class FilamentController {
double dirY,
double dirZ,
bool castShadows);
Future removeLight(FilamentEntity light);
///
/// Remove all lights (excluding IBL) from the scene.
///
Future clearLights();
Future<FilamentEntity> loadGlb(String path, {bool unlit = false});
Future<FilamentEntity> loadGltf(String path, String relativeResourcePath);
///
/// Called by `FilamentGestureDetector`. You probably don't want to call this yourself.
///
Future panStart(double x, double y);
///
/// Called by `FilamentGestureDetector`. You probably don't want to call this yourself.
///
Future panUpdate(double x, double y);
///
/// Called by `FilamentGestureDetector`. You probably don't want to call this yourself.
///
Future panEnd();
///
/// Called by `FilamentGestureDetector`. You probably don't want to call this yourself.
///
Future rotateStart(double x, double y);
///
/// Called by `FilamentGestureDetector`. You probably don't want to call this yourself.
///
Future rotateUpdate(double x, double y);
///
/// Called by `FilamentGestureDetector`. You probably don't want to call this yourself.
///
Future rotateEnd();
///
/// Set the weights for all morph targets under node [meshName] in [asset] to [weights].
///
Future setMorphTargetWeights(
FilamentEntity asset, String meshName, List<double> weights);
@@ -100,6 +161,7 @@ abstract class FilamentController {
Future<double> getAnimationDuration(FilamentEntity asset, int animationIndex);
///
/// Create/start a dynamic morph target animation for [asset].
/// Animates morph target weights/bone transforms (where each frame requires a duration of [frameLengthInMs].
/// [morphWeights] is a list of doubles in frame-major format.
/// Each frame is [numWeights] in length, and each entry is the weight to be applied to the morph target located at that index in the mesh primitive at that frame.
@@ -114,11 +176,37 @@ abstract class FilamentController {
/// for now we only allow animating a single bone (though multiple skinned targets are supported)
///
Future setBoneAnimation(FilamentEntity asset, BoneAnimationData animation);
///
/// Removes/destroys the specified entity from the scene.
/// [asset] will no longer be a valid handle after this method is called; ensure you immediately discard all references once this method is complete.
///
Future removeAsset(FilamentEntity asset);
///
/// Removes/destroys all renderable entities from the scene (including cameras).
/// All [FilamentEntity] handles will no longer be valid after this method is called; ensure you immediately discard all references to all entities once this method is complete.
///
Future clearAssets();
///
/// Called by `FilamentGestureDetector`. You probably don't want to call this yourself.
///
Future zoomBegin();
Future zoomUpdate(double z);
///
/// Called by `FilamentGestureDetector`. You probably don't want to call this yourself.
///
Future zoomUpdate(double x, double y, double z);
///
/// Called by `FilamentGestureDetector`. You probably don't want to call this yourself.
///
Future zoomEnd();
///
/// Schedules the glTF animation at [index] in [asset] to start playing on the next frame.
///
Future playAnimation(FilamentEntity asset, int index,
{bool loop = false,
bool reverse = false,
@@ -126,13 +214,33 @@ abstract class FilamentController {
double crossfade = 0.0});
Future setAnimationFrame(FilamentEntity asset, int index, int animationFrame);
Future stopAnimation(FilamentEntity asset, int animationIndex);
///
/// Sets the current scene camera to the glTF camera under [name] in [asset].
///
Future setCamera(FilamentEntity asset, String? name);
///
/// Sets the tone mapping (requires postprocessing).
///
Future setToneMapping(ToneMapper mapper);
///
/// Sets the strength of the bloom.
///
Future setBloom(double bloom);
Future setCameraFocalLength(double focalLength);
Future setCameraFocusDistance(double focusDistance);
Future setCameraPosition(double x, double y, double z);
///
/// Repositions the camera to the last vertex of the bounding box of [asset], looking at the penultimate vertex.
///
Future moveCameraToAsset(FilamentEntity asset);
///
/// Enables/disables frustum culling. Currently we don't expose a method for manipulating the camera projection/culling matrices so this is your only option to deal with unwanted near/far clipping.
///
Future setViewFrustumCulling(bool enabled);
Future setCameraExposure(
double aperture, double shutterSpeed, double sensitivity);
@@ -141,11 +249,32 @@ abstract class FilamentController {
Future setMaterialColor(
FilamentEntity asset, String meshName, int materialIndex, Color color);
///
/// Scales [asset] up/down so it fits within a unit cube.
///
Future transformToUnitCube(FilamentEntity asset);
///
/// Sets the world space position for [asset] to the given coordinates.
///
Future setPosition(FilamentEntity asset, double x, double y, double z);
///
/// Enable/disable postprocessing.
///
Future setPostProcessing(bool enabled);
Future setScale(FilamentEntity asset, double scale);
Future setRotation(
FilamentEntity asset, double rads, double x, double y, double z);
Future hide(FilamentEntity asset, String meshName);
Future reveal(FilamentEntity asset, String meshName);
///
/// Used to select the entity in the scene at the given viewport coordinates.
/// Called by `FilamentGestureDetector` on a mouse/finger down event. You probably don't want to call this yourself.
/// This is asynchronous and will require 2-3 frames to complete - subscribe to the [pickResult] stream to receive the results of this method.
/// [x] and [y] must be in local logical coordinates (i.e. where 0,0 is at top-left of the FilamentWidget).
///
void pick(int x, int y);
}

View File

@@ -30,11 +30,16 @@ class FilamentControllerFFI extends FilamentController {
bool _resizing = false;
final String? uberArchivePath;
Stream<FilamentEntity> get pickResult => _pickResultController.stream;
final _pickResultController = StreamController<FilamentEntity>.broadcast();
///
/// This controller uses platform channels to bridge Dart with the C/C++ code for the Filament API.
/// Setting up the context/texture (since this is platform-specific) and the render ticker are platform-specific; all other methods are passed through by the platform channel to the methods specified in PolyvoxFilamentApi.h.
///
FilamentControllerFFI() {
FilamentControllerFFI({this.uberArchivePath}) {
_channel.setMethodCallHandler((call) async {
throw Exception("Unknown method channel invocation ${call.method}");
});
@@ -71,6 +76,13 @@ class FilamentControllerFFI extends FilamentController {
@override
void setPixelRatio(double ratio) {
_pixelRatio = ratio;
print("Set pixel ratio to $ratio");
}
@override
Future destroy() async {
await destroyViewer();
await destroyTexture();
}
@override
@@ -78,9 +90,12 @@ class FilamentControllerFFI extends FilamentController {
if (_viewer == null || _resizing) {
throw Exception("No viewer available, ignoring");
}
var viewer = _viewer;
_viewer = null;
_assetManager = null;
_lib.destroy_filament_viewer_ffi(_viewer!);
_lib.destroy_filament_viewer_ffi(viewer!);
_isReadyForScene = Completer();
}
@@ -92,7 +107,7 @@ class FilamentControllerFFI extends FilamentController {
}
///
/// Called by `FilamentWidget`. You do not need to call this yourself.
/// Called by `FilamentWidget`. You do not need to call this yourself.
///
Future createViewer(int width, int height) async {
if (_viewer != null) {
@@ -103,8 +118,18 @@ class FilamentControllerFFI extends FilamentController {
throw Exception(
"Do not call createViewer when a viewer has already been created without calling destroyViewer");
}
var loader = Pointer<ResourceLoaderWrapper>.fromAddress(
await _channel.invokeMethod("getResourceLoaderWrapper"));
if (loader == nullptr) {
throw Exception("Failed to get resource loader");
}
print("Using loader ${loader.address}");
size = ui.Size(width * _pixelRatio, height * _pixelRatio);
print("Creating viewer with size $size");
var textures =
await _channel.invokeMethod("createTexture", [size.width, size.height]);
var flutterTextureId = textures[0];
@@ -131,12 +156,12 @@ class FilamentControllerFFI extends FilamentController {
var sharedContext = await _channel.invokeMethod("getSharedContext");
print("Got shared context : $sharedContext");
var loader = await _channel.invokeMethod("getResourceLoaderWrapper");
_viewer = _lib.create_filament_viewer_ffi(
Pointer<Void>.fromAddress(sharedContext ?? 0),
driver,
Pointer<ResourceLoaderWrapper>.fromAddress(loader),
uberArchivePath?.toNativeUtf8().cast<Char>() ?? nullptr,
loader,
renderCallback,
renderCallbackOwner);
@@ -145,14 +170,19 @@ class FilamentControllerFFI extends FilamentController {
}
_lib.create_swap_chain_ffi(
_viewer!, Pointer<Void>.fromAddress(surfaceAddress), width, height);
_viewer!,
Pointer<Void>.fromAddress(surfaceAddress),
size.width.toInt(),
size.height.toInt());
if (nativeTexture != 0) {
assert(surfaceAddress == 0);
_lib.create_render_target(_viewer!, nativeTexture, width, height);
print("Creating render target from native texture $nativeTexture");
_lib.create_render_target_ffi(
_viewer!, nativeTexture, size.width.toInt(), size.height.toInt());
}
_lib.update_viewport_and_camera_projection_ffi(
_viewer!, width, height, 1.0);
_viewer!, size.width.toInt(), size.height.toInt(), 1.0);
_assetManager = _lib.get_asset_manager(_viewer!);
@@ -161,15 +191,45 @@ class FilamentControllerFFI extends FilamentController {
_isReadyForScene.complete(true);
}
///
/// I'm not exactly sure how to resize the backing textures on all platforms.
/// So for now, I'm sticking with the safe option when the widget is resized: destroying the swapchain, recreating the textures, and creating a new swapchain.
///
@override
Future resize(int width, int height, {double scaleFactor = 1.0}) async {
_resizing = true;
setRendering(false);
_textureId = await _channel.invokeMethod(
"resize", [width * _pixelRatio, height * _pixelRatio, scaleFactor]);
_textureIdController.add(_textureId);
_lib.destroy_swap_chain(_viewer!);
await destroyTexture();
size = ui.Size(width * _pixelRatio, height * _pixelRatio);
var textures =
await _channel.invokeMethod("createTexture", [size.width, size.height]);
var flutterTextureId = textures[0];
_textureId = flutterTextureId;
// void* on iOS (pointer to pixel buffer), void* on Android (pointer to native window), null on Windows/macOS
var surfaceAddress = textures[1] as int? ?? 0;
// null on iOS/Android, void* on MacOS (pointer to metal texture), GLuid on Windows/Linux
var nativeTexture = textures[2] as int? ?? 0;
_lib.create_swap_chain_ffi(
_viewer!,
Pointer<Void>.fromAddress(surfaceAddress),
size.width.toInt(),
size.height.toInt());
if (nativeTexture != 0) {
assert(surfaceAddress == 0);
print("Creating render target from native texture $nativeTexture");
_lib.create_render_target_ffi(
_viewer!, nativeTexture, size.width.toInt(), size.height.toInt());
}
_lib.update_viewport_and_camera_projection_ffi(
_viewer!, width, height, scaleFactor);
_viewer!, size.width.toInt(), size.height.toInt(), 1.0);
_textureIdController.add(_textureId);
_resizing = false;
setRendering(true);
}
@@ -181,7 +241,7 @@ class FilamentControllerFFI extends FilamentController {
}
_lib.clear_background_image_ffi(_viewer!);
}
@override
Future setBackgroundImage(String path, {bool fillHeight = false}) async {
if (_viewer == null || _resizing) {
@@ -299,11 +359,11 @@ class FilamentControllerFFI extends FilamentController {
}
@override
Future<FilamentEntity> loadGltf(
String path, String relativeResourcePath, { bool force=false}) async {
if(Platform.isWindows && !force) {
throw Exception("loadGltf has a race condition on Windows which is likely to crash your program. If you really want to try, pass force=true to loadGltf");
Future<FilamentEntity> loadGltf(String path, String relativeResourcePath,
{bool force = false}) async {
if (Platform.isWindows && !force) {
throw Exception(
"loadGltf has a race condition on Windows which is likely to crash your program. If you really want to try, pass force=true to loadGltf");
}
if (_viewer == null || _resizing) {
throw Exception("No viewer available, ignoring");
@@ -318,9 +378,6 @@ class FilamentControllerFFI extends FilamentController {
return asset;
}
///
/// Called by `FilamentGestureDetector`. You probably don't want to call this yourself.
///
@override
Future panStart(double x, double y) async {
if (_viewer == null || _resizing) {
@@ -329,9 +386,6 @@ class FilamentControllerFFI extends FilamentController {
_lib.grab_begin(_viewer!, x * _pixelRatio, y * _pixelRatio, true);
}
///
/// Called by `FilamentGestureDetector`. You probably don't want to call this yourself.
///
@override
Future panUpdate(double x, double y) async {
if (_viewer == null || _resizing) {
@@ -340,9 +394,6 @@ class FilamentControllerFFI extends FilamentController {
_lib.grab_update(_viewer!, x * _pixelRatio, y * _pixelRatio);
}
///
/// Called by `FilamentGestureDetector`. You probably don't want to call this yourself.
///
@override
Future panEnd() async {
if (_viewer == null || _resizing) {
@@ -351,9 +402,6 @@ class FilamentControllerFFI extends FilamentController {
_lib.grab_end(_viewer!);
}
///
/// Called by `FilamentGestureDetector`. You probably don't want to call this yourself.
///
@override
Future rotateStart(double x, double y) async {
if (_viewer == null || _resizing) {
@@ -362,9 +410,6 @@ class FilamentControllerFFI extends FilamentController {
_lib.grab_begin(_viewer!, x * _pixelRatio, y * _pixelRatio, false);
}
///
/// Called by `FilamentGestureDetector`. You probably don't want to call this yourself.
///
@override
Future rotateUpdate(double x, double y) async {
if (_viewer == null || _resizing) {
@@ -373,9 +418,6 @@ class FilamentControllerFFI extends FilamentController {
_lib.grab_update(_viewer!, x * _pixelRatio, y * _pixelRatio);
}
///
/// Called by `FilamentGestureDetector`. You probably don't want to call this yourself.
///
@override
Future rotateEnd() async {
if (_viewer == null || _resizing) {
@@ -384,9 +426,6 @@ class FilamentControllerFFI extends FilamentController {
_lib.grab_end(_viewer!);
}
///
/// Set the weights for all morph targets under node [meshName] in [asset] to [weights].
///
@override
Future setMorphTargetWeights(
FilamentEntity asset, String meshName, List<double> weights) async {
@@ -438,9 +477,6 @@ class FilamentControllerFFI extends FilamentController {
return names;
}
///
/// Returns the length (in seconds) of the animation at the given index.
///
@override
Future<double> getAnimationDuration(
FilamentEntity asset, int animationIndex) async {
@@ -448,14 +484,11 @@ class FilamentControllerFFI extends FilamentController {
throw Exception("No viewer available, ignoring");
}
var duration =
_lib.get_animation_duration_ffi(_assetManager!, asset, animationIndex);
_lib.get_animation_duration(_assetManager!, asset, animationIndex);
return duration;
}
///
/// Create/start a dynamic morph target animation for [asset].
///
@override
Future setMorphAnimationData(
FilamentEntity asset, MorphAnimationData animation) async {
@@ -486,12 +519,6 @@ class FilamentControllerFFI extends FilamentController {
calloc.free(idxPtr);
}
///
/// Animates morph target weights/bone transforms (where each frame requires a duration of [frameLengthInMs].
/// [morphWeights] is a list of doubles in frame-major format.
/// Each frame is [numWeights] in length, and each entry is the weight to be applied to the morph target located at that index in the mesh primitive at that frame.
/// for now we only allow animating a single bone (though multiple skinned targets are supported)
///
@override
Future setBoneAnimation(
FilamentEntity asset, BoneAnimationData animation) async {
@@ -530,10 +557,6 @@ class FilamentControllerFFI extends FilamentController {
// calloc.free(data);
}
///
/// Removes/destroys the specified entity from the scene.
/// [asset] will no longer be a valid handle after this method is called; ensure you immediately discard all references once this method is complete.
///
@override
Future removeAsset(FilamentEntity asset) async {
if (_viewer == null || _resizing) {
@@ -542,10 +565,6 @@ class FilamentControllerFFI extends FilamentController {
_lib.remove_asset_ffi(_viewer!, asset);
}
///
/// Removes/destroys all renderable entities from the scene (including cameras).
/// All [FilamentEntity] handles will no longer be valid after this method is called; ensure you immediately discard all references to all entities once this method is complete.
///
@override
Future clearAssets() async {
if (_viewer == null || _resizing) {
@@ -554,9 +573,6 @@ class FilamentControllerFFI extends FilamentController {
_lib.clear_assets_ffi(_viewer!);
}
///
/// Called by `FilamentGestureDetector`. You probably don't want to call this yourself.
///
@override
Future zoomBegin() async {
if (_viewer == null || _resizing) {
@@ -565,20 +581,14 @@ class FilamentControllerFFI extends FilamentController {
_lib.scroll_begin(_viewer!);
}
///
/// Called by `FilamentGestureDetector`. You probably don't want to call this yourself.
///
@override
Future zoomUpdate(double z) async {
Future zoomUpdate(double x, double y, double z) async {
if (_viewer == null || _resizing) {
throw Exception("No viewer available, ignoring");
}
_lib.scroll_update(_viewer!, 0.0, 0.0, z);
_lib.scroll_update(_viewer!, x, y, z);
}
///
/// Called by `FilamentGestureDetector`. You probably don't want to call this yourself.
///
@override
Future zoomEnd() async {
if (_viewer == null || _resizing) {
@@ -587,9 +597,6 @@ class FilamentControllerFFI extends FilamentController {
_lib.scroll_end(_viewer!);
}
///
/// Schedules the glTF animation at [index] in [asset] to start playing on the next frame.
///
@override
Future playAnimation(FilamentEntity asset, int index,
{bool loop = false,
@@ -618,9 +625,6 @@ class FilamentControllerFFI extends FilamentController {
_lib.stop_animation(_assetManager!, asset, animationIndex);
}
///
/// Sets the current scene camera to the glTF camera under [name] in [asset].
///
@override
Future setCamera(FilamentEntity asset, String? name) async {
if (_viewer == null || _resizing) {
@@ -628,14 +632,11 @@ class FilamentControllerFFI extends FilamentController {
}
var result = _lib.set_camera(
_viewer!, asset, name?.toNativeUtf8()?.cast<Char>() ?? nullptr);
if (result != 1) {
if (!result) {
throw Exception("Failed to set camera");
}
}
///
/// Sets the tone mapping.
///
@override
Future setToneMapping(ToneMapper mapper) async {
if (_viewer == null || _resizing) {
@@ -645,9 +646,15 @@ class FilamentControllerFFI extends FilamentController {
_lib.set_tone_mapping_ffi(_viewer!, mapper.index);
}
///
/// Sets the strength of the bloom.
///
@override
Future setPostProcessing(bool enabled) async {
if (_viewer == null || _resizing) {
throw Exception("No viewer available, ignoring");
}
_lib.set_post_processing_ffi(_viewer!, enabled);
}
@override
Future setBloom(double bloom) async {
if (_viewer == null || _resizing) {
@@ -684,9 +691,6 @@ class FilamentControllerFFI extends FilamentController {
_lib.move_camera_to_asset(_viewer!, asset);
}
///
/// Enables/disables frustum culling. Currently we don't expose a method for manipulating the camera projection/culling matrices so this is your only option to deal with unwanted near/far clipping.
///
@override
Future setViewFrustumCulling(bool enabled) async {
if (_viewer == null || _resizing) {
@@ -790,4 +794,31 @@ class FilamentControllerFFI extends FilamentController {
throw Exception("Failed to reveal mesh $meshName");
}
}
String? getNameForEntity(FilamentEntity entity) {
final result = _lib.get_name_for_entity(_assetManager!, entity);
if (result == nullptr) {
return null;
}
return result.cast<Utf8>().toDartString();
}
void pick(int x, int y) async {
if (_viewer == null || _resizing) {
throw Exception("No viewer available, ignoring");
}
final outPtr = calloc<EntityId>(1);
outPtr.value = 0;
print("height ${size.height.toInt()} y $y");
_lib.pick_ffi(_viewer!, x, size.height.toInt() - y, outPtr);
while (outPtr.value == 0) {
await Future.delayed(Duration(milliseconds: 100));
print("Waiting");
}
var entityId = outPtr.value;
_pickResultController.add(entityId);
calloc.free(outPtr);
}
}

View File

@@ -9,6 +9,10 @@ import 'filament_controller.dart';
typedef AssetManager = int;
///
/// This is a previous iteration of FilamentController that used platform channels for every distinct platform.
/// This is no longer used; currently kept only for reference/posterity.
///
class FilamentControllerMethodChannel extends FilamentController {
late MethodChannel _channel = MethodChannel("app.polyvox.filament/event");
@@ -36,6 +40,10 @@ class FilamentControllerMethodChannel extends FilamentController {
});
}
Future setPostProcessing(bool enabled) async {
throw Exception();
}
Future setRendering(bool render) async {
if (_viewer == null || _resizing) {
throw Exception("No viewer available, ignoring");
@@ -426,11 +434,11 @@ class FilamentControllerMethodChannel extends FilamentController {
await _channel.invokeMethod("scrollBegin");
}
Future zoomUpdate(double z) async {
Future zoomUpdate(double x, double y, double z) async {
if (_viewer == null || _resizing) {
throw Exception("No viewer available, ignoring");
}
await _channel.invokeMethod("scrollUpdate", [0.0, 0.0, z]);
await _channel.invokeMethod("scrollUpdate", [x, y, z]);
}
Future zoomEnd() async {
@@ -636,4 +644,19 @@ class FilamentControllerMethodChannel extends FilamentController {
throw Exception("Failed to reveal mesh $meshName");
}
}
@override
Future destroy() {
// TODO: implement destroy
throw UnimplementedError();
}
@override
void pick(int x, int y) {
// TODO: implement pick
}
@override
// TODO: implement pickResult
Stream<FilamentEntity?> get pickResult => throw UnimplementedError();
}

View File

@@ -1,244 +0,0 @@
import 'dart:async';
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'filament_controller.dart';
enum GestureType { RotateCamera, PanCamera, PanBackground }
class FilamentGestureDetector extends StatefulWidget {
final Widget? child;
final FilamentController controller;
final bool showControlOverlay;
final bool enableControls;
final double zoomDelta;
const FilamentGestureDetector(
{Key? key,
required this.controller,
this.child,
this.showControlOverlay = false,
this.enableControls = true,
this.zoomDelta = 1})
: super(key: key);
@override
State<StatefulWidget> createState() => _FilamentGestureDetectorState();
}
class _FilamentGestureDetectorState extends State<FilamentGestureDetector> {
GestureType gestureType = GestureType.PanCamera;
final _icons = {
GestureType.PanBackground: Icons.image,
GestureType.PanCamera: Icons.pan_tool,
GestureType.RotateCamera: Icons.rotate_90_degrees_ccw
};
bool _rotating = false;
// to avoid duplicating code for pan/rotate (panStart, panUpdate, panEnd, rotateStart, rotateUpdate etc)
// we have only a single function for start/update/end.
// when the gesture type is changed, these properties are updated to point to the correct function.
late Function(double x, double y) _functionStart;
late Function(double x, double y) _functionUpdate;
late Function() _functionEnd;
@override
void initState() {
_setFunction();
super.initState();
}
void _setFunction() {
switch (gestureType) {
case GestureType.RotateCamera:
_functionStart = widget.controller.rotateStart;
_functionUpdate = widget.controller.rotateUpdate;
_functionEnd = widget.controller.rotateEnd;
break;
case GestureType.PanCamera:
_functionStart = widget.controller.panStart;
_functionUpdate = widget.controller.panUpdate;
_functionEnd = widget.controller.panEnd;
break;
// TODO
case GestureType.PanBackground:
_functionStart = (x, y) async {};
_functionUpdate = (x, y) async {};
_functionEnd = () async {};
}
}
@override
void didUpdateWidget(FilamentGestureDetector oldWidget) {
if (widget.showControlOverlay != oldWidget.showControlOverlay ||
widget.enableControls != oldWidget.enableControls) {
setState(() {});
}
super.didUpdateWidget(oldWidget);
}
Timer? _scrollTimer;
Widget _desktop() {
return Listener(
onPointerSignal: !widget.enableControls
? null
: (pointerSignal) async {
// scroll-wheel zoom on desktop
if (pointerSignal is PointerScrollEvent) {
_scrollTimer?.cancel();
widget.controller.zoomBegin();
widget.controller.zoomUpdate(pointerSignal.scrollDelta.dy > 0
? widget.zoomDelta
: -widget.zoomDelta);
_scrollTimer = Timer(Duration(milliseconds: 100), () {
widget.controller.zoomEnd();
_scrollTimer = null;
});
}
},
onPointerPanZoomStart: !widget.enableControls ? null : (pzs) {},
onPointerDown: !widget.enableControls
? null
: (d) async {
if (d.buttons == kTertiaryButton || _rotating) {
widget.controller.rotateStart(
d.position.dx * 2.0,
d.position.dy *
2.0); // multiply by 2.0 to account for pixel density, TODO don't hardcode
} else {
widget.controller
.panStart(d.localPosition.dx, d.localPosition.dy);
}
},
onPointerMove: !widget.enableControls
? null
: (PointerMoveEvent d) async {
if (d.buttons == kTertiaryButton || _rotating) {
widget.controller
.rotateUpdate(d.position.dx * 2.0, d.position.dy * 2.0);
} else {
widget.controller
.panUpdate(d.localPosition.dx, d.localPosition.dy);
}
},
onPointerUp: !widget.enableControls
? null
: (d) async {
if (d.buttons == kTertiaryButton || _rotating) {
widget.controller.rotateEnd();
} else {
widget.controller.panEnd();
}
},
child: widget.child);
}
bool _scaling = false;
double _lastScale = 0;
DateTime _lastUpdate = DateTime.now();
Widget _mobile() {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onDoubleTap: () {
_rotating = !_rotating;
},
onScaleStart: !widget.enableControls
? null
: (d) async {
if (d.pointerCount == 2) {
_lastScale = 0;
_scaling = true;
widget.controller.zoomBegin();
} else if (!_scaling) {
if (_rotating) {
widget.controller
.rotateStart(d.focalPoint.dx, d.focalPoint.dy);
} else {
widget.controller
.panStart(d.focalPoint.dx, d.focalPoint.dy);
}
}
},
onScaleEnd: !widget.enableControls
? null
: (d) async {
if (d.pointerCount == 2) {
widget.controller.zoomEnd();
_lastScale = 0;
_scaling = false;
} else if (!_scaling) {
if (_rotating) {
widget.controller.rotateEnd();
} else {
widget.controller.panEnd();
}
}
},
onScaleUpdate: !widget.enableControls
? null
: (ScaleUpdateDetails d) async {
if (d.pointerCount == 2) {
// var scale = d.horizontalScale - _lastScale;
// print(scale);
widget.controller
.zoomUpdate(d.horizontalScale > 1 ? 0.1 : -0.1);
_lastScale = d.horizontalScale;
} else if (!_scaling) {
if (_rotating) {
widget.controller
.rotateUpdate(d.focalPoint.dx, d.focalPoint.dy);
} else {
widget.controller
.panUpdate(d.focalPoint.dx, d.focalPoint.dy);
}
}
},
child: widget.child);
}
@override
Widget build(BuildContext context) {
late Widget controls;
if (kIsWeb) {
controls = Container();
} else if (Platform.isLinux || Platform.isWindows || Platform.isMacOS) {
controls = _desktop();
} else {
controls = _mobile();
}
return Stack(children: [
Positioned.fill(
// pinch zoom on mobile
// couldn't find any equivalent for pointerCount in Listener so we use two widgets:
// - outer is a GestureDetector only for pinch zoom
// - inner is a Listener for all other gestures (including scroll zoom on desktop)
child: controls),
widget.showControlOverlay
? Align(
alignment: Alignment.bottomRight,
child: GestureDetector(
onTap: () {
setState(() {
var curIdx = GestureType.values.indexOf(gestureType);
var nextIdx = curIdx == GestureType.values.length - 1
? 0
: curIdx + 1;
gestureType = GestureType.values[nextIdx];
_setFunction();
});
},
child: Container(
padding: const EdgeInsets.all(50),
child: Icon(_icons[gestureType], color: Colors.green)),
))
: Container()
]);
}
}

View File

@@ -23,11 +23,13 @@ class NativeLibrary {
ffi.Pointer<ffi.Void> context,
ffi.Pointer<ResourceLoaderWrapper> loader,
ffi.Pointer<ffi.Void> platform,
ffi.Pointer<ffi.Char> uberArchivePath,
) {
return _create_filament_viewer(
context,
loader,
platform,
uberArchivePath,
);
}
@@ -36,10 +38,14 @@ class NativeLibrary {
ffi.Pointer<ffi.Void> Function(
ffi.Pointer<ffi.Void>,
ffi.Pointer<ResourceLoaderWrapper>,
ffi.Pointer<ffi.Void>)>>('create_filament_viewer');
ffi.Pointer<ffi.Void>,
ffi.Pointer<ffi.Char>)>>('create_filament_viewer');
late final _create_filament_viewer = _create_filament_viewerPtr.asFunction<
ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
ffi.Pointer<ResourceLoaderWrapper>, ffi.Pointer<ffi.Void>)>();
ffi.Pointer<ffi.Void> Function(
ffi.Pointer<ffi.Void>,
ffi.Pointer<ResourceLoaderWrapper>,
ffi.Pointer<ffi.Void>,
ffi.Pointer<ffi.Char>)>();
void destroy_filament_viewer(
ffi.Pointer<ffi.Void> viewer,
@@ -108,8 +114,8 @@ class NativeLibrary {
late final _create_render_targetPtr = _lookup<
ffi.NativeFunction<
ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int, ffi.Int,
ffi.Int)>>('create_render_target');
ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.IntPtr, ffi.Uint32,
ffi.Uint32)>>('create_render_target');
late final _create_render_target = _create_render_targetPtr
.asFunction<void Function(ffi.Pointer<ffi.Void>, int, int, int)>();
@@ -320,7 +326,7 @@ class NativeLibrary {
ffi.NativeFunction<
EntityId Function(
ffi.Pointer<ffi.Void>,
ffi.Int,
ffi.Uint8,
ffi.Float,
ffi.Float,
ffi.Float,
@@ -464,7 +470,7 @@ class NativeLibrary {
ffi.NativeFunction<
ffi.Void Function(
ffi.Pointer<ffi.Void>,
ffi.Int,
ffi.Uint64,
ffi.Pointer<ffi.Void>,
ffi.Pointer<
ffi.NativeFunction<
@@ -499,7 +505,7 @@ class NativeLibrary {
late final _create_swap_chainPtr = _lookup<
ffi.NativeFunction<
ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
ffi.Int, ffi.Int)>>('create_swap_chain');
ffi.Uint32, ffi.Uint32)>>('create_swap_chain');
late final _create_swap_chain = _create_swap_chainPtr.asFunction<
void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, int, int)>();
@@ -550,7 +556,7 @@ class NativeLibrary {
late final _update_viewport_and_camera_projectionPtr = _lookup<
ffi.NativeFunction<
ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int, ffi.Int,
ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Uint32, ffi.Uint32,
ffi.Float)>>('update_viewport_and_camera_projection');
late final _update_viewport_and_camera_projection =
_update_viewport_and_camera_projectionPtr
@@ -1298,6 +1304,61 @@ class NativeLibrary {
late final _reveal_mesh = _reveal_meshPtr.asFunction<
int Function(ffi.Pointer<ffi.Void>, int, ffi.Pointer<ffi.Char>)>();
void set_post_processing(
ffi.Pointer<ffi.Void> viewer,
bool enabled,
) {
return _set_post_processing(
viewer,
enabled,
);
}
late final _set_post_processingPtr = _lookup<
ffi
.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Bool)>>(
'set_post_processing');
late final _set_post_processing = _set_post_processingPtr
.asFunction<void Function(ffi.Pointer<ffi.Void>, bool)>();
void pick(
ffi.Pointer<ffi.Void> viewer,
int x,
int y,
ffi.Pointer<EntityId> entityId,
) {
return _pick(
viewer,
x,
y,
entityId,
);
}
late final _pickPtr = _lookup<
ffi.NativeFunction<
ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int, ffi.Int,
ffi.Pointer<EntityId>)>>('pick');
late final _pick = _pickPtr.asFunction<
void Function(ffi.Pointer<ffi.Void>, int, int, ffi.Pointer<EntityId>)>();
ffi.Pointer<ffi.Char> get_name_for_entity(
ffi.Pointer<ffi.Void> assetManager,
int entityId,
) {
return _get_name_for_entity(
assetManager,
entityId,
);
}
late final _get_name_for_entityPtr = _lookup<
ffi.NativeFunction<
ffi.Pointer<ffi.Char> Function(
ffi.Pointer<ffi.Void>, EntityId)>>('get_name_for_entity');
late final _get_name_for_entity = _get_name_for_entityPtr
.asFunction<ffi.Pointer<ffi.Char> Function(ffi.Pointer<ffi.Void>, int)>();
void ios_dummy() {
return _ios_dummy();
}
@@ -1309,6 +1370,7 @@ class NativeLibrary {
ffi.Pointer<ffi.Void> create_filament_viewer_ffi(
ffi.Pointer<ffi.Void> context,
ffi.Pointer<ffi.Void> platform,
ffi.Pointer<ffi.Char> uberArchivePath,
ffi.Pointer<ResourceLoaderWrapper> loader,
ffi.Pointer<
ffi.NativeFunction<
@@ -1319,6 +1381,7 @@ class NativeLibrary {
return _create_filament_viewer_ffi(
context,
platform,
uberArchivePath,
loader,
renderCallback,
renderCallbackOwner,
@@ -1330,6 +1393,7 @@ class NativeLibrary {
ffi.Pointer<ffi.Void> Function(
ffi.Pointer<ffi.Void>,
ffi.Pointer<ffi.Void>,
ffi.Pointer<ffi.Char>,
ffi.Pointer<ResourceLoaderWrapper>,
ffi.Pointer<
ffi.NativeFunction<
@@ -1341,6 +1405,7 @@ class NativeLibrary {
ffi.Pointer<ffi.Void> Function(
ffi.Pointer<ffi.Void>,
ffi.Pointer<ffi.Void>,
ffi.Pointer<ffi.Char>,
ffi.Pointer<ResourceLoaderWrapper>,
ffi.Pointer<
ffi.NativeFunction<
@@ -1365,7 +1430,7 @@ class NativeLibrary {
late final _create_swap_chain_ffiPtr = _lookup<
ffi.NativeFunction<
ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
ffi.Int, ffi.Int)>>('create_swap_chain_ffi');
ffi.Uint32, ffi.Uint32)>>('create_swap_chain_ffi');
late final _create_swap_chain_ffi = _create_swap_chain_ffiPtr.asFunction<
void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, int, int)>();
@@ -1385,8 +1450,8 @@ class NativeLibrary {
late final _create_render_target_ffiPtr = _lookup<
ffi.NativeFunction<
ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int, ffi.Int,
ffi.Int)>>('create_render_target_ffi');
ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.IntPtr, ffi.Uint32,
ffi.Uint32)>>('create_render_target_ffi');
late final _create_render_target_ffi = _create_render_target_ffiPtr
.asFunction<void Function(ffi.Pointer<ffi.Void>, int, int, int)>();
@@ -1481,7 +1546,7 @@ class NativeLibrary {
late final _update_viewport_and_camera_projection_ffiPtr = _lookup<
ffi.NativeFunction<
ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int, ffi.Int,
ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Uint32, ffi.Uint32,
ffi.Float)>>('update_viewport_and_camera_projection_ffi');
late final _update_viewport_and_camera_projection_ffi =
_update_viewport_and_camera_projection_ffiPtr
@@ -1698,7 +1763,7 @@ class NativeLibrary {
ffi.NativeFunction<
EntityId Function(
ffi.Pointer<ffi.Void>,
ffi.Int,
ffi.Uint8,
ffi.Float,
ffi.Float,
ffi.Float,
@@ -2080,25 +2145,6 @@ class NativeLibrary {
late final _get_animation_name_ffi = _get_animation_name_ffiPtr.asFunction<
void Function(ffi.Pointer<ffi.Void>, int, ffi.Pointer<ffi.Char>, int)>();
double get_animation_duration_ffi(
ffi.Pointer<ffi.Void> assetManager,
int asset,
int index,
) {
return _get_animation_duration_ffi(
assetManager,
asset,
index,
);
}
late final _get_animation_duration_ffiPtr = _lookup<
ffi.NativeFunction<
ffi.Float Function(ffi.Pointer<ffi.Void>, EntityId,
ffi.Int)>>('get_animation_duration_ffi');
late final _get_animation_duration_ffi = _get_animation_duration_ffiPtr
.asFunction<double Function(ffi.Pointer<ffi.Void>, int, int)>();
void get_morph_target_name_ffi(
ffi.Pointer<ffi.Void> assetManager,
int asset,
@@ -2148,6 +2194,44 @@ class NativeLibrary {
_get_morph_target_name_count_ffiPtr.asFunction<
int Function(ffi.Pointer<ffi.Void>, int, ffi.Pointer<ffi.Char>)>();
void set_post_processing_ffi(
ffi.Pointer<ffi.Void> viewer,
bool enabled,
) {
return _set_post_processing_ffi(
viewer,
enabled,
);
}
late final _set_post_processing_ffiPtr = _lookup<
ffi
.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Bool)>>(
'set_post_processing_ffi');
late final _set_post_processing_ffi = _set_post_processing_ffiPtr
.asFunction<void Function(ffi.Pointer<ffi.Void>, bool)>();
void pick_ffi(
ffi.Pointer<ffi.Void> viewer,
int x,
int y,
ffi.Pointer<EntityId> entityId,
) {
return _pick_ffi(
viewer,
x,
y,
entityId,
);
}
late final _pick_ffiPtr = _lookup<
ffi.NativeFunction<
ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int, ffi.Int,
ffi.Pointer<EntityId>)>>('pick_ffi');
late final _pick_ffi = _pick_ffiPtr.asFunction<
void Function(ffi.Pointer<ffi.Void>, int, int, ffi.Pointer<EntityId>)>();
void ios_dummy_ffi() {
return _ios_dummy_ffi();
}
@@ -2157,13 +2241,105 @@ class NativeLibrary {
late final _ios_dummy_ffi = _ios_dummy_ffiPtr.asFunction<void Function()>();
}
final class __mbstate_t extends ffi.Union {
@ffi.Array.multi([128])
external ffi.Array<ffi.Char> __mbstate8;
@ffi.LongLong()
external int _mbstateL;
}
final class __darwin_pthread_handler_rec extends ffi.Struct {
external ffi
.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>
__routine;
external ffi.Pointer<ffi.Void> __arg;
external ffi.Pointer<__darwin_pthread_handler_rec> __next;
}
final class _opaque_pthread_attr_t extends ffi.Struct {
@ffi.Long()
external int __sig;
@ffi.Array.multi([56])
external ffi.Array<ffi.Char> __opaque;
}
final class _opaque_pthread_cond_t extends ffi.Struct {
@ffi.Long()
external int __sig;
@ffi.Array.multi([40])
external ffi.Array<ffi.Char> __opaque;
}
final class _opaque_pthread_condattr_t extends ffi.Struct {
@ffi.Long()
external int __sig;
@ffi.Array.multi([8])
external ffi.Array<ffi.Char> __opaque;
}
final class _opaque_pthread_mutex_t extends ffi.Struct {
@ffi.Long()
external int __sig;
@ffi.Array.multi([56])
external ffi.Array<ffi.Char> __opaque;
}
final class _opaque_pthread_mutexattr_t extends ffi.Struct {
@ffi.Long()
external int __sig;
@ffi.Array.multi([8])
external ffi.Array<ffi.Char> __opaque;
}
final class _opaque_pthread_once_t extends ffi.Struct {
@ffi.Long()
external int __sig;
@ffi.Array.multi([8])
external ffi.Array<ffi.Char> __opaque;
}
final class _opaque_pthread_rwlock_t extends ffi.Struct {
@ffi.Long()
external int __sig;
@ffi.Array.multi([192])
external ffi.Array<ffi.Char> __opaque;
}
final class _opaque_pthread_rwlockattr_t extends ffi.Struct {
@ffi.Long()
external int __sig;
@ffi.Array.multi([16])
external ffi.Array<ffi.Char> __opaque;
}
final class _opaque_pthread_t extends ffi.Struct {
@ffi.Long()
external int __sig;
external ffi.Pointer<__darwin_pthread_handler_rec> __cleanup_stack;
@ffi.Array.multi([8176])
external ffi.Array<ffi.Char> __opaque;
}
final class ResourceBuffer extends ffi.Struct {
external ffi.Pointer<ffi.Void> data;
@ffi.Int()
@ffi.Int32()
external int size;
@ffi.Int()
@ffi.Int32()
external int id;
}
@@ -2189,7 +2365,10 @@ typedef LoadFilamentResourceFromOwner = ffi.Pointer<
typedef FreeFilamentResourceFromOwner = ffi.Pointer<
ffi
.NativeFunction<ffi.Void Function(ResourceBuffer, ffi.Pointer<ffi.Void>)>>;
typedef EntityId = ffi.Int;
/// This header replicates most of the methods in PolyvoxFilamentApi.h, and is only intended to be used to generate client FFI bindings.
/// The intention is that calling one of these methods will call its respective method in PolyvoxFilamentApi.h, but wrapped in some kind of thread runner to ensure thread safety.
typedef EntityId = ffi.Int32;
typedef FilamentRenderCallback = ffi.Pointer<
ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void> owner)>>;
@@ -2198,3 +2377,179 @@ const int __bool_true_false_are_defined = 1;
const int true1 = 1;
const int false1 = 0;
const int __DARWIN_ONLY_64_BIT_INO_T = 1;
const int __DARWIN_ONLY_UNIX_CONFORMANCE = 1;
const int __DARWIN_ONLY_VERS_1050 = 1;
const int __DARWIN_UNIX03 = 1;
const int __DARWIN_64_BIT_INO_T = 1;
const int __DARWIN_VERS_1050 = 1;
const int __DARWIN_NON_CANCELABLE = 0;
const String __DARWIN_SUF_EXTSN = '\$DARWIN_EXTSN';
const int __DARWIN_C_ANSI = 4096;
const int __DARWIN_C_FULL = 900000;
const int __DARWIN_C_LEVEL = 900000;
const int __STDC_WANT_LIB_EXT1__ = 1;
const int __DARWIN_NO_LONG_LONG = 0;
const int _DARWIN_FEATURE_64_BIT_INODE = 1;
const int _DARWIN_FEATURE_ONLY_64_BIT_INODE = 1;
const int _DARWIN_FEATURE_ONLY_VERS_1050 = 1;
const int _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1;
const int _DARWIN_FEATURE_UNIX_CONFORMANCE = 3;
const int __has_ptrcheck = 0;
const int __DARWIN_NULL = 0;
const int __PTHREAD_SIZE__ = 8176;
const int __PTHREAD_ATTR_SIZE__ = 56;
const int __PTHREAD_MUTEXATTR_SIZE__ = 8;
const int __PTHREAD_MUTEX_SIZE__ = 56;
const int __PTHREAD_CONDATTR_SIZE__ = 8;
const int __PTHREAD_COND_SIZE__ = 40;
const int __PTHREAD_ONCE_SIZE__ = 8;
const int __PTHREAD_RWLOCK_SIZE__ = 192;
const int __PTHREAD_RWLOCKATTR_SIZE__ = 16;
const int __DARWIN_WCHAR_MAX = 2147483647;
const int __DARWIN_WCHAR_MIN = -2147483648;
const int __DARWIN_WEOF = -1;
const int _FORTIFY_SOURCE = 2;
const int NULL = 0;
const int USER_ADDR_NULL = 0;
const int __WORDSIZE = 64;
const int INT8_MAX = 127;
const int INT16_MAX = 32767;
const int INT32_MAX = 2147483647;
const int INT64_MAX = 9223372036854775807;
const int INT8_MIN = -128;
const int INT16_MIN = -32768;
const int INT32_MIN = -2147483648;
const int INT64_MIN = -9223372036854775808;
const int UINT8_MAX = 255;
const int UINT16_MAX = 65535;
const int UINT32_MAX = 4294967295;
const int UINT64_MAX = -1;
const int INT_LEAST8_MIN = -128;
const int INT_LEAST16_MIN = -32768;
const int INT_LEAST32_MIN = -2147483648;
const int INT_LEAST64_MIN = -9223372036854775808;
const int INT_LEAST8_MAX = 127;
const int INT_LEAST16_MAX = 32767;
const int INT_LEAST32_MAX = 2147483647;
const int INT_LEAST64_MAX = 9223372036854775807;
const int UINT_LEAST8_MAX = 255;
const int UINT_LEAST16_MAX = 65535;
const int UINT_LEAST32_MAX = 4294967295;
const int UINT_LEAST64_MAX = -1;
const int INT_FAST8_MIN = -128;
const int INT_FAST16_MIN = -32768;
const int INT_FAST32_MIN = -2147483648;
const int INT_FAST64_MIN = -9223372036854775808;
const int INT_FAST8_MAX = 127;
const int INT_FAST16_MAX = 32767;
const int INT_FAST32_MAX = 2147483647;
const int INT_FAST64_MAX = 9223372036854775807;
const int UINT_FAST8_MAX = 255;
const int UINT_FAST16_MAX = 65535;
const int UINT_FAST32_MAX = 4294967295;
const int UINT_FAST64_MAX = -1;
const int INTPTR_MAX = 9223372036854775807;
const int INTPTR_MIN = -9223372036854775808;
const int UINTPTR_MAX = -1;
const int INTMAX_MAX = 9223372036854775807;
const int UINTMAX_MAX = -1;
const int INTMAX_MIN = -9223372036854775808;
const int PTRDIFF_MIN = -9223372036854775808;
const int PTRDIFF_MAX = 9223372036854775807;
const int SIZE_MAX = -1;
const int RSIZE_MAX = 9223372036854775807;
const int WCHAR_MAX = 2147483647;
const int WCHAR_MIN = -2147483648;
const int WINT_MIN = -2147483648;
const int WINT_MAX = 2147483647;
const int SIG_ATOMIC_MIN = -2147483648;
const int SIG_ATOMIC_MAX = 2147483647;

View File

@@ -0,0 +1,69 @@
import 'dart:async';
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:polyvox_filament/widgets/filament_gesture_detector_desktop.dart';
import 'package:polyvox_filament/widgets/filament_gesture_detector_mobile.dart';
import '../filament_controller.dart';
enum GestureType { RotateCamera, PanCamera, PanBackground }
///
/// A widget that translates finger/mouse gestures to zoom/pan/rotate actions.
///
class FilamentGestureDetector extends StatelessWidget {
///
/// The content to display below the gesture detector/listener widget.
/// This will usually be a FilamentWidget (so you can navigate by directly interacting with the viewport), but this is not necessary.
/// It is equally possible to render the viewport/gesture controls elsewhere in the widget hierarchy. The only requirement is that they share the same [FilamentController].
///
final Widget? child;
///
/// The [controller] attached to the [FilamentWidget] you wish to control.
///
final FilamentController controller;
///
/// If true, an overlay will be shown with buttons to toggle whether pointer movements are interpreted as:
/// 1) rotate or a pan (mobile only),
/// 2) moving the camera or the background image (TODO).
///
final bool showControlOverlay;
///
/// If false, all gestures will be ignored.
///
final bool listenerEnabled;
const FilamentGestureDetector(
{Key? key,
required this.controller,
this.child,
this.showControlOverlay = false,
this.listenerEnabled = true})
: super(key: key);
@override
Widget build(BuildContext context) {
if (kIsWeb) {
throw Exception("TODO");
} else if (Platform.isLinux || Platform.isWindows || Platform.isMacOS) {
return FilamentGestureDetectorDesktop(
controller: controller,
child: child,
showControlOverlay: showControlOverlay,
listenerEnabled: listenerEnabled,
);
} else {
return FilamentGestureDetectorMobile(
controller: controller,
child: child,
showControlOverlay: showControlOverlay,
listenerEnabled: listenerEnabled,
);
}
}
}

View File

@@ -0,0 +1,146 @@
import 'dart:async';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import '../filament_controller.dart';
///
/// A widget that translates finger/mouse gestures to zoom/pan/rotate actions.
///
class FilamentGestureDetectorDesktop extends StatefulWidget {
///
/// The content to display below the gesture detector/listener widget.
/// This will usually be a FilamentWidget (so you can navigate by directly interacting with the viewport), but this is not necessary.
/// It is equally possible to render the viewport/gesture controls elsewhere in the widget hierarchy. The only requirement is that they share the same [FilamentController].
///
final Widget? child;
///
/// The [controller] attached to the [FilamentWidget] you wish to control.
///
final FilamentController controller;
///
/// If true, an overlay will be shown with buttons to toggle whether pointer movements are interpreted as:
/// 1) rotate or a pan (mobile only),
/// 2) moving the camera or the background image (TODO).
///
final bool showControlOverlay;
///
/// If false, all gestures will be ignored.
///
final bool listenerEnabled;
const FilamentGestureDetectorDesktop(
{Key? key,
required this.controller,
this.child,
this.showControlOverlay = false,
this.listenerEnabled = true})
: super(key: key);
@override
State<StatefulWidget> createState() => _FilamentGestureDetectorDesktopState();
}
class _FilamentGestureDetectorDesktopState
extends State<FilamentGestureDetectorDesktop> {
///
///
///
bool _scaling = false;
bool _pointerMoving = false;
@override
void didUpdateWidget(FilamentGestureDetectorDesktop oldWidget) {
if (widget.showControlOverlay != oldWidget.showControlOverlay ||
widget.listenerEnabled != oldWidget.listenerEnabled) {
setState(() {});
}
super.didUpdateWidget(oldWidget);
}
Timer? _scrollTimer;
///
/// Scroll-wheel on desktop, interpreted as zoom
///
void _zoom(PointerScrollEvent pointerSignal) async {
_scrollTimer?.cancel();
await widget.controller.zoomBegin();
await widget.controller.zoomUpdate(
pointerSignal.localPosition.dx,
pointerSignal.localPosition.dy,
pointerSignal.scrollDelta.dy > 0 ? 1 : -1);
// we don't want to end the zoom in the same frame, because this will destroy the camera manipulator (and cancel the zoom update).
// here, we just defer calling [zoomEnd] for 100ms to ensure the update is propagated through.
_scrollTimer = Timer(Duration(milliseconds: 100), () async {
await widget.controller.zoomEnd();
});
}
@override
Widget build(BuildContext context) {
if (!widget.listenerEnabled) {
return widget.child ?? Container();
}
return Listener(
onPointerSignal: (PointerSignalEvent pointerSignal) async {
if (pointerSignal is PointerScrollEvent) {
_zoom(pointerSignal);
} else {
throw Exception("TODO");
}
},
onPointerPanZoomStart: (pzs) {
throw Exception("TODO - is this a pinch zoom on laptop trackpad?");
},
// ignore all pointer down events
// so we can wait to see if the pointer will be held/moved (interpreted as rotate/pan),
// or if this is a single mousedown event (interpreted as viewport pick)
onPointerDown: (d) async {},
// holding/moving the left mouse button is interpreted as a pan, middle mouse button as a rotate
onPointerMove: (PointerMoveEvent d) async {
// if this is the first move event, we need to call rotateStart/panStart to set the first coordinates
if (!_pointerMoving) {
if (d.buttons == kTertiaryButton) {
widget.controller
.rotateStart(d.localPosition.dx, d.localPosition.dy);
} else {
widget.controller
.panStart(d.localPosition.dx, d.localPosition.dy);
}
}
// set the _pointerMoving flag so we don't call rotateStart/panStart on future move events
_pointerMoving = true;
if (d.buttons == kTertiaryButton) {
widget.controller
.rotateUpdate(d.localPosition.dx, d.localPosition.dy);
} else {
widget.controller.panUpdate(d.localPosition.dx, d.localPosition.dy);
}
},
// when the left mouse button is released:
// 1) if _pointerMoving is true, this completes the pan
// 2) if _pointerMoving is false, this is interpreted as a pick
// same applies to middle mouse button, but this is ignored as a pick
onPointerUp: (PointerUpEvent d) async {
if (d.buttons == kTertiaryButton) {
widget.controller.rotateEnd();
} else {
if (_pointerMoving) {
widget.controller.panEnd();
} else {
widget.controller
.pick(d.localPosition.dx.toInt(), d.localPosition.dy.toInt());
}
}
_pointerMoving = false;
},
child: widget.child);
}
}

View File

@@ -0,0 +1,195 @@
import 'dart:async';
import 'package:flutter/material.dart';
import '../filament_controller.dart';
enum GestureType { RotateCamera, PanCamera, PanBackground }
///
/// A widget that translates finger/mouse gestures to zoom/pan/rotate actions.
///
class FilamentGestureDetectorMobile extends StatefulWidget {
///
/// The content to display below the gesture detector/listener widget.
/// This will usually be a FilamentWidget (so you can navigate by directly interacting with the viewport), but this is not necessary.
/// It is equally possible to render the viewport/gesture controls elsewhere in the widget hierarchy. The only requirement is that they share the same [FilamentController].
///
final Widget? child;
///
/// The [controller] attached to the [FilamentWidget] you wish to control.
///
final FilamentController controller;
///
/// If true, an overlay will be shown with buttons to toggle whether pointer movements are interpreted as:
/// 1) rotate or a pan (mobile only),
/// 2) moving the camera or the background image (TODO).
///
final bool showControlOverlay;
///
/// If false, all gestures will be ignored.
///
final bool listenerEnabled;
final double zoomDelta;
const FilamentGestureDetectorMobile(
{Key? key,
required this.controller,
this.child,
this.showControlOverlay = false,
this.listenerEnabled = true,
this.zoomDelta = 1})
: super(key: key);
@override
State<StatefulWidget> createState() => _FilamentGestureDetectorMobileState();
}
class _FilamentGestureDetectorMobileState
extends State<FilamentGestureDetectorMobile> {
GestureType gestureType = GestureType.PanCamera;
final _icons = {
GestureType.PanBackground: Icons.image,
GestureType.PanCamera: Icons.pan_tool,
GestureType.RotateCamera: Icons.rotate_90_degrees_ccw
};
// on mobile, we can't differentiate between pointer down events like we do on desktop with primary/secondary/tertiary buttons
// we allow the user to toggle between panning and rotating by double-tapping the widget
bool _rotateOnPointerMove = false;
//
//
//
bool _scaling = false;
// to avoid duplicating code for pan/rotate (panStart, panUpdate, panEnd, rotateStart, rotateUpdate etc)
// we have only a single function for start/update/end.
// when the gesture type is changed, these properties are updated to point to the correct function.
late Function(double x, double y) _functionStart;
late Function(double x, double y) _functionUpdate;
late Function() _functionEnd;
@override
void initState() {
_setFunction();
super.initState();
}
void _setFunction() {
switch (gestureType) {
case GestureType.RotateCamera:
_functionStart = widget.controller.rotateStart;
_functionUpdate = widget.controller.rotateUpdate;
_functionEnd = widget.controller.rotateEnd;
break;
case GestureType.PanCamera:
_functionStart = widget.controller.panStart;
_functionUpdate = widget.controller.panUpdate;
_functionEnd = widget.controller.panEnd;
break;
// TODO
case GestureType.PanBackground:
_functionStart = (x, y) async {};
_functionUpdate = (x, y) async {};
_functionEnd = () async {};
}
}
@override
void didUpdateWidget(FilamentGestureDetectorMobile oldWidget) {
if (widget.showControlOverlay != oldWidget.showControlOverlay ||
widget.listenerEnabled != oldWidget.listenerEnabled) {
setState(() {});
}
super.didUpdateWidget(oldWidget);
}
Timer? _scrollTimer;
// pinch zoom on mobile
// couldn't find any equivalent for pointerCount in Listener so we use two widgets:
// - outer is a GestureDetector only for pinch zoom
// - inner is a Listener for all other gestures (including scroll zoom on desktop)
@override
Widget build(BuildContext context) {
if (!widget.listenerEnabled) {
return widget.child ?? Container();
}
return Stack(children: [
Positioned.fill(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onDoubleTap: () {
setState(() {
_rotateOnPointerMove = !_rotateOnPointerMove;
});
},
onScaleStart: (d) async {
if (d.pointerCount == 2) {
_scaling = true;
widget.controller.zoomBegin();
} else if (!_scaling) {
if (_rotateOnPointerMove) {
widget.controller
.rotateStart(d.focalPoint.dx, d.focalPoint.dy);
} else {
widget.controller
.panStart(d.focalPoint.dx, d.focalPoint.dy);
}
}
},
onScaleEnd: (d) async {
if (d.pointerCount == 2) {
widget.controller.zoomEnd();
_scaling = false;
} else if (!_scaling) {
if (_rotateOnPointerMove) {
widget.controller.rotateEnd();
} else {
widget.controller.panEnd();
}
}
},
onScaleUpdate: (ScaleUpdateDetails d) async {
if (d.pointerCount == 2) {
widget.controller.zoomUpdate(d.localFocalPoint.dx,
d.localFocalPoint.dy, d.horizontalScale > 1 ? 0.1 : -0.1);
} else if (!_scaling) {
if (_rotateOnPointerMove) {
widget.controller
.rotateUpdate(d.focalPoint.dx, d.focalPoint.dy);
} else {
widget.controller
.panUpdate(d.focalPoint.dx, d.focalPoint.dy);
}
}
},
child: widget.child)),
widget.showControlOverlay
? Align(
alignment: Alignment.bottomRight,
child: GestureDetector(
onTap: () {
setState(() {
var curIdx = GestureType.values.indexOf(gestureType);
var nextIdx = curIdx == GestureType.values.length - 1
? 0
: curIdx + 1;
gestureType = GestureType.values[nextIdx];
_setFunction();
});
},
child: Container(
padding: const EdgeInsets.all(50),
child: Icon(_icons[gestureType], color: Colors.green)),
))
: Container()
]);
}
}

View File

@@ -4,12 +4,10 @@ import 'dart:math';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter/scheduler.dart';
import 'package:polyvox_filament/filament_controller.dart';
import 'dart:async';
import 'filament_controller_method_channel.dart';
typedef ResizeCallback = void Function(Size oldSize, Size newSize);

View File

@@ -64,7 +64,9 @@ public class SwiftPolyvoxFilamentPlugin: NSObject, FlutterPlugin, FlutterTexture
var markTextureFrameAvailable : @convention(c) (UnsafeMutableRawPointer?) -> () = { instancePtr in
let instance:SwiftPolyvoxFilamentPlugin = Unmanaged<SwiftPolyvoxFilamentPlugin>.fromOpaque(instancePtr!).takeUnretainedValue()
instance.registry.textureFrameAvailable(instance.flutterTextureId!)
if(instance.flutterTextureId != nil) {
instance.registry.textureFrameAvailable(instance.flutterTextureId!)
}
}
public func copyPixelBuffer() -> Unmanaged<CVPixelBuffer>? {
@@ -142,13 +144,15 @@ public class SwiftPolyvoxFilamentPlugin: NSObject, FlutterPlugin, FlutterTexture
Int(width), Int(height),
0,
&cvMetalTexture);
if(cvret != 0) {
result(FlutterError())
return
}
metalTexture = CVMetalTextureGetTexture(cvMetalTexture!);
let pixelBufferPtr = CVPixelBufferGetBaseAddress(pixelBuffer!);
let pixelBufferAddress = Int(bitPattern:pixelBufferPtr);
let metalTexturePtr = Unmanaged.passUnretained(metalTexture!).toOpaque()
let metalTextureAddress = Int(bitPattern:metalTexturePtr)
let callback = make_resource_loader(loadResource, freeResource, Unmanaged.passUnretained(self).toOpaque())
result([self.flutterTextureId as Any, nil, metalTextureAddress])
case "destroyTexture":
@@ -162,13 +166,7 @@ public class SwiftPolyvoxFilamentPlugin: NSObject, FlutterPlugin, FlutterTexture
let args = call.arguments as! [Any]
let width = UInt32(args[0] as! Int64)
let height = UInt32(args[1] as! Int64)
if(self.flutterTextureId != nil) {
self.registry.unregisterTexture(self.flutterTextureId!)
}
createPixelBuffer(width: Int(width), height:Int(height))
let metalTextureId = Int(bitPattern:Unmanaged.passUnretained(metalTexture!).toOpaque())
print("Resized to \(args[0])x\(args[1])")
result(self.flutterTextureId);
result(FlutterMethodNotImplemented)
default:
result(FlutterMethodNotImplemented)
}

View File

@@ -18,9 +18,10 @@ namespace polyvox {
class AssetManager {
public:
AssetManager(const ResourceLoaderWrapper* const loader,
NameComponentManager *ncm,
Engine *engine,
Scene *scene);
NameComponentManager* ncm,
Engine* engine,
Scene* scene,
const char* uberArchivePath);
~AssetManager();
EntityId loadGltf(const char* uri, const char* relativeResourcePath);
EntityId loadGlb(const char* uri, bool unlit);
@@ -69,6 +70,7 @@ namespace polyvox {
void setAnimationFrame(EntityId entity, int animationIndex, int animationFrame);
bool hide(EntityId entity, const char* meshName);
bool reveal(EntityId entity, const char* meshName);
const char* getNameForEntity(EntityId entityId);
private:
AssetLoader* _assetLoader = nullptr;

View File

@@ -49,7 +49,7 @@ namespace polyvox {
class FilamentViewer {
public:
FilamentViewer(const void* context, const ResourceLoaderWrapper* const resourceLoaderWrapper, void* const platform=nullptr);
FilamentViewer(const void* context, const ResourceLoaderWrapper* const resourceLoaderWrapper, void* const platform=nullptr, const char* uberArchivePath=nullptr);
~FilamentViewer();
void setToneMapping(ToneMapping toneMapping);
@@ -106,6 +106,9 @@ namespace polyvox {
int32_t addLight(LightManager::Type t, float colour, float intensity, float posX, float posY, float posZ, float dirX, float dirY, float dirZ, bool shadows);
void removeLight(EntityId entityId);
void clearLights();
void setPostProcessing(bool enabled);
void pick(uint32_t x, uint32_t y, EntityId* entityId);
AssetManager* const getAssetManager() {
return (AssetManager* const) _assetManager;
@@ -174,7 +177,7 @@ namespace polyvox {
void loadPngTexture(string path, ResourceBuffer data);
void loadTextureFromPath(string path);
Manipulator<double>* _manipulator = nullptr;
void _createManipulator();
uint32_t _lastFrameTimeInNanos;
};

View File

@@ -53,7 +53,7 @@ extern "C" {
#endif
typedef int32_t EntityId;
FLUTTER_PLUGIN_EXPORT const void* create_filament_viewer(const void* const context, const ResourceLoaderWrapper* const loader, void* const platform);
FLUTTER_PLUGIN_EXPORT const void* create_filament_viewer(const void* const context, const ResourceLoaderWrapper* const loader, void* const platform, const char* uberArchivePath);
FLUTTER_PLUGIN_EXPORT void destroy_filament_viewer(const void* const viewer);
FLUTTER_PLUGIN_EXPORT ResourceLoaderWrapper* make_resource_loader(LoadFilamentResourceFromOwner loadFn, FreeFilamentResourceFromOwner freeFn, void* owner);
FLUTTER_PLUGIN_EXPORT void* get_asset_manager(const void* const viewer);
@@ -150,6 +150,9 @@ FLUTTER_PLUGIN_EXPORT void set_camera_focal_length(const void* const viewer, flo
FLUTTER_PLUGIN_EXPORT void set_camera_focus_distance(const void* const viewer, float focusDistance);
FLUTTER_PLUGIN_EXPORT int hide_mesh(void* assetManager, EntityId asset, const char* meshName);
FLUTTER_PLUGIN_EXPORT int reveal_mesh(void* assetManager, EntityId asset, const char* meshName);
FLUTTER_PLUGIN_EXPORT void set_post_processing(void* const viewer, bool enabled);
FLUTTER_PLUGIN_EXPORT void pick(void* const viewer, int x, int y, EntityId* entityId);
FLUTTER_PLUGIN_EXPORT const char* get_name_for_entity(void* const assetManager, const EntityId entityId);
FLUTTER_PLUGIN_EXPORT void ios_dummy();
#ifdef __cplusplus
}

View File

@@ -1,19 +1,23 @@
#ifndef _POLYVOX_FILAMENT_FFI_API_H
#define _POLYVOX_FILAMENT_FFI_API_H
#include "PolyvoxFilamentApi.h"
#ifdef __cplusplus
extern "C" {
#endif
///
/// This header replicates most of the methods in PolyvoxFilamentApi.h, and is only intended to be used to generate client FFI bindings.
/// The intention is that calling one of these methods will call its respective method in PolyvoxFilamentApi.h, but wrapped in some kind of thread runner to ensure thread safety.
///
#include "PolyvoxFilamentApi.h"
typedef int32_t EntityId;
typedef void (*FilamentRenderCallback)(void* const owner);
FLUTTER_PLUGIN_EXPORT void* const create_filament_viewer_ffi(void* const context, void* const platform, const ResourceLoaderWrapper* const loader, void (*renderCallback)(void* const renderCallbackOwner), void* const renderCallbackOwner);
FLUTTER_PLUGIN_EXPORT void* const create_filament_viewer_ffi(void* const context, void* const platform, const char* uberArchivePath, const ResourceLoaderWrapper* const loader, void (*renderCallback)(void* const renderCallbackOwner), void* const renderCallbackOwner);
FLUTTER_PLUGIN_EXPORT void create_swap_chain_ffi(void* const viewer, void* const surface, uint32_t width, uint32_t height);
FLUTTER_PLUGIN_EXPORT void create_render_target_ffi(void* const viewer, uint32_t nativeTextureId, uint32_t width, uint32_t height);
FLUTTER_PLUGIN_EXPORT void create_render_target_ffi(void* const viewer, intptr_t nativeTextureId, uint32_t width, uint32_t height);
FLUTTER_PLUGIN_EXPORT void destroy_filament_viewer_ffi(void* const viewer);
FLUTTER_PLUGIN_EXPORT void render_ffi(void* const viewer);
FLUTTER_PLUGIN_EXPORT FilamentRenderCallback make_render_callback_fn_pointer(FilamentRenderCallback);
@@ -39,48 +43,52 @@ FLUTTER_PLUGIN_EXPORT void remove_asset_ffi(void* const viewer, EntityId asset);
FLUTTER_PLUGIN_EXPORT void clear_assets_ffi(void* const viewer);
FLUTTER_PLUGIN_EXPORT bool set_camera_ffi(void* const viewer, EntityId asset, const char *nodeName);
FLUTTER_PLUGIN_EXPORT void apply_weights_ffi(
void* const assetManager,
EntityId asset,
const char *const entityName,
float *const weights,
int count
);
void* const assetManager,
EntityId asset,
const char *const entityName,
float *const weights,
int count
);
FLUTTER_PLUGIN_EXPORT void set_morph_target_weights_ffi(
void* const assetManager,
EntityId asset,
const char *const entityName,
const float *const morphData,
int numWeights
);
void* const assetManager,
EntityId asset,
const char *const entityName,
const float *const morphData,
int numWeights
);
FLUTTER_PLUGIN_EXPORT bool set_morph_animation_ffi(
void* const assetManager,
EntityId asset,
const char *const entityName,
const float *const morphData,
const int* const morphIndices,
int numMorphTargets,
int numFrames,
float frameLengthInMs);
void* const assetManager,
EntityId asset,
const char *const entityName,
const float *const morphData,
const int* const morphIndices,
int numMorphTargets,
int numFrames,
float frameLengthInMs);
FLUTTER_PLUGIN_EXPORT
FLUTTER_PLUGIN_EXPORT void set_bone_animation_ffi(
void* const assetManager,
EntityId asset,
const float* const frameData,
int numFrames,
int numBones,
const char** const boneNames,
const char** const meshName,
int numMeshTargets,
float frameLengthInMs);
void* const assetManager,
EntityId asset,
const float* const frameData,
int numFrames,
int numBones,
const char** const boneNames,
const char** const meshName,
int numMeshTargets,
float frameLengthInMs);
FLUTTER_PLUGIN_EXPORT void play_animation_ffi(void* const assetManager, EntityId asset, int index, bool loop, bool reverse, bool replaceActive, float crossfade);
FLUTTER_PLUGIN_EXPORT void set_animation_frame_ffi(void* const assetManager, EntityId asset, int animationIndex, int animationFrame);
FLUTTER_PLUGIN_EXPORT void stop_animation_ffi(void* const assetManager, EntityId asset, int index);
FLUTTER_PLUGIN_EXPORT int get_animation_count_ffi(void* const assetManager, EntityId asset);
FLUTTER_PLUGIN_EXPORT void get_animation_name_ffi(void* const assetManager, EntityId asset, char *const outPtr, int index);
FLUTTER_PLUGIN_EXPORT float get_animation_duration_ffi(void* const assetManager, EntityId asset, int index);
FLUTTER_PLUGIN_EXPORT void get_morph_target_name_ffi(void* const assetManager, EntityId asset, const char *meshName, char *const outPtr, int index);
FLUTTER_PLUGIN_EXPORT int get_morph_target_name_count_ffi(void* const assetManager, EntityId asset, const char *meshName);
FLUTTER_PLUGIN_EXPORT void set_post_processing_ffi(void* const viewer, bool enabled);
FLUTTER_PLUGIN_EXPORT void pick_ffi(void* const viewer, int x, int y, EntityId* entityId);
FLUTTER_PLUGIN_EXPORT void ios_dummy_ffi();
#ifdef __cplusplus
}
#endif
#endif // _POLYVOX_FILAMENT_FFI_API_H

View File

@@ -2,6 +2,7 @@
#define RESOURCE_BUFFER_H
#include <stdint.h>
#if defined(__cplusplus)
extern "C" {
#endif
@@ -57,6 +58,8 @@ extern "C" {
mFreeFilamentResource(rb);
}
}
#endif
LoadFilamentResource mLoadFilamentResource;
FreeFilamentResource mFreeFilamentResource;
@@ -66,7 +69,6 @@ extern "C" {
};
typedef struct ResourceLoaderWrapper ResourceLoaderWrapper;
#if defined(__cplusplus)
}
#endif

Some files were not shown because too many files have changed in this diff Show More