
Examples Basics First triangleīasic and verbose example for getting a colored triangle rendered to the screen using Vulkan. While still work-in-progress, if you're interested in a more proper way of synchronization in Vulkan, please take a look at that branch. I'm currently reworking this in the this branch. This is a heavy operation and is suboptimal in regards to having CPU and GPU operations run in parallel. Synchronization in the master branch currently isn't optimal und uses vkDeviceQueueWaitIdle at the end of each frame. The primary shader language used here is GLSL but thanks to an external contribution you'll also find HLSL shader sources. This makes it possible to use different shader languages by compiling them to that bytecode format. Vulkan consumes shaders in an intermediate representation called SPIR-V. Note that some examples require specific device features, and if you are on a multi-gpu system you might need to use the -gl and -g to select a gpu that supports them. bw, -benchwarmup: Set warmup time for benchmark mode in seconds gl, -listgpus: Display a list of available Vulkan devices bf, -benchfilename: Set file name for benchmark results b, -benchmark: Run example in benchmark mode s, -shaders: Select shader type to use (glsl or hlsl) bt, -benchframetimes: Save frame times to benchmark results file f, -fullscreen: Start in fullscreen mode

br, -benchruntime: Set duration time for benchmark mode in seconds v, -validation: Enable validation layers This repository contains submodules for external dependencies, so when doing a fresh clone you need to clone recursively: Khronos recently made an official Vulkan Samples repository available to the public ( press release).Īs I've been involved with getting the official repository up and running, I'll be mostly contributing to that repository from now, but may still add samples that don't fit there in here and I'll of course continue to maintain these samples. A comprehensive collection of open source C++ examples for Vulkan®, the new generation graphics and compute API from Khronos.
