Skip to content

My implementation of vulkan-tutorial.com that can load and render a 3D model using the Vulkan graphics API and C++

Notifications You must be signed in to change notification settings

Taardal/vulkan-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vulkan Tutorial

Description

My implementation of Vulkan Tutorial where you create an application that can load and render a 3D model using the Vulkan graphics API and C++.

Resources :books:

Prerequisites :vertical_traffic_light:

Getting started :runner:

Getting the code :octocat:

  • Clone the repository: git clone https://github.com/taardal/vulkan-tutorial

Installing dependencies :floppy_disk:

  • Clone submodules: git submodule update --init

Building the app :building_construction:

  • Generate build files: cmake -D BUILD_GLFW_SRC=ON -S . -B build
    • The BUILD_GLFW_SRC argument specifies that the GLFW library source code should be built as part of this project.
    • The BUILD_GLFW_SRC argument is not needed if GLFW is already installed on the system (See Installing GLFW).
  • Build the binary: cmake --build build
    • Output folder: ./bin/debug

Running the app :rocket:

  • Navigate to the output folder: cd bin/debug
  • Run the executable: ./vulkandemo

Installing the CLI

This app also features its own CLI to make it easier to do things like re-compiling the shaders, adding dependencies as git submodules and installing GLFW to the system.

Installing the CLI

Script

  • Run the install-script: ./scripts/install_cli.sh

Manual

  • Navigate to the CLI folder: cd cli
  • Generate build files: cmake -S . -B build
  • Build the binary: cmake --build build
  • Install the binary: cmake --install build
    • Installs the binary to parent project root

Running the CLI

  • Navigate back to parent project root: cd ..
  • Run the CLI: ./vd
NAME:
    vd - Vulkandemo CLI

USAGE:
    vd [global options] command [command options] [arguments...]

COMMANDS:
    build          Build project
    glfw           Install GLFW on local machine
    lib:add        Add library (git submodule)
    lib:install    Install libraries (git submodules)
    run, r         Run project
    shaders        Compile shaders
    help, h        Show available commands and options

GLOBAL OPTIONS:
    --help, -h    Show help

Installing GLFW

The GLFW library can be installed on the system to decrease build times by not having to build it as part of building the app.

Installing the library

Docs: Compiling GLFW

  • Navigate to the glfw folder: cd lib/glfw
  • Generate build files: cmake -S . -B build
  • Build the library: cmake --build build
  • Install the library: cmake --install build

Install destinations:

Mac/Linux
  Header: /usr/local/include/GLFW
  Binary: /usr/local/lib/cmake/glfw3

Windows
  x64: C:\Program Files\GLFW
  x86: C:\Program Files (x86)\GLFW

About

My implementation of vulkan-tutorial.com that can load and render a 3D model using the Vulkan graphics API and C++

Topics

Resources

Stars

Watchers

Forks