/VulkanFun

Playing around with Vulkan...

Primary LanguageC++

Vulkan Fun

This is heavily based on this tutorial, all the credit goes to this guy. Sry for 2k lines in one file. I'm working on it... =)
This was part of an exercise for a University course Introduction to Computer Graphics.

General

Since this is build completely in Linux it can't be assured it will run on Windows or OSX. But shouldn't be too hard to modify the project to your OS.

Dependencies

In order to build and run this, you'll need the following libraries and SDKs. As mentioned above this was built on Linux, specifically on ArchLinux. You need to install:

  • A Vulkan compatible graphics card and drivers. Refer to your OS and vendor for how-to install them. For ArchLinux it should be this:
    • $ sudo pacman -S vulkan-intel for Intel graphics (in my case)
    • $ sudo pacman -S vulkan-radeon for Radeon cards
    • Nvidia should have Vulkan support in their proprietary driver, which should be $ sudo pacman -S nvidia-utils.
  • The Vulkan SDK $ sudo pacman -S vulkan-devel
  • GLFW Library $ sudo pacman -S glfw-x11
  • GLSL $ sudo pacman -S glslang
  • GLM $ sudo pacman -S glm
  • cmake version >3.10
  • g++ version >7.3.0

For Ubuntu 20.04 one hast to install these packages:

sudo apt-get install libglfw3-dev libglm-dev glslang-dev glslang-tools libvulkan-dev vulkan-tools libvulkan-dev vulkan-validation-layers-dev

Build and run

  • Clone the project:

git clone https://github.com/tylernewnoise/VulkanFun.git

  • Build the shaders:
$ cd VulkanFun
$ cd data/shaders
$ ./compileShaders.sh
  • Build the application:
$ cd VulkanFun
$ mkdir build
$ cd build
$ cmake ..
$ make
  • Run it:

$ ./VulkanFun

If everything went well you should see the earth or a gun (see below for example screenshots).

  • Interactions:
    • 'l' turns the light on/off
    • 'spacebar' starts/stops rotation
    • 'up/down' moves the camera to/away from object

Accomplishments

The example has implemented the following features (even though they are not visible):

Bugs

  • None known (which doesn't mean that there are none!).
  • Textures are mirrored.

Credits, resources, inspirations

TODO

Screenshots

gun gun