HorstBaerbel / vsvr

The very simple Vulkan renderer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VSVR - The very simple Vulkan renderer (WIP!)

Build

This a very simple and basic Vulkan rendering framework / library that abstracts some of the Vulkan objects and functions using C++14 in one project without any unecessary submodules / libraries. It was supposed to make my life developing simple Vulkan applications easier, but don't expect too much from it. Use as you like according to the MIT LICENSE.

How to build?

Prequisites

From the command line

  • Navigate to the vsvr folder, then:
mkdir build && cd build
cmake ..
make -j $(grep -c '^processor' /proc/cpuinfo 2>/dev/null)

From Visual Studio Code

  • Must: Install the "C/C++ extension" by Microsoft.
  • Recommended: If you want intellisense functionality install the "C++ intellisense" extension by austin.
  • Must: Install the "CMake Tools" extension by vector-of-bool.
  • Restart / Reload Visual Studio Code if you have installed extensions.
  • Open the vsvr folder using "Open folder...".
  • Choose "Unspecified" as your active CMake kit if asked. It then should be autodetected correctly.
  • You should be able to build now using F7 and build + run using F5.

How to use?

  • Clone the library as a submodule to your project:
    git submodule add https://github.com/HorstBaerbel/vsvr vsvr

  • Adjust your CMakeLists.txt:

    • Include the library subdirectory in your project:
      add_subdirectory(vsvr)
    • Add shader compilation:
      set(SHADER_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/shaders")
      LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/vsvr")
      include(compile_shaders REQUIRED)
      (here your shaders will be read and written to "./shaders")
    • Add a dependency to shader compilation to your project:
      add_dependencies(<YOUR_PROJECT> shaders)
    • Add the library to your projects include paths:
      target_include_directories(<YOUR_PROJECT> PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/vsvr")
    • Make sure the library is linked to your project:
      target_link_libraries(<YOUR_PROJECT> vsvr)

About

The very simple Vulkan renderer

License:MIT License


Languages

Language:C++ 95.2%Language:CMake 4.6%Language:C 0.3%