Add wayland-direct window mode
window: direct: Fix formatting. Don't comment print.
Revert display resolutions change
xrgears is a stand alone VR demo using OpenHMD for tracking and Vulkan with several window system back ends for rendering.
The demo is able to utilize full screen extended mode on XCB and 2 Wayland backends using different protocols.
Direct Mode is achieved through drm-lease utilizing VK_EXT_direct_mode_display
and related extensions.
It can also run directly on KMS, which is currently just implemented for Intel and could be impossible on the current release due to regression issues in mesa. The KMS back end is taken from vkcube.
This project is a highly modified fork of Sascha Willem's excellent Vulkan Samples.
The Vulkan code is organized in a header only C++ library, which is named vitamin-k
.
OpenHMD, Vulkan, Assimp, GLM / GLI
xcb, xcb-keysyms, xcb-randr
wayland-client,wayland-scanner,wayland-protocols
gbm, libdrm
This repo needs to be cloned recursively
git clone --recursive URL
If you forgot that you can fetch the assets module like so
git submodule init
git submodule update
cmake .
make -j9
Meson build WIP.
Options:
-s, --size WxH Size of the output window (default: 1280x720)
-f, --fullscreen Run fullscreen. Optinally specify display and mode.
-d, --display D Display to fullscreen on. (default: 0)
-m, --mode M Mode for fullscreen (used in wayland-shell only) (default: 0)
-w, --window WS Window system to use (default: auto)
[xcb, wayland, wayland-shell, kms, direct]
-g, --gpu GPU GPU to use (default: 0)
--hmd HMD HMD to use (default: 0)
--format F Color format to use (default: VK_FORMAT_B8G8R8A8_UNORM)
--presentmode M Present mode to use (default: VK_PRESENT_MODE_FIFO_KHR)
--list-gpus List available GPUs
--list-displays List available displays
--list-hmds List available HMDs
--list-formats List available color formats
--list-presentmodes List available present modes
--disable-overlay Disable text overlay
--mouse-navigation Use mouse instead of HMD for camera control.
--distortion HMD lens distortion (default: panotools)
[none, panotools, vive]
-v, --validation Run Vulkan validation
-h, --help Show this help
./bin/xrgears -w xcb -d 1
./bin/xrgears -w wayland --distortion vive
./bin/xrgears --list-displays --window direct
./bin/xrgears --window direct --distortion vive
./bin/cube --format VK_FORMAT_B8G8R8A8_SRGB
./bin/cube --list-presentmodes
MIT