Giter Club home page Giter Club logo

vulkantest's Introduction

Test Vulkan demo

This is a traditional Hello World style application for the Vulkan API. It renders a rotate RGB shaded equilateral triangle.

The main difference from the examples available on the net is the creation of a separate rendering thread. This allows you to draw a window with a rotating object continuously. Whether the size or position of the window changes.

It is derived from the excellent projects of Sascha Willems, Petr Kraus, Alexander Overvoorde and Khronos for Vulkan-Hpp project.

[https://github.com/SaschaWillems/Vulkan]

[https://github.com/krOoze/Hello_Triangle.git]

[https://github.com/Overv/VulkanTutorial]

[https://github.com/KhronosGroup/Vulkan-Hpp]

Requirements

OS: Windows or Linux
Language: C++20
Build environment: (latest) Vulkan SDK (requires VULKAN_SDK variable being set)
Build environment[Windows]: Visual Studio, Cygwin, or MinGW (or IDEs running on top of them)
Build environment[Linux]: CMake compatible compiler and build system and libxcb-dev and libxcb-keysyms-dev
Build environment[MacOS]: CMake compatible compiler and build system
Build Environment[GLFW]: GLFW 3.2+ (already included as a git submodule), requires xorg-dev (or XCB) package on Linux
Build Environment[GLM]: GLM 0.9.9.9+ (already included as a git submodule),
Target Environment: installed (latest) Vulkan capable drivers (to see anything)
Target Environment: GLFW

On Unix-like environment refer to SDK docs on how to set VULKAN_SDK variable.

Adding VkSurface support for other platforms should be straightforward using the provided ones as a template for it.

Files

file description
external/glfw/ GLFW git submodule
external/glm/ GLM git submodule
src/main.cpp The app entry point, including the main() function
src/Application.cpp The app class souce code
src/CompilerMessages.h Allows to make compile-time messages shown in the compiler output
src/EnumerateScheme.h A scheme to unify usage of most Vulkan vkEnumerate* and vkGet* commands
src/ErrorHandling.h VkResult check helpers + VK_EXT_debug_utils extension related stuff
src/VulkanIntrospection.h Introspection of Vulkan entities; e.g. convert Vulkan enumerants to strings
data/shaders The vertex shader folder
.gitignore Git filter file ignoring most probable outputs messing up the local repo
.gitmodules Git submodules file describing the dependency on GLFW and GLM
CMakeLists.txt CMake makefile
LICENSE Copyright licence for this project
README.md This file

Build

First just get everything:

$ git clone --recurse-submodules https://github.com/xdcsystems/VulkanTest.git

Then, on Windows platphorm:
1. Install Vulkan SDK
2. run build-all.bat , Visual Studio 2019 solution files will be generate

In many platforms CMake style build should work just fine:

$ cmake -G"Your preferred generator"

or even just

$ cmake .

Then use make, or the generated Visual Studio *.sln, or whatever it created.

You also might want to add -DCMAKE_BUILD_TYPE=Debug.

Run

You just run it as you would anything else.

Esc does terminate the app.
Alt + Enter toggles fullscreen (might not work on some WSIplatforms).
q increasing rotate speed to left side.
e increasing rotate speed to right side.

vulkantest's People

Contributors

xdcsystems avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.