Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions docs/building_and_running.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
The recommended build system is CMake (version 3.20 and above). This repo supports both in-tree, and out-of-tree builds.
The recommended generator is `Visual Studio 2022` for Windows and `Ninja` for Linux, but others are also supported.

Binaries are written to `<build-dir>/bin` and libraries to `<build-dir>/lib`.
Binaries and libraries are written to slightly different directories depending on whether you're using a multi-config generator or not:

* For multi-config generators like Visual Studio:
* Binaries are written to `<build-dir>/bin/Debug` or `<build-dir>/bin/Release` depending on the chosen configuration
* Libraries are written to `<build-dir>/lib/Debug` or `<build-dir>/lib/Release` depending on the chosen configuration
* For non-multi-config generators like Ninja:
* Binaries are written to `<build-dir>/bin`
* Libraries are written to `<build-dir>/lib`

Shaders are also written to `<build-dir>`, but prefixed with their path and the format. For example:

Expand All @@ -17,6 +24,8 @@ Binaries have prefixes indicating the target graphics API and shader format:

Build instructions vary slightly depending on the host and target platforms.

Binaries are prefixed with `vk_` when compiling with Vulkan support enabled and `dx12_` when compiling with DirectX12 support enabled.

## Prerequisites

### DXC
Expand Down Expand Up @@ -70,7 +79,7 @@ cmake -B build -G "Visual Studio 16 2019" -A x64

Open `build\BigWheels.sln` and build.

Built binaries are written to `build\bin`.
Built binaries are written to `build\bin\Debug` or `build\bin\Release` depending on your configuration.

**Note: there is an outstanding [issue](https://github.com/google/bigwheels/issues/97) around duplicate targets in VS solutions which may cause build failures when building many shader targets in parallel. As a temporary workaround, you can re-trigger the build and it will eventually work.**

Expand Down
42 changes: 42 additions & 0 deletions projects/gltf_basic_materials/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# gltf_basic_materials
Comment thread
footballhead marked this conversation as resolved.
Comment thread
footballhead marked this conversation as resolved.

This sample loads a scene with `ppx::scene::GltfLoader` and renders it.

After building, run `gltf_basic_materials` for the desired API in your build directory. E.g. for Vulkan:

```sh
vk_gltf_basic_materials
```

By default, this will load `//assets/scene_renderer/scenes/tests/gltf_test_basic_materials.glb`. You can change which scene to load using the `--gltf-scene-asset` option:

```sh
vk_gltf_basic_materials --gltf-scene-asset basic/models/altimeter/altimeter.gltf
```

This loads and renders `//assets/basic/models/altimeter/altimeter.gltf`. Notice that the provided path must be relative to one of the following directories:

* `//assets/`
* `//third_party/assets/`
* Any path provided via `--extra-assets-path`

## glTF-Sample-Assets

Since BigWheels does not provide many glTF scenes, it is recommended to test changes against [KhronosGroup/gltf-Sample-Assets](https://github.com/KhronosGroup/glTF-Sample-Assets).

First, clone the repository. This does not have to be in the BigWheels checkout:

```sh
git clone https://github.com/KhronosGroup/glTF-Sample-Assets
```

Second, run `gltf_basic_materials` with the desired scene.

```sh
vk_gltf_basic_materials --gltf-scene-asset Box/glTF/Box.gltf --extra-assets-path some/path/to/glTF-Sample-Assets/Models
```

Notice that we provide:

* `--extra-assets-path` which points to the `Models` directory in the location of the glTF-Sample-Assets clone
* `--gltf-scene-asset` to load the Box model.
7 changes: 7 additions & 0 deletions src/ppx/scene/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Scene Graph

This directory contains implementations for scene graph loading and rendering.

Of note is the `GltfLoader` class in `scene_gltf_loader.cpp`. This class can parse a `.gltf` file and return a renderable `Scene`.

To test changes to this implementation, run the `gltf_basic_materials` sample in `//projects/gltf_basic_materials`.
Loading