-
-
Notifications
You must be signed in to change notification settings - Fork 99
getting started
This page provides guidance on getting a workstation setup to work with Kohi.
You will need to have Clang and the Vulkan SDK installed:
- Clang: https://releases.llvm.org/download.html
- Vulkan SDK: https://vulkan.lunarg.com/
- Git (Windows: https://git-scm.com/download/win), (Mac/Linux: install this using your preferred package manager)
I also use VS Code in the series: https://code.visualstudio.com/download
In order to get environment variables to exist, you'll need to run source /path/to/vulkan/1.x.xxx.x/setup-env/sh
. For example, if following the video series and the Vulkan SDK is placed in the user directory, you'd run source /vulkan/1.2.162.1/setup-env.sh
, changing out the version number, of course, for the one you have installed.
However, running this only makes those changes to the currently open terminal. To make these variables persist across sessions, you will need to consult the documentation for the distribution you are using. As an example, for Ubuntu you would need to add the following lines to your ~/.profile
file:
if [ -d "$HOME/vulkan/1.2.162.1" ] ; then
source $HOME/vulkan/1.2.162.1/setup-env.sh
fi
Again, change the version for the version you have installed.
To download the code, run the following in command prompt or terminal:
git clone https://github.com/travisvroman/kohi
If using VS Code, open the kohi
folder in VS Code and press ctrl+shift+b
to build.
Otherwise, open a command prompt or terminal, browse to the kohi
root directory and run:
- Windows:
build-all.bat
thenpost-build.bat
- Linux:
./build-all.sh
then./post-build.sh
- Mac:
./build-all-macos.sh
then./post-build-mac.sh
.
The executables and libraries will be placed in bin
, and intermediate files will be placed in obj
.
See the setup videos in the series for Windows or Linux for details.
There are also clean scripts available: clean-all.bat
(Windows), clean-all.sh
(Linux) and clean-all-mac.sh
(Mac). These wipe out associated files in the bin
and obj
folders, triggering a full compile on the next build.
If using VS Code, press F5 to run the program. Otherwise, browse to the bin
folder and run the appropriate executable file.
All Content Copyright © 2020-2022 Travis Vroman. All Rights Reserved.