robbykraft / Vulkan

learning Vulkan

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vulkan from scratch

I'm learning Vulkan. Here are some resources that I'm using:

Usage

All numbered folders are self-contained projects. Navigate into any folder and type make and then run the program (usually ./a.out).

But, it probably will not work if you don't follow this setup.

MacOS setup

Prerequisites: Xcode command line tools. I'm using makefiles, no need to actually run Xcode or install CMake. But, I think Xcode needs to be installed anyway.

Install VulkanSDK, which installs MoltenVK. I installed Vulkan into /Library

my folder structure looked like: /Library/VulkanSDK/1.3.268.1/macOS/include/vulkan/vulkan.h

system environment variables

This is important. For some reason I need to keep running this after opening every new terminal.

export DYLD_LIBRARY_PATH=/Library/VulkanSDK/1.3.268.1/macOS/lib

I also ran these. Not sure how important these are.

export VK_ICD_FILENAMES=/Library/VulkanSDK/1.3.268.1/MoltenVK/dylib/macOS/MoltenVK_icd.json
export VULKAN_SDK=/Library/VulkanSDK/1.3.268.1

source

dependencies

my pkgconfig was messed up. I had to install

brew install zeromq
brew install pkgconfig

Not needed for all dev environments, but I will use GLFW and GLM, so, install these:

brew install glfw
brew install glm

due to unrelated issues that I fixed, I ran this, but I suspect that I entirely did not need to:

brew install glew glfw3
brew install --cask xquartz

project setup

Every project has an .env file. You have to modify it to match the location of the Vulkan SDK on your computer.

Windows, Linux setup

not yet

About

learning Vulkan


Languages

Language:C++ 97.8%Language:Makefile 1.2%Language:GLSL 0.7%Language:Shell 0.3%