Skip to content
🔨 Simple starter code for building applications with Vulkan and C++.
C++ GLSL CMake Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
screenshots
third_party
vkstarter
.gitignore
.gitmodules
CMakeLists.txt
README.md
compile_shaders.sh

README.md

vkstarter

🔨 Simple starter code for building applications with Vulkan and C++.

screenshot

Description

This is meant to be a sort of "template" for creating Vulkan applications. It uses vulkan.hpp, which is included in LunarG's Vulkan SDK. Note that there are many checks and features that are omitted in this project that would otherwise be present in a "real" application.

By default, vkstarter simply sets up a full-screen quad, as seen in the screenshot above. For simplicity sake, vertex positions are hard-coded in the vertex shader. Push constants are used to communicate application time and window resolution to the fragment shader stage. Window resizing (and subsequent swapchain re-creation) is also enabled by default.

Tested On

  • Ubuntu 18.04
  • NVIDIA GeForce GTX 1070
  • Vulkan SDK 1.1.106.0

To Build

  1. Clone this repo and initialize submodules (GLFW):
git submodule init
git submodule update
  1. Download the Vulkan SDK for your OS. Make sure the VULKAN_SDK environment variable is defined on your system.
  2. Compile the included shader files using glslangValidator:
sh ./compile_shaders.sh
  1. Finally, from the root directory, run the following commands:
mkdir build
cd build
cmake ..
make

./VkStarter

License

Creative Commons Attribution 4.0 International License

You can’t perform that action at this time.