@bloomengine/engine 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/README.md +33 -11
  2. package/native/linux/Cargo.lock +1571 -12
  3. package/native/linux/Cargo.toml +3 -0
  4. package/native/linux/src/lib.rs +745 -40
  5. package/native/macos/src/lib.rs +30 -118
  6. package/native/shared/build.rs +32 -4
  7. package/native/shared/src/postfx.rs +16 -10
  8. package/native/shared/src/renderer/formats.rs +1 -7
  9. package/native/shared/src/renderer/impulse_field.rs +2 -1
  10. package/native/shared/src/renderer/material_system.rs +15 -3
  11. package/native/shared/src/renderer/shaders.rs +7 -1
  12. package/native/shared/src/renderer/transient.rs +12 -12
  13. package/native/shared/src/string_header.rs +32 -0
  14. package/native/third_party/JoltPhysics/Build/Android/PerformanceTest/build.gradle +51 -0
  15. package/native/third_party/JoltPhysics/Build/Android/PerformanceTest/src/main/AndroidManifest.xml +20 -0
  16. package/native/third_party/JoltPhysics/Build/Android/PerformanceTest/src/main/cpp/CMakeLists.txt +20 -0
  17. package/native/third_party/JoltPhysics/Build/Android/UnitTests/build.gradle +51 -0
  18. package/native/third_party/JoltPhysics/Build/Android/UnitTests/src/main/AndroidManifest.xml +20 -0
  19. package/native/third_party/JoltPhysics/Build/Android/UnitTests/src/main/cpp/CMakeLists.txt +20 -0
  20. package/native/third_party/JoltPhysics/Build/Android/build.gradle +17 -0
  21. package/native/third_party/JoltPhysics/Build/Android/gradle/wrapper/gradle-wrapper.jar +0 -0
  22. package/native/third_party/JoltPhysics/Build/Android/gradle/wrapper/gradle-wrapper.properties +5 -0
  23. package/native/third_party/JoltPhysics/Build/Android/gradle.properties +21 -0
  24. package/native/third_party/JoltPhysics/Build/Android/gradlew +185 -0
  25. package/native/third_party/JoltPhysics/Build/Android/gradlew.bat +89 -0
  26. package/native/third_party/JoltPhysics/Build/Android/settings.gradle +10 -0
  27. package/native/third_party/JoltPhysics/Build/CMakeLists.txt +449 -0
  28. package/native/third_party/JoltPhysics/Build/README.md +250 -0
  29. package/native/third_party/JoltPhysics/Build/cmake_linux_clang_gcc.sh +28 -0
  30. package/native/third_party/JoltPhysics/Build/cmake_linux_emscripten.sh +19 -0
  31. package/native/third_party/JoltPhysics/Build/cmake_linux_mingw.sh +19 -0
  32. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl.bat +3 -0
  33. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_32bit.bat +3 -0
  34. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_arm.bat +3 -0
  35. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_arm_32bit.bat +4 -0
  36. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_cross_platform_deterministic.bat +3 -0
  37. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_double.bat +3 -0
  38. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_no_object_stream.bat +3 -0
  39. package/native/third_party/JoltPhysics/Build/cmake_vs2022_clang.bat +10 -0
  40. package/native/third_party/JoltPhysics/Build/cmake_vs2022_clang_cross_platform_deterministic.bat +10 -0
  41. package/native/third_party/JoltPhysics/Build/cmake_vs2022_clang_double.bat +10 -0
  42. package/native/third_party/JoltPhysics/Build/cmake_vs2022_uwp.bat +5 -0
  43. package/native/third_party/JoltPhysics/Build/cmake_vs2022_uwp_arm.bat +5 -0
  44. package/native/third_party/JoltPhysics/Build/cmake_vs2026_cl.bat +3 -0
  45. package/native/third_party/JoltPhysics/Build/cmake_vs2026_cl_cross_platform_deterministic.bat +3 -0
  46. package/native/third_party/JoltPhysics/Build/cmake_vs2026_cl_double.bat +3 -0
  47. package/native/third_party/JoltPhysics/Build/cmake_vs2026_clang.bat +10 -0
  48. package/native/third_party/JoltPhysics/Build/cmake_vs2026_clang_cross_platform_deterministic.bat +10 -0
  49. package/native/third_party/JoltPhysics/Build/cmake_vs2026_clang_double.bat +10 -0
  50. package/native/third_party/JoltPhysics/Build/cmake_windows_mingw.sh +19 -0
  51. package/native/third_party/JoltPhysics/Build/cmake_xcode_ios.sh +4 -0
  52. package/native/third_party/JoltPhysics/Build/cmake_xcode_macos.sh +4 -0
  53. package/native/third_party/JoltPhysics/Build/iOS/JoltViewerInfo.plist +34 -0
  54. package/native/third_party/JoltPhysics/Build/iOS/SamplesInfo.plist +34 -0
  55. package/native/third_party/JoltPhysics/Build/iOS/UnitTestsInfo.plist +34 -0
  56. package/native/third_party/JoltPhysics/Build/macOS/icon.icns +0 -0
  57. package/native/third_party/JoltPhysics/Build/macos_install_vulkan_sdk.sh +13 -0
  58. package/native/third_party/JoltPhysics/Build/ubuntu24_install_vulkan_sdk.sh +4 -0
  59. package/native/third_party/bloom_jolt/CMakeLists.txt +14 -5
  60. package/native/windows/Cargo.lock +1 -0
  61. package/native/windows/Cargo.toml +10 -1
  62. package/native/windows/src/lib.rs +226 -18
  63. package/package.json +9 -7
  64. package/src/core/colors.ts +34 -27
  65. package/src/core/index.ts +1 -2
@@ -0,0 +1,250 @@
1
+ # Building and Using Jolt Physics
2
+
3
+ ## Build Types
4
+
5
+ Each platform supports multiple build targets
6
+
7
+ - Debug - Debug version of the library, turns on asserts
8
+ - Release - Release version of the library, no asserts but includes profiling support and can draw the world and simulation properties
9
+ - ReleaseASAN - As Release but turns on Address Sanitizer (clang only) to find bugs
10
+ - ReleaseUBSAN - As Release but turns on Undefined Behavior Sanitizer (clang only) to find bugs
11
+ - ReleaseTSAN - As Release but turns on the Thread Sanitizer (clang only) to find bugs
12
+ - ReleaseCoverage - As Release but turns on Coverage reporting (clang only) to find which areas of the code are not executed
13
+ - Distribution - Shippable version of the library, turns off all debugging support
14
+
15
+ ## Includes
16
+
17
+ The Jolt headers don't include Jolt/Jolt.h. Always include Jolt/Jolt.h before including any other Jolt header.
18
+ You can use Jolt/Jolt.h in your precompiled header to speed up compilation.
19
+
20
+ ## Defines
21
+
22
+ There are a number of user configurable defines that turn on/off certain features:
23
+ <details>
24
+ <summary>General Options (click to see more)</summary>
25
+ <ul>
26
+ <li>JPH_SHARED_LIBRARY - Use the Jolt library as a shared library. Use JPH_BUILD_SHARED_LIBRARY to build Jolt as a shared library.</li>
27
+ <li>JPH_PROFILE_ENABLED - Turns on the internal profiler.</li>
28
+ <li>JPH_EXTERNAL_PROFILE - Turns on the internal profiler but forwards the information to a user defined external system (see Profiler.h). Use JPH_USE_EXTERNAL_PROFILE option to enable this from CMake config.</li>
29
+ <li>JPH_DEBUG_RENDERER - Adds support to draw lines and triangles, used to be able to debug draw the state of the world.</li>
30
+ <li>JPH_DISABLE_TEMP_ALLOCATOR - Disables the temporary memory allocator, used mainly to allow ASAN to do its job.</li>
31
+ <li>JPH_DISABLE_CUSTOM_ALLOCATOR - Disables the ability to override the memory allocator.</li>
32
+ <li>JPH_FLOATING_POINT_EXCEPTIONS_ENABLED - Turns on division by zero and invalid floating point exception support in order to detect bugs (Windows only).</li>
33
+ <li>JPH_CROSS_PLATFORM_DETERMINISTIC - Turns on behavior to attempt cross platform determinism. If this is set, JPH_USE_FMADD is ignored.</li>
34
+ <li>JPH_DET_LOG - Turn on a lot of extra logging to help debug determinism issues when JPH_CROSS_PLATFORM_DETERMINISTIC is turned on.</li>
35
+ <li>JPH_ENABLE_ASSERTS - Compiles the library so that it rises an assert in case of failures. The library ignores these failures otherwise.</li>
36
+ <li>JPH_DOUBLE_PRECISION - Compiles the library so that all positions are stored in doubles instead of floats. This makes larger worlds possible.</li>
37
+ <li>JPH_OBJECT_LAYER_BITS - Defines the size of ObjectLayer, must be 16 or 32 bits.</li>
38
+ <li>JPH_OBJECT_STREAM - Includes the code to serialize physics data in the ObjectStream format (mostly used by the examples).</li>
39
+ <li>JPH_NO_FORCE_INLINE - Don't use force inlining but fall back to a regular 'inline'.</li>
40
+ <li>JPH_USE_STD_VECTOR - Use std::vector instead of Jolt's own Array class.</li>
41
+ <li>CPP_RTTI_ENABLED - Enable C++ RTTI for the library. Disabled by default.</li>
42
+ </ul>
43
+ </details>
44
+
45
+ <details>
46
+ <summary>CPU Instruction Sets (click to see more)</summary>
47
+ <ul>
48
+ <li>JPH_USE_SSE4_1 - Enable SSE4.1 CPU instructions (default: on, x86/x64 only)</li>
49
+ <li>JPH_USE_SSE4_2 - Enable SSE4.2 CPU instructions (default: on, x86/x64 only)</li>
50
+ <li>JPH_USE_F16C - Enable half float CPU instructions (default: on, x86/x64 only)</li>
51
+ <li>JPH_USE_LZCNT - Enable the lzcnt CPU instruction (default: on, x86/x64 only)</li>
52
+ <li>JPH_USE_TZCNT - Enable the tzcnt CPU instruction (default: on, x86/x64 only)</li>
53
+ <li>JPH_USE_AVX - Enable AVX CPU instructions (default: on, x86/x64 only)</li>
54
+ <li>JPH_USE_AVX2 - Enable AVX2 CPU instructions (default: on, x86/x64 only)</li>
55
+ <li>JPH_USE_AVX512 - Enable AVX512F+AVX512VL CPU instructions (default: off, x86/x64 only)</li>
56
+ <li>JPH_USE_FMADD - Enable fused multiply add CPU instructions (default: on, x86/x64 only)</li>
57
+ </ul>
58
+ </details>
59
+
60
+ ## Logging & Asserting
61
+
62
+ To override the default trace and assert mechanism install your own custom handlers in Trace and AssertFailed (see IssueReporting.h).
63
+
64
+ ## Custom Memory Allocator
65
+
66
+ To implement your custom memory allocator override Allocate, Free, Reallocate, AlignedAllocate and AlignedFree (see Memory.h).
67
+
68
+ ## Building
69
+
70
+ <details>
71
+ <summary>Windows 10+</summary>
72
+ <ul style="list-style: none"><li>
73
+ <details>
74
+ <summary>MSVC CL (default compiler)</summary>
75
+ <ul>
76
+ <li>Download Visual Studio 2022 (Community or other edition)</li>
77
+ <li>Download CMake 3.20+ (https://cmake.org/download/)</li>
78
+ <li>Run cmake_vs2022_cl.bat</li>
79
+ <li>Open the resulting project file VS2022_CL\JoltPhysics.sln</li>
80
+ <li>Compile and run either 'Samples' or 'UnitTests'</li>
81
+ </ul>
82
+ </details>
83
+ <details>
84
+ <summary>MSVC CL - 32 bit</summary>
85
+ <ul>
86
+ <li>Download Visual Studio 2022 (Community or other edition)</li>
87
+ <li>Download CMake 3.20+ (https://cmake.org/download/)</li>
88
+ <li>Run cmake_vs2022_cl_32bit.bat</li>
89
+ <li>Open the resulting project file VS2022_CL_32BIT\JoltPhysics.sln</li>
90
+ <li>Compile and run either 'Samples' or 'UnitTests'</li>
91
+ </ul>
92
+ </details>
93
+ <details>
94
+ <summary>MSVC Clang compiler</summary>
95
+ <ul>
96
+ <li>Download Visual Studio 2022 (Community or other edition)</li>
97
+ <li>Make sure to install "C++ Clang Compiler for Windows 11.0.0+" and "C++ Clang-cl for v142+ build tools (x64/x86)" using the Visual Studio Installer</li>
98
+ <li>Download CMake 3.20+ (https://cmake.org/download/)</li>
99
+ <li>Run cmake_vs2022_clang.bat</li>
100
+ <li>Open the resulting project file VS2022_Clang\JoltPhysics.sln</li>
101
+ <li>Compile and run either 'Samples' or 'UnitTests'</li>
102
+ </ul>
103
+ </details>
104
+ <details>
105
+ <summary>MSVC Universal Windows Platform</summary>
106
+ <ul>
107
+ <li>Download Visual Studio 2022+ (Community or other edition)</li>
108
+ <li>Make sure to install "Universal Windows Platform development" using the Visual Studio Installer</li>
109
+ <li>Download CMake 3.20+ (https://cmake.org/download/)</li>
110
+ <li>Run cmake_vs2022_uwp.bat</li>
111
+ <li>Open the resulting project file VS2022_UWP\JoltPhysics.sln</li>
112
+ <li>Compile and run 'UnitTests'</li>
113
+ </ul>
114
+ </details>
115
+ <details>
116
+ <summary>MinGW</summary>
117
+ <ul>
118
+ <li>Follow download instructions for MSYS2 (https://www.msys2.org/)</li>
119
+ <li>From the MSYS2 MSYS app run: pacman -S --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake</li>
120
+ <li>From the MSYS2 MINGW x64 app, in the Build folder run: ./cmake_windows_mingw.sh</li>
121
+ <li>Run: cmake --build MinGW_Debug</li>
122
+ <li>Run: MinGW_Debug/UnitTests.exe</li>
123
+ </ul>
124
+ </details>
125
+ </li></ul>
126
+ </details>
127
+
128
+ <details>
129
+ <summary>Linux (Ubuntu)</summary>
130
+ <ul>
131
+ <li>Install clang (apt-get install clang)</li>
132
+ <li>Install cmake (apt-get install cmake)</li>
133
+ <li>If you want to build the Samples or JoltViewer, install the <a href="https://vulkan.lunarg.com/doc/view/latest/linux/getting_started_ubuntu.html">Vulkan SDK</a></li>
134
+ <li>Run: ./cmake_linux_clang_gcc.sh</li>
135
+ <li>Go to the Linux_Debug folder</li>
136
+ <li>Run: make -j$(nproc) && ./UnitTests</li>
137
+ <li>If you built the samples you can run: ./Samples</li>
138
+ </ul>
139
+ </details>
140
+
141
+ <details>
142
+ <summary>Android</summary>
143
+ <ul>
144
+ <li>Install Android Studio 2020.3.1+ (https://developer.android.com/studio/)</li>
145
+ <li>Open the 'Android' folder in Android Studio and wait until gradle finishes</li>
146
+ <li>Select 'Run' / 'Run...' and 'UnitTests'</li>
147
+ <li>If the screen turns green after a while the unit tests succeeded, when red they failed (see the android log for details)</li>
148
+ </ul>
149
+ </details>
150
+
151
+ <details>
152
+ <summary>macOS</summary>
153
+ <ul>
154
+ <li>Install XCode</li>
155
+ <li>Download CMake 3.23+ (https://cmake.org/download/)</li>
156
+ <li>Run: ./cmake_xcode_macos.sh</li>
157
+ <li>This will open XCode with a newly generated project</li>
158
+ <li>Build and run the project</li>
159
+ <li>Note that you can also follow the steps in the 'Linux' section if you wish to build without XCode.</li>
160
+ </ul>
161
+ </details>
162
+
163
+ <details>
164
+ <summary>iOS</summary>
165
+ <ul>
166
+ <li>Install XCode</li>
167
+ <li>Download CMake 3.23+ (https://cmake.org/download/)</li>
168
+ <li>Run: ./cmake_xcode.ios.sh</li>
169
+ <li>This will open XCode with a newly generated project</li>
170
+ <li>Build and run the project (note that this will only work in the simulator as the code signing information is not set up)</li>
171
+ </ul>
172
+ </details>
173
+
174
+ <details>
175
+ <summary>Emscripten (tested only on Linux)</summary>
176
+ <ul>
177
+ <li>Install Emscripten (https://emscripten.org/docs/getting_started/downloads.html)</li>
178
+ <li>Install nodejs (apt-get install nodejs)</li>
179
+ <li>Download CMake 3.23+ (https://cmake.org/download/)</li>
180
+ <li>Run: ./cmake_linux_emscripten.sh</li>
181
+ <li>Go to the WASM_Debug folder</li>
182
+ <li>Run: make -j$(nproc) && node UnitTests.js</li>
183
+ </ul>
184
+ </details>
185
+
186
+ ## Other Build Tools
187
+
188
+ * A vcpkg package is available [here](https://github.com/microsoft/vcpkg/tree/master/ports/joltphysics).
189
+ * A xmake package is available [here](https://github.com/xmake-io/xmake-repo/tree/dev/packages/j/joltphysics).
190
+ * A conan package is available [here](https://conan.io/center/recipes/joltphysics)
191
+ * Jolt has been verified to build with [ninja](https://ninja-build.org/) through CMake.
192
+
193
+ ## Errors
194
+
195
+ ### Link Error: File Format Not Recognized
196
+
197
+ If you receive the following error when linking:
198
+
199
+ ```
200
+ /usr/bin/ld: libJolt.a: error adding symbols: file format not recognized
201
+ ```
202
+
203
+ Then you have not enabled interprocedural optimizations (link time optimizations) for your own application. See the INTERPROCEDURAL_OPTIMIZATION option in CMakeLists.txt.
204
+
205
+ ### Link Error: Unresolved External Symbol
206
+
207
+ If you receive a link error that looks like:
208
+
209
+ ```
210
+ error LNK2001: unresolved external symbol "public: virtual void __cdecl JPH::ConvexShape::GetSubmergedVolume(...) const"
211
+ ```
212
+
213
+ you have a mismatch in defines between your own code and the Jolt library. In this case the mismatch is in the define `JPH_DEBUG_RENDERER` which is most likely defined in `Jolt.lib` and not in your own project. In `Debug` and `Release` builds, Jolt by default has `JPH_DEBUG_RENDERER` defined, in `Distribution` it is not defined. The cmake options `DEBUG_RENDERER_IN_DEBUG_AND_RELEASE` and `DEBUG_RENDERER_IN_DISTRIBUTION` override this behavior.
214
+
215
+ The `RegisterTypes` function (which you have to call to initialize the library) checks the other important defines and will trace and abort if there are more mismatches.
216
+
217
+ ### Link Error: Undefined Symbol
218
+
219
+ If you receive a link error that looks like:
220
+
221
+ ```
222
+ error: undefined symbol: typeinfo for JPH::DebugRenderer
223
+ ```
224
+
225
+ you have a mismatch between RTTI settings (MSVC: `/GR`/`/GR-`, clang: `-frtti`/`-fno-rtti`). Jolt by default compiles without RTTI and if your project compiles with RTTI you can get this error. Either turn RTTI off for your project or turn it on for Jolt using the CPP_RTTI_ENABLED cmake option.
226
+
227
+ ### DirectX Error
228
+
229
+ The samples use DirectX for the graphics implementation, when attempting to run the samples you may get a DirectX error pop-up which may say "The GPU device instance has been suspended", in your debugger you may see the message "Using the Redistributable D3D12 SDKLayers dll also requires that the latest SDKLayers for Windows 10 is installed.".
230
+
231
+ Fix this by enabling "Graphics Tools" which is an optional Windows settings. To enable it you have to press the windows key, search for "Manage Optional Features", and then click "Add a Feature", and install "Graphics Tools".
232
+
233
+ ### Illegal Instruction Error
234
+
235
+ If your CPU doesn't support all of the instructions you'll get an `Illegal instruction` exception.
236
+
237
+ On Linux to see what instructions your CPU supports run `lscpu` and then look at the flags section, on Windows you can use a program like [`coreinfo`](https://learn.microsoft.com/en-us/sysinternals/downloads/coreinfo). Once you know what instructions your cpu supports you can configure the project through cmake and for example disable all special instructions:
238
+
239
+ ```
240
+ ./cmake_linux_clang_gcc.sh Release clang++ -DUSE_SSE4_1=OFF -DUSE_SSE4_2=OFF -DUSE_AVX=OFF -DUSE_AVX2=OFF -DUSE_AVX512=OFF -DUSE_LZCNT=OFF -DUSE_TZCNT=OFF -DUSE_F16C=OFF -DUSE_FMADD=OFF
241
+ ```
242
+
243
+ Note that this example is for Linux but the cmake settings work on Windows too.
244
+
245
+ ## Doxygen on Windows
246
+
247
+ Documentation can be generated through doxygen:
248
+
249
+ - Install Doxygen (https://www.doxygen.nl/download.html)
250
+ - Run: run_doxygen.bat
@@ -0,0 +1,28 @@
1
+ #!/bin/sh
2
+
3
+ if [ -z $1 ]
4
+ then
5
+ BUILD_TYPE=Debug
6
+ else
7
+ BUILD_TYPE=$1
8
+ shift
9
+ fi
10
+
11
+ if [ -z $1 ]
12
+ then
13
+ COMPILER=clang++
14
+ else
15
+ COMPILER=$1
16
+ shift
17
+ fi
18
+
19
+ BUILD_DIR=Linux_$BUILD_TYPE
20
+
21
+ echo Usage: ./cmake_linux_clang_gcc.sh [Configuration] [Compiler]
22
+ echo "Possible configurations: Debug (default), Release, Distribution, ReleaseUBSAN, ReleaseASAN, ReleaseTSAN, ReleaseCoverage"
23
+ echo "Possible compilers: clang++, clang++-XX, g++, g++-XX where XX is the version"
24
+ echo Generating Makefile for build type \"$BUILD_TYPE\" and compiler \"$COMPILER\" in folder \"$BUILD_DIR\"
25
+
26
+ cmake -S . -B $BUILD_DIR -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_COMPILER=$COMPILER "${@}"
27
+
28
+ echo Compile by running \"make -j $(nproc) \&\& ./UnitTests\" in folder \"$BUILD_DIR\"
@@ -0,0 +1,19 @@
1
+ #!/bin/sh
2
+
3
+ if [ -z $1 ]
4
+ then
5
+ BUILD_TYPE=Debug
6
+ else
7
+ BUILD_TYPE=$1
8
+ shift
9
+ fi
10
+
11
+ BUILD_DIR=WASM_$BUILD_TYPE
12
+
13
+ echo Usage: ./cmake_linux_emscripten.sh [Configuration]
14
+ echo "Possible configurations: Debug (default), Release, Distribution"
15
+ echo Generating Makefile for build type \"$BUILD_TYPE\" in folder \"$BUILD_DIR\"
16
+
17
+ cmake -S . -B $BUILD_DIR -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake "${@}"
18
+
19
+ echo Compile by running \"make -j $(nproc) \&\& node UnitTests.js\" in folder \"$BUILD_DIR\"
@@ -0,0 +1,19 @@
1
+ #!/bin/sh
2
+
3
+ if [ -z $1 ]
4
+ then
5
+ BUILD_TYPE=Release
6
+ else
7
+ BUILD_TYPE=$1
8
+ shift
9
+ fi
10
+
11
+ BUILD_DIR=MinGW_$BUILD_TYPE
12
+
13
+ echo Usage: ./cmake_linux_mingw.sh [Configuration]
14
+ echo "Possible configurations: Debug, Release (default), Distribution"
15
+ echo Generating Makefile for build type \"$BUILD_TYPE\" in folder \"$BUILD_DIR\"
16
+
17
+ cmake -S . -B $BUILD_DIR -DCMAKE_TOOLCHAIN_FILE=mingw-w64-x86_64.cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE "${@}"
18
+
19
+ echo Compile by running \"cmake --build $BUILD_DIR -j $(nproc)\"
@@ -0,0 +1,3 @@
1
+ @echo off
2
+ cmake -S . -B VS2022_CL -G "Visual Studio 17 2022" -A x64 %*
3
+ echo Open VS2022_CL\JoltPhysics.sln to build the project.
@@ -0,0 +1,3 @@
1
+ @echo off
2
+ cmake -S . -B VS2022_CL_32BIT -G "Visual Studio 17 2022" -A Win32 -DUSE_SSE4_1=OFF -DUSE_SSE4_2=OFF -DUSE_AVX=OFF -DUSE_AVX2=OFF -DUSE_AVX512=OFF -DUSE_LZCNT=OFF -DUSE_TZCNT=OFF -DUSE_F16C=OFF -DUSE_FMADD=OFF %*
3
+ echo Open VS2022_CL_32BIT\JoltPhysics.sln to build the project.
@@ -0,0 +1,3 @@
1
+ @echo off
2
+ cmake -S . -B VS2022_CL_ARM -G "Visual Studio 17 2022" -A ARM64 %*
3
+ echo Open VS2022_CL_ARM\JoltPhysics.sln to build the project.
@@ -0,0 +1,4 @@
1
+ @echo off
2
+ cmake -S . -B VS2022_CL_ARM_32BIT -G "Visual Studio 17 2022" -A ARM -DCMAKE_SYSTEM_VERSION="10.0.22621.0" -DCMAKE_CXX_COMPILER_WORKS=1 %*
3
+ echo Note that Windows 11 SDK (10.0.22621.0) is the last SDK to support 32-bit ARM, make sure you have it installed.
4
+ echo Open VS2022_CL_ARM_32BIT\JoltPhysics.sln to build the project.
@@ -0,0 +1,3 @@
1
+ @echo off
2
+ cmake -S . -B VS2022_CL_CPD -G "Visual Studio 17 2022" -A x64 -DCROSS_PLATFORM_DETERMINISTIC=ON %*
3
+ echo Open VS2022_CL_CPD\JoltPhysics.sln to build the project.
@@ -0,0 +1,3 @@
1
+ @echo off
2
+ cmake -S . -B VS2022_CL_Double -G "Visual Studio 17 2022" -A x64 -DDOUBLE_PRECISION=ON %*
3
+ echo Open VS2022_CL_Double\JoltPhysics.sln to build the project.
@@ -0,0 +1,3 @@
1
+ @echo off
2
+ cmake -S . -B VS2022_CL_NO_OBJ_STR -G "Visual Studio 17 2022" -A x64 -DENABLE_OBJECT_STREAM=OFF %*
3
+ echo Open VS2022_CL_NO_OBJ_STR\JoltPhysics.sln to build the project.
@@ -0,0 +1,10 @@
1
+ @echo off
2
+ cmake -S . -B VS2022_Clang -G "Visual Studio 17 2022" -A x64 -T ClangCL %*
3
+ echo:
4
+ echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5
+ echo Make sure to install:
6
+ echo - C++ Clang Compiler for Windows 12.0.0+
7
+ echo - C++ Clang-cl for v143+ build tools (x64/x86)
8
+ echo Using the Visual Studio Installer
9
+ echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
+ echo Open VS2022_Clang/JoltPhysics.sln to build the project.
@@ -0,0 +1,10 @@
1
+ @echo off
2
+ cmake -S . -B VS2022_Clang_CPD -G "Visual Studio 17 2022" -A x64 -T ClangCL -DCROSS_PLATFORM_DETERMINISTIC=ON %*
3
+ echo:
4
+ echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5
+ echo Make sure to install:
6
+ echo - C++ Clang Compiler for Windows 12.0.0+
7
+ echo - C++ Clang-cl for v143+ build tools (x64/x86)
8
+ echo Using the Visual Studio Installer
9
+ echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
+ echo Open VS2022_Clang_CPD/JoltPhysics.sln to build the project.
@@ -0,0 +1,10 @@
1
+ @echo off
2
+ cmake -S . -B VS2022_Clang_Double -G "Visual Studio 17 2022" -A x64 -T ClangCL -DDOUBLE_PRECISION=YES %*
3
+ echo:
4
+ echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5
+ echo Make sure to install:
6
+ echo - C++ Clang Compiler for Windows 12.0.0+
7
+ echo - C++ Clang-cl for v143+ build tools (x64/x86)
8
+ echo Using the Visual Studio Installer
9
+ echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
+ echo Open VS2022_Clang_Double/JoltPhysics.sln to build the project.
@@ -0,0 +1,5 @@
1
+ @echo off
2
+ cmake -S . -B VS2022_UWP -G "Visual Studio 17 2022" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 %*
3
+ echo If cmake failed then be sure to check the "Universal Windows Platform development" checkbox in the Visual Studio Installer
4
+ echo Open VS2022_UWP\JoltPhysics.sln to build the project.
5
+ echo Note that none of the sample applications are available for the Universal Windows Platform (use cmake_vs2022_cl.bat instead).
@@ -0,0 +1,5 @@
1
+ @echo off
2
+ cmake -S . -B VS2022_UWP_ARM -G "Visual Studio 17 2022" -A ARM64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 %*
3
+ echo If cmake failed then be sure to check the "Universal Windows Platform development" checkbox in the Visual Studio Installer
4
+ echo Open VS2022_UWP_ARM\JoltPhysics.sln to build the project.
5
+ echo Note that none of the sample applications are available for the Universal Windows Platform (use cmake_vs2022_cl_arm.bat instead).
@@ -0,0 +1,3 @@
1
+ @echo off
2
+ cmake -S . -B VS2026_CL -G "Visual Studio 18 2026" -A x64 %*
3
+ echo Open VS2026_CL\JoltPhysics.slnx to build the project.
@@ -0,0 +1,3 @@
1
+ @echo off
2
+ cmake -S . -B VS2026_CL_CPD -G "Visual Studio 18 2026" -A x64 -DCROSS_PLATFORM_DETERMINISTIC=ON %*
3
+ echo Open VS2026_CL_CPD\JoltPhysics.sln to build the project.
@@ -0,0 +1,3 @@
1
+ @echo off
2
+ cmake -S . -B VS2026_CL_Double -G "Visual Studio 18 2026" -A x64 -DDOUBLE_PRECISION=ON %*
3
+ echo Open VS2026_CL_Double\JoltPhysics.slnx to build the project.
@@ -0,0 +1,10 @@
1
+ @echo off
2
+ cmake -S . -B VS2026_Clang -G "Visual Studio 18 2026" -A x64 -T ClangCL %*
3
+ echo:
4
+ echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5
+ echo Make sure to install:
6
+ echo - C++ Clang Compiler for Windows 20+
7
+ echo - MSBuild support for LLVM (clang-cl) toolset
8
+ echo Using the Visual Studio Installer
9
+ echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
+ echo Open VS2026_Clang/JoltPhysics.sln to build the project.
@@ -0,0 +1,10 @@
1
+ @echo off
2
+ cmake -S . -B VS2026_Clang_CPD -G "Visual Studio 18 2026" -A x64 -T ClangCL -DCROSS_PLATFORM_DETERMINISTIC=ON %*
3
+ echo:
4
+ echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5
+ echo Make sure to install:
6
+ echo - C++ Clang Compiler for Windows 20+
7
+ echo - MSBuild support for LLVM (clang-cl) toolset
8
+ echo Using the Visual Studio Installer
9
+ echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
+ echo Open VS2026_Clang_CPD/JoltPhysics.sln to build the project.
@@ -0,0 +1,10 @@
1
+ @echo off
2
+ cmake -S . -B VS2026_Clang_Double -G "Visual Studio 18 2026" -A x64 -T ClangCL -DDOUBLE_PRECISION=YES %*
3
+ echo:
4
+ echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5
+ echo Make sure to install:
6
+ echo - C++ Clang Compiler for Windows 20+
7
+ echo - MSBuild support for LLVM (clang-cl) toolset
8
+ echo Using the Visual Studio Installer
9
+ echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
+ echo Open VS2026_Clang_Double/JoltPhysics.sln to build the project.
@@ -0,0 +1,19 @@
1
+ #!/bin/sh
2
+
3
+ if [ -z $1 ]
4
+ then
5
+ BUILD_TYPE=Debug
6
+ else
7
+ BUILD_TYPE=$1
8
+ shift
9
+ fi
10
+
11
+ BUILD_DIR=MinGW_$BUILD_TYPE
12
+
13
+ echo Usage: ./cmake_windows_mingw.sh [Configuration]
14
+ echo "Possible configurations: Debug (default), Release, Distribution"
15
+ echo Generating Makefile for build type \"$BUILD_TYPE\" in folder \"$BUILD_DIR\"
16
+
17
+ cmake -S . -B $BUILD_DIR -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=$BUILD_TYPE "${@}"
18
+
19
+ echo Compile by running \"cmake --build $BUILD_DIR -j $(nproc)\"
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+
3
+ cmake -S . -B XCode_iOS -DTARGET_HELLO_WORLD=OFF -DTARGET_PERFORMANCE_TEST=OFF -DCMAKE_SYSTEM_NAME=iOS -GXcode
4
+ open XCode_iOS/JoltPhysics.xcodeproj
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+
3
+ cmake -S . -B XCode_MacOS -GXcode -D"CMAKE_OSX_ARCHITECTURES=x86_64;arm64"
4
+ open XCode_MacOS/JoltPhysics.xcodeproj
@@ -0,0 +1,34 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>CFBundleDevelopmentRegion</key>
6
+ <string>English</string>
7
+ <key>CFBundleExecutable</key>
8
+ <string>$(EXECUTABLE_NAME)</string>
9
+ <key>CFBundleGetInfoString</key>
10
+ <string></string>
11
+ <key>CFBundleIconFile</key>
12
+ <string>icon.icns</string>
13
+ <key>CFBundleIdentifier</key>
14
+ <string>com.joltphysics.joltviewer</string>
15
+ <key>CFBundleInfoDictionaryVersion</key>
16
+ <string>6.0</string>
17
+ <key>CFBundleLongVersionString</key>
18
+ <string>1.0</string>
19
+ <key>CFBundleName</key>
20
+ <string>JoltViewer</string>
21
+ <key>CFBundlePackageType</key>
22
+ <string>APPL</string>
23
+ <key>CFBundleShortVersionString</key>
24
+ <string>1.0</string>
25
+ <key>CFBundleSignature</key>
26
+ <string>????</string>
27
+ <key>CFBundleVersion</key>
28
+ <string>1.0</string>
29
+ <key>CSResourcesFileMapped</key>
30
+ <true/>
31
+ <key>NSHumanReadableCopyright</key>
32
+ <string></string>
33
+ </dict>
34
+ </plist>
@@ -0,0 +1,34 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>CFBundleDevelopmentRegion</key>
6
+ <string>English</string>
7
+ <key>CFBundleExecutable</key>
8
+ <string>$(EXECUTABLE_NAME)</string>
9
+ <key>CFBundleGetInfoString</key>
10
+ <string></string>
11
+ <key>CFBundleIconFile</key>
12
+ <string>icon.icns</string>
13
+ <key>CFBundleIdentifier</key>
14
+ <string>com.joltphysics.samples</string>
15
+ <key>CFBundleInfoDictionaryVersion</key>
16
+ <string>6.0</string>
17
+ <key>CFBundleLongVersionString</key>
18
+ <string>1.0</string>
19
+ <key>CFBundleName</key>
20
+ <string>Samples</string>
21
+ <key>CFBundlePackageType</key>
22
+ <string>APPL</string>
23
+ <key>CFBundleShortVersionString</key>
24
+ <string>1.0</string>
25
+ <key>CFBundleSignature</key>
26
+ <string>????</string>
27
+ <key>CFBundleVersion</key>
28
+ <string>1.0</string>
29
+ <key>CSResourcesFileMapped</key>
30
+ <true/>
31
+ <key>NSHumanReadableCopyright</key>
32
+ <string></string>
33
+ </dict>
34
+ </plist>
@@ -0,0 +1,34 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>CFBundleDevelopmentRegion</key>
6
+ <string>English</string>
7
+ <key>CFBundleExecutable</key>
8
+ <string>$(EXECUTABLE_NAME)</string>
9
+ <key>CFBundleGetInfoString</key>
10
+ <string></string>
11
+ <key>CFBundleIconFile</key>
12
+ <string></string>
13
+ <key>CFBundleIdentifier</key>
14
+ <string>com.joltphysics.unittests</string>
15
+ <key>CFBundleInfoDictionaryVersion</key>
16
+ <string>6.0</string>
17
+ <key>CFBundleLongVersionString</key>
18
+ <string>1.0</string>
19
+ <key>CFBundleName</key>
20
+ <string>UnitTests</string>
21
+ <key>CFBundlePackageType</key>
22
+ <string>APPL</string>
23
+ <key>CFBundleShortVersionString</key>
24
+ <string>1.0</string>
25
+ <key>CFBundleSignature</key>
26
+ <string>????</string>
27
+ <key>CFBundleVersion</key>
28
+ <string>1.0</string>
29
+ <key>CSResourcesFileMapped</key>
30
+ <true/>
31
+ <key>NSHumanReadableCopyright</key>
32
+ <string></string>
33
+ </dict>
34
+ </plist>
@@ -0,0 +1,13 @@
1
+ set -e
2
+ if [ -z $1 ]
3
+ then
4
+ echo "Need to specify installation diretory"
5
+ exit
6
+ fi
7
+
8
+ VULKAN_TEMP=/tmp/vulkan_sdk_install
9
+ mkdir ${VULKAN_TEMP}
10
+ curl -L -o ${VULKAN_TEMP}/vulkan_sdk.dmg https://sdk.lunarg.com/sdk/download/latest/mac/vulkan_sdk.dmg?Human=true
11
+ unzip ${VULKAN_TEMP}/vulkan_sdk.dmg -d ${VULKAN_TEMP}
12
+ ${VULKAN_TEMP}/vulkansdk-macOS*.app/Contents/MacOS/vulkansdk-macOS* --root $1 --accept-licenses --default-answer --confirm-command install
13
+ rm -rf ${VULKAN_TEMP}
@@ -0,0 +1,4 @@
1
+ wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
2
+ sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-noble.list http://packages.lunarg.com/vulkan/lunarg-vulkan-noble.list
3
+ sudo apt update
4
+ sudo apt install vulkan-sdk