Skip to content

Tshayka/PuffinEngine

Repository files navigation

Puffin Engine - Readme

Install vulkan on Linux GitHub license

Screenshots

vulkan-tutorial

vulkan-tutorial

Install graphic cards

Intel

  • $ sudo apt install libxcb1-dev xorg-dev
  • $ sudo apt install mesa-vulkan-drivers vulkan-utils libegl1-mesa-dev

Nvidia

  • $ sudo apt-get purge nvidia*
  • $ sudo add-apt-repository ppa:graphics-drivers/ppa
  • $ sudo apt upgrade
  • $ sudo apt install nvidia-graphics-drivers-390
  • $ sudo apt-mark hold nvidia-390
  • $ lsmod | grep nvidia

Install vulkan on Linux

  • Add necessary libraries: $ sudo apt install libglm-dev cmake libxcb-dri3-0 libxcb-present0 libpciaccess0
    libpng-dev libxcb-keysyms1-dev libxcb-dri3-dev libx11-dev
    libmirclient-dev libwayland-dev libxrandr-dev
  • You may also need: $ sudo apt install libxcursor-dev libxinerama-dev libxi-dev
  • Download Vulkan file (vulkansdk-linux-x86_64-1.1.xx.y.tar.gz) from LunarG
  • Unpack to home directory: $ tar -xzf /home/user/Downloads/vulkan-sdk.tar.gz
  • Change your directory: $ cd /home/user/vulkan/1.1.xx.y/
  • Run install script: $ ./build_samples.sh

Set environmental variables

You must add them inside working directory, because they won't be global:

  • $ export VULKAN_SDK=/home/user/vulkan/1.1.xx.y/x86_64
  • $ export PATH=$VULKAN_SDK/bin:$PATH
  • $ export LD_LIBRARY_PATH=$VULKAN_SDK/lib:$LD_LIBRARY_PATH
  • $ export VK_LAYER_PATH=$VULKAN_SDK/etc/explicit_layer.d

Check vulkan

  • $ vulkaninfo | less
  • $ printenv

Run example

  • $ cd /home/user/vulkan/1.1.xx.y/examples
  • $ mkdir build
  • $ cd build
  • $ cmake ..
  • $ make
  • $ ./cube

Multithread

If you want use multithreaded command buffer, you must turn off validation layers in "ErrorCheck.cpp" file, by "BUILD_ENABLE_VULKAN_DEBUG" value to '0'.

Building and running

The platform scripts configure CMake, build the PuffinEngine target, and start the application from the build directory so shaders and assets resolve correctly.

Windows

Requirements:

  • CMake
  • Visual Studio C++ Build Tools 2019 or newer
  • Vulkan SDK installed under C:\VulkanSDK or exposed through VULKAN_SDK

Run:

  • Debug: win64debug.bat
  • Release: win64release.bat

Linux

Requirements:

  • CMake and a C++17 compiler
  • Vulkan SDK. If VULKAN_SDK is not set, the scripts try the newest SDK under $HOME/vulkan/<version>/x86_64.

Run:

  • Debug: ./linux64debug.sh
  • Release: ./linux64release.sh

The app opens to a simple Start/Quit menu. Press Start to load the game scene.

Running tests

Tests are wired through CMake but are currently disabled in the top-level build file.

Compiling shaders

  • $ ./puffinEngine/shaders/compile.sh

Third party libraries

The following third party packages and assets are included, and carry, their own copyright notices and license terms:

License

The source code and the documentation are licensed under the GPLv3.

About

Vulkan API Engine

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages