Skip to content

About

A study project for vulkan rendering

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

59 Commits

Folders and files

Repository files navigation

vulkan_project

Modern C++ Vulkan study project with GLTF support and RAII-style resource management.

License: MIT Vulkan C++ CMake

Features

Core Graphics

  • Vulkan 1.3 pipeline with MSAA anti-aliasing
  • Dynamic viewport and scissor states
  • Depth testing and color blending

Memory Management

  • VMA (Vulkan Memory Allocator) integration (via class VMA look at vma.h)
  • RAII wrappers with automatic cleanup
  • template enable_destruct_stack<> for deterministic resource cleanup look at utility.h

Modern C++

  • std::print
  • std::source_location
  • constexpr
  • std::ranges
  • aggregate initialization
  • CRTP

GLTF Support

  • Implemented GLTF loading in gltf_loader

Preview

./vulkan_project #default start, same as './vulkan_project DamagedHelmet.glb 2.0'

Running screen shot

./vulkan_project Duck.glb 0.01

Duck

Quick Start

Requirements

  • CMake 3.20+

  • Vulkan SDK 1.3+

  • glm 1.0+

  • GLFW 3.0+

  • Boost 1.70+ (using boost::stacktrace)

  • Tinygltf 2.0+

  • Recent Clang (e.g., 16, 17)

  • Requirements install

  # this is a MSYS2 Requirements install guide, other package managers are similar
  pacman -S mingw-w64-clang-x86_64-clang \
  mingw-w64-clang-x86_64-cmake \
  mingw-w64-clang-x86_64-boost \
  mingw-w64-clang-x86_64-boost-libs \
  mingw-w64-clang-x86_64-vulkan-headers \
  mingw-w64-clang-x86_64-vulkan-loaders \
  mingw-w64-clang-x86_64-vulkan-memory-allocator \
  mingw-w64-clang-x86_64-vulkan-validation-layers \
  mingw-w64-clang-x86_64-glfw \
  mingw-w64-clang-x86_64-glm

Building

    git clone https://github.com/YzK0741/vulkan_project.git
    cd vulkan_project
    mkdir build
    cd build
    cmake .. -DCMAKE_BUILD_TYPE=Release
    cmake --build .
    ./vulkan_project [model.glb] [scale_factor] # execute with no argument is same as './vulkan_project DamagedHelmet.glb 2.0'

If you want to try it yourself you can look up the main.cpp, the code is designed to be straightforward.

Current Limitations

Platform Support

  • Currently Windows only (MSYS2/Clang)

Constant Pipeline

PBR is not ready

May kill the gpu driver

Visions

CreateInfo-driven construction

Dynamic pipeline creating

PBR-NBR mixed rendering

Better GLTF loading

Concepts and template based scene graph binding

License

MIT, look at LICENSE

PRs and issues are welcome! Your questions and feedback are highly valuable to me :-)

About

A study project for vulkan rendering

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages