50 lines
1.9 KiB
Markdown
50 lines
1.9 KiB
Markdown
# Vulk-triangle
|
|
|
|
Basic rainbow triangle rendered with Vulkan.
|
|
|
|
Created as a reference project while following the [official tutorial located here](https://docs.vulkan.org/tutorial/latest/00_Introduction.html)
|
|
|
|
## Building
|
|
|
|
A windows and linux build_script binary compiled from [this](https://git.catgirls.fish/firewire/build-script) project has been included.
|
|
You can just run that from the root of the repo with `./scripts/build_script build` (or `.\scripts\build_script.exe build` for windows) to build all release types.
|
|
|
|
Most dependencies are included through the use of CPM, however you will need to install the VulkanSDK, which can be acquired from the [official site](https://vulkan.lunarg.com/sdk/home)
|
|
|
|
On linux systems you'll likely need dependencies for GLFW.
|
|
GLFW itself is included with this project, however its a lot simpler to just install glfw through your package manager and have it handle them.
|
|
|
|
Ubuntu: `apt update && apt install libglfw3-dev`
|
|
|
|
Fedora: `dnf install glfw-devel`
|
|
|
|
Arch: `pacman -S glfw`
|
|
|
|
### Building manually
|
|
|
|
#### Linux
|
|
|
|
The normal cmake build process is all you need.
|
|
|
|
1. Make the build directory `mkdir -p build`
|
|
2. Configure the project `cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release`
|
|
3. Build! `cmake --build build`
|
|
|
|
#### Windows
|
|
|
|
1. Git clone the repo
|
|
2. Run [cmake-gui](https://cmake.org/download/)
|
|
3. Select the location you cloned the repo into as the source directory
|
|
4. Create a new directory called 'build' in the source directory and select it
|
|
as the build directory
|
|
5. Configure and generate
|
|
6. Open the generated Visual studio project
|
|
7. Right click the project in the project explorer and select 'build'
|
|
|
|
## A note for MacOS users
|
|
|
|
I do not have a MacOS system to build or test on, so building is solely up to you.
|
|
All code has been kept as cross-platform as possible so it _should_ just work,
|
|
but if you run into any issues, feel free to submit a pull request with an updated
|
|
codebase or readme with compilation instructions.
|