docs: new page with mdbook (#8342)
- Use mdbook to generate a book from collection of documents
- documents are
- copied and processed from READMEs
- original content stored in the docs_src folder
- markdeep docs transformed into embedded html
- Main logic is in script docs_src/build/run.py
@@ -0,0 +1,39 @@
|
||||
# Summary
|
||||
|
||||
- [Introduction](./dup/intro.md)
|
||||
- [Build](./dup/building.md)
|
||||
- [Build for Android on Windows](./build/windows_android.md)
|
||||
- [Contribute](./dup/contributing.md)
|
||||
- [Coding Style](./dup/code_style.md)
|
||||
- [Core Concepts](./main/README.md)
|
||||
- [Filament](./main/filament.md)
|
||||
- [Materials](./main/materials.md)
|
||||
- [Tutorials and Samples](./samples/README.md)
|
||||
- [iOS Tutorial](./samples/ios.md)
|
||||
- [Web Tutorial](./samples/web.md)
|
||||
- [Technical Notes](./notes/README.md)
|
||||
- [Versioning](./notes/versioning.md)
|
||||
- [Documentation](./dup/docs.md)
|
||||
- [Debugging](./notes/debugging.md)
|
||||
- [Metal](./notes/metal_debugging.md)
|
||||
- [Vulkan](./notes/vulkan_debugging.md)
|
||||
- [SPIR-V](./notes/spirv_debugging.md)
|
||||
- [Libraries](./notes/libs.md)
|
||||
- [bluegl](./dup/bluegl.md)
|
||||
- [bluevk](./dup/bluevk.md)
|
||||
- [filamat](./dup/filamat.md)
|
||||
- [gltfio](./dup/gltfio.md)
|
||||
- [iblprefilter](./dup/iblprefilter.md)
|
||||
- [matdbg](./dup/matdbg.md)
|
||||
- [uberz](./dup/uberz.md)
|
||||
- [Tools](./notes/tools.md)
|
||||
- [beamsplitter](./dup/beamsplitter.md)
|
||||
- [cmgen](./dup/cmgen.md)
|
||||
- [cso-lut](./dup/cso_lut.md)
|
||||
- [filamesh](./dup/filamesh.md)
|
||||
- [normal-blending](./dup/normal_blending.md)
|
||||
- [mipgen](./dup/mipgen.md)
|
||||
- [matinfo](./dup/matinfo.md)
|
||||
- [roughness-prefilter](./dup/roughness_prefilter.md)
|
||||
- [specular-color](./dup/specular_color.md)
|
||||
- [zbloat](./dup/zbloat.md)
|
||||
@@ -0,0 +1,145 @@
|
||||
# Building Filament for Android on Windows
|
||||
|
||||
## Prerequisites
|
||||
|
||||
In addition to the requirements for [building Filament on Windows](../BUILDING.md#windows), you'll
|
||||
need the Android SDK and NDK. See [Getting Started with the
|
||||
NDK](https://developer.android.com/ndk/guides/) for detailed installation instructions.
|
||||
|
||||
You'll also need [Ninja 1.8](https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages) (or
|
||||
more recent) and [Git for Windows](https://git-scm.com/download/win) to clone the repository and run
|
||||
Bash scripts.
|
||||
|
||||
Ensure the `%ANDROID_HOME%` environment variable is set to your Android SDK installation location.
|
||||
|
||||
On Windows, we require VS2019 for building the host tools. All of the following commands should be
|
||||
executed in a *Visual Studio x64 Native Tools Command Prompt for VS 2019*.
|
||||
|
||||
### A Note About Python 3
|
||||
|
||||
Python 3 is required. If CMake errors because it cannot find Python 3:
|
||||
|
||||
```
|
||||
Could NOT find PythonInterp: Found unsuitable version "1.4", but required is at least "3"
|
||||
```
|
||||
|
||||
then add the following flag to the CMake invocations:
|
||||
|
||||
```
|
||||
-DPYTHON_EXECUTABLE:FILEPATH=\path\to\python3
|
||||
```
|
||||
|
||||
## Desktop Tools
|
||||
|
||||
First, a few Filament tools need to be compiled for desktop.
|
||||
|
||||
1. From Filament's root directory, create a desktop build directory and run CMake.
|
||||
|
||||
```
|
||||
mkdir out\cmake-release
|
||||
cd out\cmake-release
|
||||
cmake ^
|
||||
-G Ninja ^
|
||||
-DCMAKE_INSTALL_PREFIX=..\release\filament ^
|
||||
-DFILAMENT_ENABLE_JAVA=NO ^
|
||||
-DCMAKE_BUILD_TYPE=Release ^
|
||||
..\..
|
||||
```
|
||||
|
||||
2. Build the required desktop host tools.
|
||||
|
||||
```
|
||||
ninja matc resgen cmgen
|
||||
```
|
||||
|
||||
The build should succeed and a `ImportExecutables-Release.cmake` file should automatically be
|
||||
created at Filament's root directory.
|
||||
|
||||
If you are going to build Filament samples you should install desktop host tools:
|
||||
|
||||
```
|
||||
ninja install
|
||||
```
|
||||
|
||||
## Build
|
||||
|
||||
1. Create the build directories.
|
||||
|
||||
```
|
||||
mkdir out\cmake-android-release-aarch64
|
||||
mkdir out\cmake-android-release-arm7
|
||||
mkdir out\cmake-android-release-x86_64
|
||||
mkdir out\cmake-android-release-x86
|
||||
```
|
||||
|
||||
2. Run CMake for each architecture.
|
||||
|
||||
```
|
||||
cd out\cmake-android-release-aarch64
|
||||
cmake ^
|
||||
-G Ninja ^
|
||||
-DCMAKE_BUILD_TYPE=Release ^
|
||||
-DCMAKE_INSTALL_PREFIX=..\android-release\filament ^
|
||||
-DCMAKE_TOOLCHAIN_FILE=..\..\build\toolchain-aarch64-linux-android.cmake ^
|
||||
..\..
|
||||
|
||||
cd out\cmake-android-release-arm7
|
||||
cmake ^
|
||||
-G Ninja ^
|
||||
-DCMAKE_BUILD_TYPE=Release ^
|
||||
-DCMAKE_INSTALL_PREFIX=..\android-release\filament ^
|
||||
-DCMAKE_TOOLCHAIN_FILE=..\..\build\toolchain-arm7-linux-android.cmake ^
|
||||
..\..
|
||||
|
||||
cd out\cmake-android-release-x86_64
|
||||
cmake ^
|
||||
-G Ninja ^
|
||||
-DCMAKE_BUILD_TYPE=Release ^
|
||||
-DCMAKE_INSTALL_PREFIX=..\android-release\filament ^
|
||||
-DCMAKE_TOOLCHAIN_FILE=..\..\build\toolchain-x86_64-linux-android.cmake ^
|
||||
..\..
|
||||
|
||||
cd out\cmake-android-release-x86
|
||||
cmake ^
|
||||
-G Ninja ^
|
||||
-DCMAKE_BUILD_TYPE=Release ^
|
||||
-DCMAKE_INSTALL_PREFIX=..\android-release\filament ^
|
||||
-DCMAKE_TOOLCHAIN_FILE=..\..\build\toolchain-x86-linux-android.cmake ^
|
||||
..\..
|
||||
```
|
||||
|
||||
3. Build.
|
||||
|
||||
Inside of each build directory, run:
|
||||
|
||||
```
|
||||
ninja install
|
||||
```
|
||||
|
||||
## Generate AAR
|
||||
|
||||
The Gradle project used to generate the AAR is located at `<filament>\android`.
|
||||
|
||||
```
|
||||
cd android
|
||||
gradlew -Pcom.google.android.filament.dist-dir=..\out\android-release\filament assembleRelease
|
||||
copy filament-android\build\outputs\aar\filament-android-release.aar ..\..\out\
|
||||
```
|
||||
|
||||
If you're only interested in building for a single ABI, you'll need to pass a `com.google.android.filament.abis` parameter:
|
||||
|
||||
```
|
||||
gradlew -Pcom.google.android.filament.dist-dir=..\out\android-release\filament assembleRelease -Pcom.google.android.filament.abis=x86
|
||||
```
|
||||
|
||||
If you're only interested in building SDK, you may skip samples build by passing a `com.google.android.filament.skip-samples` flag:
|
||||
|
||||
```
|
||||
gradlew -Pcom.google.android.filament.dist-dir=..\out\android-release\filament assembleRelease -Pcom.google.android.filament.skip-samples
|
||||
```
|
||||
|
||||
|
||||
`filament-android-release.aar` should now be present at `<filament>\out\filament-android-release.aar`.
|
||||
|
||||
See [Using Filament's AAR](../README.md) for usage instructions.
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
Do not manually edit any file in this folder. They have been autogenerated
|
||||
by a script.
|
||||
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 236 KiB |
|
After Width: | Height: | Size: 199 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 158 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 322 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 110 KiB |
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 461 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 320 KiB |
|
After Width: | Height: | Size: 120 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 9.3 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 9.8 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 186 KiB |
|
After Width: | Height: | Size: 7.4 MiB |
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 814 B |
|
After Width: | Height: | Size: 349 B |
|
After Width: | Height: | Size: 170 B |
|
After Width: | Height: | Size: 84 B |
|
After Width: | Height: | Size: 4.9 MiB |
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 215 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 84 KiB |
|
After Width: | Height: | Size: 2.4 MiB |
|
After Width: | Height: | Size: 104 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 741 KiB |
|
After Width: | Height: | Size: 452 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 324 KiB |
|
After Width: | Height: | Size: 562 KiB |
|
After Width: | Height: | Size: 308 KiB |
|
After Width: | Height: | Size: 300 KiB |
|
After Width: | Height: | Size: 210 KiB |
|
After Width: | Height: | Size: 215 KiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 354 KiB |
|
After Width: | Height: | Size: 811 KiB |
|
After Width: | Height: | Size: 235 KiB |
|
After Width: | Height: | Size: 239 KiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 588 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 817 KiB |
|
After Width: | Height: | Size: 628 KiB |
|
After Width: | Height: | Size: 660 KiB |
|
After Width: | Height: | Size: 673 KiB |
|
After Width: | Height: | Size: 489 KiB |