A Vulkan Renderer and 3D Model viewport. Game Engine (WIP).
- C++ compiler supporting at least C++20 standard.
- Cmake 3.28+ (tested with this)
These are the project dependencies:
imgui
with glfw and vulkan bindings. Provides immediate mode GUI capabilities.glfw
- windowing (You should be able to plug in any windowing lib like SDL) - You just need to reimplementIceWindow
class using the library. You would also handle inputs incamera.cpp
glm
- linear algebra, good compatibility with GLSL.stb
- loading images.tinygltf
- loading glTF scenes and models.Vulkan-Hpp
- C++ Bindings for Vulkan API. It is part of the LunarG Vulkan SDK since version 1.0.24 or part of Vulkan-Headers invcpkg
.
You can follow this guide for setting up dependencies:
You can install Vulkan from: LunarG
Note the install location. Run the vkcube
executable in the Bin
directory to verify a successful installation.
Copy Vulkan SDK installation path to the CMakeLists.txt
file.
Note that it might also be automatically installed by vcpkg
.
vcpkg
is used for package and dependency management.
A vcpkg.json
user manifest file is provided to help install dependencies or you can install them globally.
# run this in any folder that vcpkg.json is in.
# triplet is optional, but useful on windows
path_to_vcpkg install --triplet triplet_name
# e.g
C:/dev/vcpkg/vcpkg install --triplet x64-windows
Global install:
path_to_vcpkg install imgui[glfw-binding,vulkan-binding]:triplet_name
path_to_vcpkg install glfw3:triplet_name
path_to_vcpkg install glm:triplet_name
path_to_vcpkg install stb:triplet_name
path_to_vcpkg integrate install
For branches that make use of the shader code, you would need to compile them before use. Scripts for most platform have been provided to help in the compilation of the shaders.
Consult the shaders readme
for more information.
You would need to do this for the shaders
directories.
# for example
cd ./resources/shaders
./compile.bat
# Linux
cd ./resources/shaders
./compile
Do the following steps
Install dependencies
Compile shaders
- Generate and/or build with CMake
CMake
is used to generate project files.
If you are working with vcpkg for dependency management, you can pass the toolchain file when you call cmake to generate:
cmake -B ./build -S ./ "-DCMAKE_TOOLCHAIN_FILE=the_path_to/vcpkg/scripts/buildsystems/vcpkg.cmake"
# e.g
cmake -B ./build -S ./ "-DCMAKE_TOOLCHAIN_FILE=C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake"
This command will run vcpkg install for you if you have a vcpkg.json
file.
After configuration and generation is done, you can run
cd build
cmake build .
This will build the project.
On Windows, if you prefer working in Visual Studio, after generation is done, you can open the generated sln
file and build any target you want.
The Startup project, working directory and post build commands have been automatically configured.