Skip to content

infapi00/vkdf

 
 

Repository files navigation

A wrapper over the Vulkan API to simplify creation of simple demos plus a
collection of demo samples.

Build requirements
------------------------------------

You need the following dependencies installed on your system:

- Glib
- GLFW3 (with Vulkan support)
- glm
- Vulkan SDK (Vulkan headers and loader)
- glslangValidator

In Ubuntu, these are provided by the following packages:

- Glib:             libglib2.0-dev
- glm:              libglm-dev

You need a version of GLFW3 that supports Vulkan. It may be possible that
your distro doesn't provide it yt, in that case you will need to build it
from sources [1] (be sure to configure th build so it produces a shared
library).

The Vulkan SDK can be obtained from the LunarG website [2].

The glslangValidator binary for Linux is included under external/glslang/
for convenience. A more up-to-date binary can be obtained by building it
from source code [3], but this version is sufficient to compile the shaders
included in this repository.

[1] http://www.glfw.org/download.html
[2] https://www.lunarg.com/vulkan-sdk/
[3] https://github.com/KhronosGroup/glslang


Bulding and executing
-----------------------------------

Building:

$ ./autogen.sh
$ make

Executing:

You will need a valid Vulkan driver for your target GPU in order to execute
any of the demos. Your distro may not be providing this yet, but there are open
source Mesa Vulkan drivers for Linux for Intel and AMD GPUs available that you
can built from sources.

If you have a compatible Vulkan driver installed but the Vulkan loader doesn't
it you may need to indicate its location via the VK_ICD_FILENAMES environment
variable:

$ export VK_ICD_FILENAMES="<path-to-mesa-install-dir>/intel_icd.x86_64.json"

The build will produce a shared library that demos will dynamically link
against at run-time. Unless you install the library to a path visible to
the dynamic linker you will need to include it in the LD_LIBRARY_PATH. For
example, to run the demos without installing at all, from the root of the
repository execute the following:

$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/framework/.libs

All the demos are under the demos/ directory. For example, to execute the
'triangle' demo:

$ cd demos/triangle
$ ./triangle

Enjoy!

About

A collection of Vulkan demos

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 85.8%
  • Shell 11.3%
  • M4 1.6%
  • Makefile 1.3%