Compare commits
55
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ce68a0673 | ||
|
|
e7e42054d5 | ||
|
|
ea45e9f91b | ||
|
|
6212dccc2b | ||
|
|
449a5b5201 | ||
|
|
80e31b642a | ||
|
|
8a9d218e4f | ||
|
|
6eaaf8b770 | ||
|
|
617934e91f | ||
|
|
06d5e00fe2 | ||
|
|
377e218782 | ||
|
|
5e81b4a14d | ||
|
|
20b67a5a3c | ||
|
|
c55fec84fe | ||
|
|
acf6cc03d0 | ||
|
|
0e2d46c152 | ||
|
|
ea5d3b4185 | ||
|
|
c0a8df2a60 | ||
|
|
4bb40296fc | ||
|
|
c34e8c6961 | ||
|
|
1999e953dd | ||
|
|
40f83a2b60 | ||
|
|
8af5b3eb29 | ||
|
|
3485593e56 | ||
|
|
6c3563904c | ||
|
|
66435957bb | ||
|
|
1550a346c3 | ||
|
|
4fd6d6d816 | ||
|
|
be2027ce9a | ||
|
|
fa3313e293 | ||
|
|
7e0ea37b3c | ||
|
|
b0d9bd2ab7 | ||
|
|
42755dbb7c | ||
|
|
b9ff08d893 | ||
|
|
b997ff3a17 | ||
|
|
63aa862a67 | ||
|
|
52646de23e | ||
|
|
6e8e78b912 | ||
|
|
a7a56d0873 | ||
|
|
59a241de63 | ||
|
|
4740848ca5 | ||
|
|
651c9d5a0f | ||
|
|
bc5d80a13a | ||
|
|
b1db340227 | ||
|
|
8377d617cf | ||
|
|
f94e46ed24 | ||
|
|
aa1f3b39bd | ||
|
|
680dd34529 | ||
|
|
f301ba393a | ||
|
|
0ccc8b6239 | ||
|
|
adcf159916 | ||
|
|
4125cad44e | ||
|
|
6969e5f972 | ||
|
|
d0250abbc9 | ||
|
|
7485cd0880 |
@@ -36,33 +36,17 @@ body:
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Installation method
|
||||
description: Describe how WiVRn and OpenComposite/xrizer were installed
|
||||
placeholder: flatpak --user, flatpak, AUR, Gentoo/Guru, built from sources...
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Server Config
|
||||
description: |
|
||||
Provide the content of `config.json` for the server.
|
||||
Located in `${XDG_CONFIG_HOME-${HOME}/.config}/wivrn/config.json`
|
||||
or `~/.var/app/io.github.wivrn.wivrn/config/wivrn/config.json` for the flatpak version
|
||||
placeholder: |
|
||||
{
|
||||
"encoders": [
|
||||
{"codec": "h264"}
|
||||
]
|
||||
}
|
||||
description: Provide the content of `config.json` for the server.
|
||||
placeholder: Add the content of config.json here...
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Server Logs
|
||||
description: Provide the `wivrn-server` output.
|
||||
placeholder: |
|
||||
Add the output of the wivrn-server here.
|
||||
If more than a few lines, prefer file attachment.
|
||||
placeholder: Add the output of the wivrn-server here...
|
||||
|
||||
- type: dropdown
|
||||
id: gpu
|
||||
@@ -80,7 +64,7 @@ body:
|
||||
attributes:
|
||||
label: Vulkan Info
|
||||
description: Provide the output of `vulkaninfo --summary` command.
|
||||
placeholder: Attach the output as a file here.
|
||||
placeholder: Add the output of vulkaninfo command here...
|
||||
|
||||
- type: dropdown
|
||||
id: hmd
|
||||
@@ -106,4 +90,4 @@ body:
|
||||
attributes:
|
||||
label: ADB Logs
|
||||
description: Provide the output of `adb logcat` command.
|
||||
placeholder: Attach the output of adb logcat as a file.
|
||||
placeholder: Add the output of adb logcat command here...
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
version: "1"
|
||||
rules:
|
||||
- base: master
|
||||
upstream: WiVRn:master
|
||||
mergeMethod: hardreset
|
||||
|
||||
@@ -22,16 +22,14 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# Checkout from upstream instead of WiVRn-APK to ensure the GIT_DESC variable is set correctly
|
||||
repository: 'WiVRn/WiVRn'
|
||||
repository: 'Vindicus999/WiVRn'
|
||||
ref: ${{ github.sha }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Prepare Vulkan SDK
|
||||
uses: humbletim/setup-vulkan-sdk@286ed76c72de45dbf50c515779cf4ca2f6aa3944
|
||||
with:
|
||||
vulkan-query-version: 1.3.296.0
|
||||
vulkan-components: Glslang, SPIRV-Tools
|
||||
vulkan-use-cache: true
|
||||
#
|
||||
# - uses: actions/checkout@v4
|
||||
# with:
|
||||
# repository: 'Vindicus999/WiVRn'
|
||||
# ref: sneed
|
||||
|
||||
- name: set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
@@ -75,7 +73,9 @@ jobs:
|
||||
- name: Prepare before archiving artifacts
|
||||
run: |
|
||||
mkdir apk
|
||||
ls build/outputs/apk/
|
||||
mv $(find build/outputs/apk/ -name "*.apk") apk/
|
||||
ls apk/
|
||||
mkdir debug
|
||||
mv build/intermediates/merged_native_libs/*/*/out/lib/* debug/
|
||||
find debug -name libopenxr_loader.so -delete
|
||||
@@ -109,13 +109,15 @@ jobs:
|
||||
pattern: 'apk-*'
|
||||
merge-multiple: true
|
||||
|
||||
- name: Rename APK artifacts
|
||||
run: |
|
||||
cd apk
|
||||
for f in *.apk; do
|
||||
BASENAME=`echo ${f}|awk -F '-APK-' '{print $2}'`
|
||||
mv "${f}" "org.meumeu.wivrn-${BASENAME}"
|
||||
done
|
||||
# - name: Rename APK artifacts
|
||||
# run: |
|
||||
# cd apk
|
||||
# ls
|
||||
# for f in *.apk; do
|
||||
# BASENAME=`echo ${f}|awk -F '-APK-' '{print $2}'`
|
||||
# mv "${f}" "org.meumeu.wivrn-${BASENAME}"
|
||||
# done
|
||||
# ls
|
||||
|
||||
- name: Download APK debug artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
@@ -129,6 +131,11 @@ jobs:
|
||||
cd symbols
|
||||
zip -r ../debug-symbols.zip .
|
||||
|
||||
- name: How the hell doesnt it work
|
||||
run: |
|
||||
ls apk
|
||||
ls
|
||||
|
||||
- name: APK Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
|
||||
+16
-19
@@ -33,12 +33,12 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: >
|
||||
sudo apt-get update && sudo apt-get install libvulkan-dev libcjson-dev libx264-dev libavcodec-dev libavutil-dev libswscale-dev libavfilter-dev libbsd-dev libavahi-client-dev libavahi-glib-dev libeigen3-dev glslang-tools libudev-dev libwayland-dev libx11-xcb-dev libxrandr-dev libxcb-randr0-dev libgl-dev libglx-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libsystemd-dev libva-dev nlohmann-json3-dev libpulse-dev xz-utils libpipewire-0.3-dev libcli11-dev libboost-all-dev librsvg2-bin libssl-dev libnotify-dev librsvg2-dev libarchive-dev
|
||||
sudo apt-get update && sudo apt-get install libvulkan-dev libcjson-dev libx264-dev libavcodec-dev libavutil-dev libswscale-dev libavfilter-dev libbsd-dev libavahi-client-dev libavahi-glib-dev libeigen3-dev glslang-tools libudev-dev libwayland-dev libx11-xcb-dev libxrandr-dev libxcb-randr0-dev libgl-dev libglx-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libsystemd-dev libva-dev nlohmann-json3-dev libpulse-dev xz-utils libpipewire-0.3-dev libcli11-dev libboost-all-dev librsvg2-bin libssl-dev libnotify-dev librsvg2-dev
|
||||
- name: Prepare Vulkan SDK
|
||||
uses: humbletim/setup-vulkan-sdk@286ed76c72de45dbf50c515779cf4ca2f6aa3944
|
||||
with:
|
||||
vulkan-query-version: 1.3.296.0
|
||||
vulkan-components: Vulkan-Headers, Glslang, SPIRV-Tools
|
||||
vulkan-query-version: 1.3.283.0
|
||||
vulkan-components: Vulkan-Headers
|
||||
vulkan-use-cache: true
|
||||
|
||||
- name: Configure CMake
|
||||
@@ -87,8 +87,14 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: >
|
||||
apt-get update && apt-get install --yes libvulkan-dev libcjson-dev libx264-dev libavcodec-dev libavutil-dev libswscale-dev libavfilter-dev libbsd-dev libwayland-dev libx11-xcb-dev libxrandr-dev libxcb-randr0-dev libgl-dev libglx-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libsystemd-dev libva-dev nlohmann-json3-dev qt6-base-dev qt6-tools-dev libcap-dev pkexec libboost-all-dev librsvg2-bin libssl-dev libnotify-dev qt6-declarative-dev extra-cmake-modules libkirigami-dev libkf6i18n-dev libkf6coreaddons-dev libkf6qqc2desktopstyle-dev libkf6iconthemes-dev jq sudo cmake gcc g++ git qcoro-qt6-dev librsvg2-dev libarchive-dev libglm-dev glslang-tools
|
||||
apt-get update && apt-get install --yes libvulkan-dev libcjson-dev libx264-dev libavcodec-dev libavutil-dev libswscale-dev libavfilter-dev libbsd-dev libwayland-dev libx11-xcb-dev libxrandr-dev libxcb-randr0-dev libgl-dev libglx-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libsystemd-dev libva-dev nlohmann-json3-dev qt6-base-dev qt6-tools-dev libcap-dev pkexec libboost-all-dev librsvg2-bin libssl-dev libnotify-dev qt6-declarative-dev extra-cmake-modules libkirigami-dev libkf6i18n-dev libkf6coreaddons-dev libkf6qqc2desktopstyle-dev libkf6iconthemes-dev jq sudo cmake gcc g++ git qcoro-qt6-dev librsvg2-dev
|
||||
# runtime: qml6-module-qtqml-workerscript qml6-module-qtquick-dialogs
|
||||
- name: Prepare Vulkan SDK
|
||||
uses: humbletim/setup-vulkan-sdk@286ed76c72de45dbf50c515779cf4ca2f6aa3944
|
||||
with:
|
||||
vulkan-query-version: 1.3.283.0
|
||||
vulkan-components: Vulkan-Headers
|
||||
vulkan-use-cache: true
|
||||
|
||||
- name: Configure CMake
|
||||
run: >
|
||||
@@ -176,8 +182,8 @@ jobs:
|
||||
- name: Prepare Vulkan SDK
|
||||
uses: humbletim/setup-vulkan-sdk@286ed76c72de45dbf50c515779cf4ca2f6aa3944
|
||||
with:
|
||||
vulkan-query-version: 1.3.296.0
|
||||
vulkan-components: Vulkan-Headers, Glslang, SPIRV-Tools
|
||||
vulkan-query-version: 1.3.283.0
|
||||
vulkan-components: Vulkan-Headers
|
||||
vulkan-use-cache: true
|
||||
|
||||
- name: Install dependencies
|
||||
@@ -186,14 +192,13 @@ jobs:
|
||||
|
||||
- name: install server dependencies
|
||||
run: >
|
||||
sudo apt-get update && sudo apt-get install libavahi-glib-dev nlohmann-json3-dev libpulse-dev xz-utils libpipewire-0.3-dev libcli11-dev qt6-base-dev qt6-tools-dev libcap-dev pkexec libnotify-dev librsvg2-dev libarchive-dev
|
||||
sudo apt-get update && sudo apt-get install libavahi-glib-dev nlohmann-json3-dev libpulse-dev xz-utils libpipewire-0.3-dev libcli11-dev qt6-base-dev qt6-tools-dev libcap-dev pkexec libnotify-dev librsvg2-dev
|
||||
|
||||
- name: Configure CMake
|
||||
run: >
|
||||
cmake -B ${{github.workspace}}/build
|
||||
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
-DWIVRN_USE_SYSTEM_OPENXR=OFF
|
||||
--preset everything
|
||||
-DWIVRN_BUILD_DASHBOARD=OFF
|
||||
-DWIVRN_BUILD_DISSECTOR=OFF
|
||||
@@ -288,8 +293,8 @@ jobs:
|
||||
- name: Prepare Vulkan SDK
|
||||
uses: humbletim/setup-vulkan-sdk@286ed76c72de45dbf50c515779cf4ca2f6aa3944
|
||||
with:
|
||||
vulkan-query-version: 1.3.296.0
|
||||
vulkan-components: Vulkan-Headers, Glslang, SPIRV-Tools
|
||||
vulkan-query-version: 1.3.268.0
|
||||
vulkan-components: Vulkan-Headers
|
||||
vulkan-use-cache: true
|
||||
|
||||
- name: Install dependencies
|
||||
@@ -302,7 +307,6 @@ jobs:
|
||||
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
--preset ${{ matrix.cmake_preset }}
|
||||
-DWIVRN_USE_SYSTEM_OPENXR=OFF
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
||||
@@ -322,13 +326,6 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Prepare Vulkan SDK
|
||||
uses: humbletim/setup-vulkan-sdk@286ed76c72de45dbf50c515779cf4ca2f6aa3944
|
||||
with:
|
||||
vulkan-query-version: 1.3.296.0
|
||||
vulkan-components: Glslang, SPIRV-Tools
|
||||
vulkan-use-cache: true
|
||||
|
||||
- name: set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
@@ -470,7 +467,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt update
|
||||
apt install --yes libcjson-dev libx264-dev libavcodec-dev libavutil-dev libswscale-dev libavfilter-dev libbsd-dev libavahi-client-dev libavahi-glib-dev libeigen3-dev glslang-tools libudev-dev libwayland-dev libx11-xcb-dev libxrandr-dev libxcb-randr0-dev libgl-dev libglx-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libsystemd-dev libva-dev nlohmann-json3-dev libpulse-dev xz-utils libpipewire-0.3-dev libcli11-dev qt6-base-dev qt6-tools-dev libcap-dev pkexec libboost-all-dev librsvg2-bin dpkg-dev pkg-config debhelper-compat build-essential lintian cmake libnotify-dev qt6-declarative-dev extra-cmake-modules libkirigami-dev libkf6i18n-dev libkf6coreaddons-dev libkf6qqc2desktopstyle-dev libkf6iconthemes-dev jq sudo cmake gcc g++ git wget libssl-dev qcoro-qt6-dev librsvg2-dev libarchive-dev
|
||||
apt install --yes libcjson-dev libx264-dev libavcodec-dev libavutil-dev libswscale-dev libavfilter-dev libbsd-dev libavahi-client-dev libavahi-glib-dev libeigen3-dev glslang-tools libudev-dev libwayland-dev libx11-xcb-dev libxrandr-dev libxcb-randr0-dev libgl-dev libglx-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libsystemd-dev libva-dev nlohmann-json3-dev libpulse-dev xz-utils libpipewire-0.3-dev libcli11-dev qt6-base-dev qt6-tools-dev libcap-dev pkexec libboost-all-dev librsvg2-bin dpkg-dev pkg-config debhelper-compat build-essential lintian cmake libnotify-dev qt6-declarative-dev extra-cmake-modules libkirigami-dev libkf6i18n-dev libkf6coreaddons-dev libkf6qqc2desktopstyle-dev libkf6iconthemes-dev jq sudo cmake gcc g++ git wget libssl-dev qcoro-qt6-dev librsvg2-dev
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
|
||||
@@ -9,14 +9,10 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install gettext
|
||||
pip install polib PyGithub
|
||||
run: sudo apt-get update && sudo apt-get install gettext qt6-base-dev qt6-tools-dev qt6-l10n-tools qtchooser python3-polib
|
||||
|
||||
- name: Check that .po files are up to date
|
||||
run: |
|
||||
if [[ "${{github.ref}}" == 'refs/heads/master' ]] ; then
|
||||
tools/check_po.py --manage-issues --github-repository "${{ github.repository }}" --github-token "${{ github.token }}"
|
||||
else
|
||||
tools/check_po.py
|
||||
fi
|
||||
qtchooser -install qt6 $(which qmake6)
|
||||
export QT_SELECT=qt6
|
||||
tools/check_messages.sh
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
name: Sync Upstream
|
||||
|
||||
env:
|
||||
UPSTREAM_URL: "https://github.com/wivrn/wivrn.git"
|
||||
WORKFLOW_TOKEN: ${{ secrets.DOWNSTREAM_GITHUB_TOKEN }}
|
||||
UPSTREAM_BRANCH: "master"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 5/6 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: GitHub Sync to Upstream Repository
|
||||
uses: dabreadman/sync-upstream-repo@v1.3.0
|
||||
with:
|
||||
upstream_repo: ${{ env.UPSTREAM_URL }}
|
||||
upstream_branch: ${{ env.UPSTREAM_BRANCH }}
|
||||
token: ${{ env.WORKFLOW_TOKEN }}
|
||||
|
||||
- name: Checkout stuff
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Merge sneed -> master
|
||||
uses: devmasx/merge-branch@master
|
||||
with:
|
||||
type: now
|
||||
from_branch: sneed
|
||||
target_branch: master
|
||||
github_token: ${{ env.WORKFLOW_TOKEN }}
|
||||
|
||||
+86
-30
@@ -17,12 +17,13 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
include(FetchContent)
|
||||
include(ExternalProject)
|
||||
include(GNUInstallDirs)
|
||||
include("cmake/AutoOption.cmake")
|
||||
|
||||
option(WIVRN_USE_SYSTEM_FREETYPE "Use system FreeType" ON)
|
||||
option(WIVRN_USE_SYSTEM_BOOST "Use system Boost headers" ON)
|
||||
option(WIVRN_USE_SYSTEM_OPENXR "Use system OpenXR headers" ON)
|
||||
option(WIVRN_USE_SYSTEMD "Use libsystemd" ON)
|
||||
option(WIVRN_USE_LIBKTX "Use libktx" ${ANDROID})
|
||||
auto_option(WIVRN_USE_SYSTEM_BOOST "Use system Boost headers" AUTO)
|
||||
auto_option(WIVRN_USE_SYSTEM_OPENXR "Use system OpenXR headers" AUTO)
|
||||
auto_option(WIVRN_USE_SYSTEMD "Use libsystemd" AUTO)
|
||||
auto_option(WIVRN_USE_LIBKTX "Use libktx" AUTO)
|
||||
option(WIVRN_USE_ANDROID_VALIDATION_LAYER "Download the android version of the Vulkan validation layer" OFF)
|
||||
option(WIVRN_BUILD_CLIENT "Build WiVRn client" OFF)
|
||||
option(WIVRN_BUILD_SERVER "Build WiVRn server" ON)
|
||||
@@ -34,19 +35,19 @@ option(WIVRN_BUILD_TEST "Build test binaries" OFF)
|
||||
option(WIVRN_WERROR "Treat warnings as errors" OFF)
|
||||
|
||||
option(WIVRN_USE_NVENC "Enable nvenc (Nvidia) hardware encoder" ON)
|
||||
option(WIVRN_USE_VAAPI "Enable vaapi (AMD/Intel) hardware encoder" ON)
|
||||
option(WIVRN_USE_VULKAN_ENCODE "Enable vulkan video encoder" ON)
|
||||
option(WIVRN_USE_X264 "Enable x264 software encoder" ON)
|
||||
auto_option(WIVRN_USE_VAAPI "Enable vaapi (AMD/Intel) hardware encoder" AUTO)
|
||||
auto_option(WIVRN_USE_VULKAN_ENCODE "Enable vulkan video encoder" AUTO)
|
||||
auto_option(WIVRN_USE_X264 "Enable x264 software encoder" AUTO)
|
||||
|
||||
option(WIVRN_USE_PIPEWIRE "Enable pipewire backend" ON)
|
||||
option(WIVRN_USE_PULSEAUDIO "Enable pulseaudio backend" OFF)
|
||||
auto_option(WIVRN_USE_PIPEWIRE "Enable pipewire backend" AUTO)
|
||||
auto_option(WIVRN_USE_PULSEAUDIO "Enable pulseaudio backend" AUTO)
|
||||
|
||||
set(OVR_COMPAT_SEARCH_PATH "/opt/xrizer:/usr/local/lib/OpenComposite:/usr/lib/OpenComposite:/opt/OpenComposite:/opt/opencomposite"
|
||||
CACHE STRING "List of places to search for the OpenVR compatibility layer, separated by :")
|
||||
|
||||
option(WIVRN_FEATURE_DEBUG_GUI "Enable Monado debug GUI" OFF)
|
||||
option(WIVRN_FEATURE_RENDERDOC "Support renderdoc" OFF)
|
||||
set(WIVRN_FEATURE_SOLARXR OFF) # Will be added back when merged in upstream Monado
|
||||
option(WIVRN_FEATURE_SOLARXR "Enable SolarXR driver" OFF)
|
||||
option(WIVRN_FEATURE_STEAMVR_LIGHTHOUSE "Enable SteamVR Lighthouse driver" OFF)
|
||||
|
||||
option(WIVRN_CHECK_CAPSYSNICE "Check if CAP_SYS_NICE is available at startup" ON)
|
||||
@@ -63,12 +64,6 @@ endif()
|
||||
|
||||
option(ENABLE_COLOURED_OUTPUT "Always produce ANSI-coloured output (GNU/Clang only)." ON)
|
||||
|
||||
if (WIVRN_BUILD_CLIENT OR WIVRN_BUILD_SERVER OR WIVRN_BUILD_DASHBOARD OR WIVRN_BUILD_DISSECTOR)
|
||||
set(NEED_COMMON TRUE)
|
||||
else()
|
||||
set(NEED_COMMON FALSE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_COLOURED_OUTPUT)
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
add_compile_options(-fdiagnostics-color=always)
|
||||
@@ -80,13 +75,19 @@ endif()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(Vulkan REQUIRED)
|
||||
find_package(Git)
|
||||
if (NEED_COMMON AND NOT ANDROID)
|
||||
if (NOT ANDROID)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
endif()
|
||||
include(VulkanVersion)
|
||||
|
||||
if (WIVRN_USE_SYSTEM_BOOST AND NEED_COMMON)
|
||||
if (WIVRN_BUILD_DISSECTOR)
|
||||
if (WIVRN_USE_SYSTEM_BOOST STREQUAL "AUTO")
|
||||
if(WIVRN_BUILD_DISSECTOR)
|
||||
find_package(Boost 1.84.0 COMPONENTS locale url)
|
||||
else()
|
||||
find_package(Boost 1.75.0 COMPONENTS locale url)
|
||||
endif()
|
||||
elseif(WIVRN_USE_SYSTEM_BOOST STREQUAL "ON")
|
||||
if(WIVRN_BUILD_DISSECTOR)
|
||||
find_package(Boost 1.84.0 REQUIRED COMPONENTS locale url)
|
||||
else()
|
||||
find_package(Boost 1.75.0 REQUIRED COMPONENTS locale url)
|
||||
@@ -103,30 +104,72 @@ if (WIVRN_BUILD_SERVER)
|
||||
message(FATAL_ERROR "No encoder selected, use at least one of WIVRN_USE_NVENC, WIVRN_USE_VAAPI, WIVRN_USE_VULKAN_ENCODE or WIVRN_USE_X264")
|
||||
endif()
|
||||
|
||||
if (WIVRN_USE_VAAPI)
|
||||
if (WIVRN_USE_VAAPI STREQUAL "AUTO")
|
||||
pkg_check_modules(LIBAV IMPORTED_TARGET libavcodec libavutil libswscale libavfilter)
|
||||
pkg_check_modules(LIBDRM IMPORTED_TARGET libdrm)
|
||||
if (LIBAV_FOUND AND LIBDRM_FOUND)
|
||||
set(WIVRN_USE_VAAPI ON)
|
||||
else()
|
||||
set(WIVRN_USE_VAAPI OFF)
|
||||
endif()
|
||||
elseif (WIVRN_USE_VAAPI)
|
||||
pkg_check_modules(LIBAV REQUIRED IMPORTED_TARGET libavcodec libavutil libswscale libavfilter)
|
||||
pkg_check_modules(LIBDRM REQUIRED IMPORTED_TARGET libdrm)
|
||||
endif()
|
||||
|
||||
if (WIVRN_USE_VULKAN_ENCODE)
|
||||
if (WIVRN_USE_VULKAN_ENCODE STREQUAL "AUTO")
|
||||
if (Vulkan_VERSION VERSION_GREATER_EQUAL 1.3.283)
|
||||
set(WIVRN_USE_VULKAN_ENCODE ON)
|
||||
else()
|
||||
set(WIVRN_USE_VULKAN_ENCODE OFF)
|
||||
endif()
|
||||
elseif(WIVRN_USE_VULKAN_ENCODE)
|
||||
if (Vulkan_VERSION VERSION_LESS 1.3.283)
|
||||
message(FATAL_ERROR "Vulkan video encode requires 1.3.283, found ${Vulkan_VERSION}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WIVRN_USE_X264)
|
||||
if (WIVRN_USE_X264 STREQUAL "AUTO")
|
||||
pkg_check_modules(X264 IMPORTED_TARGET x264)
|
||||
if (X264_FOUND)
|
||||
set(WIVRN_USE_X264 ON)
|
||||
else()
|
||||
set(WIVRN_USE_X264 OFF)
|
||||
endif()
|
||||
elseif (WIVRN_USE_X264)
|
||||
pkg_check_modules(X264 REQUIRED IMPORTED_TARGET x264)
|
||||
endif()
|
||||
|
||||
if (WIVRN_USE_SYSTEMD)
|
||||
if (WIVRN_USE_SYSTEMD STREQUAL "AUTO")
|
||||
pkg_check_modules(SYSTEMD IMPORTED_TARGET libsystemd)
|
||||
if (SYSTEMD_FOUND)
|
||||
set(WIVRN_USE_SYSTEMD ON)
|
||||
else()
|
||||
set(WIVRN_USE_SYSTEMD OFF)
|
||||
endif()
|
||||
elseif (WIVRN_USE_SYSTEMD)
|
||||
pkg_check_modules(SYSTEMD REQUIRED IMPORTED_TARGET libsystemd)
|
||||
endif()
|
||||
|
||||
if (WIVRN_USE_PIPEWIRE)
|
||||
if (WIVRN_USE_PIPEWIRE STREQUAL "AUTO")
|
||||
pkg_check_modules(libpipewire IMPORTED_TARGET libpipewire-0.3)
|
||||
if (libpipewire_FOUND)
|
||||
set(WIVRN_USE_PIPEWIRE ON)
|
||||
else()
|
||||
set(WIVRN_USE_PIPEWIRE OFF)
|
||||
endif()
|
||||
elseif (WIVRN_USE_PIPEWIRE)
|
||||
pkg_check_modules(libpipewire REQUIRED IMPORTED_TARGET libpipewire-0.3)
|
||||
endif()
|
||||
|
||||
if (WIVRN_USE_PULSEAUDIO)
|
||||
if (WIVRN_USE_PULSEAUDIO STREQUAL "AUTO")
|
||||
pkg_check_modules(libpulse IMPORTED_TARGET libpulse)
|
||||
if (libpulse_FOUND)
|
||||
set(WIVRN_USE_PULSEAUDIO ON)
|
||||
else()
|
||||
set(WIVRN_USE_PULSEAUDIO OFF)
|
||||
endif()
|
||||
elseif (WIVRN_USE_PULSEAUDIO)
|
||||
pkg_check_modules(libpulse REQUIRED IMPORTED_TARGET libpulse)
|
||||
endif()
|
||||
|
||||
@@ -142,8 +185,7 @@ endif()
|
||||
|
||||
if (WIVRN_BUILD_DASHBOARD OR WIVRN_BUILD_SERVER)
|
||||
pkg_check_modules(librsvg-2.0 REQUIRED IMPORTED_TARGET librsvg-2.0)
|
||||
find_package(LibArchive REQUIRED)
|
||||
find_package(PNG REQUIRED)
|
||||
find_package(PNG)
|
||||
endif()
|
||||
|
||||
if (WIVRN_BUILD_DASHBOARD)
|
||||
@@ -172,11 +214,23 @@ if (WIVRN_BUILD_CLIENT OR WIVRN_BUILD_DASHBOARD)
|
||||
find_package(Gettext REQUIRED)
|
||||
endif()
|
||||
|
||||
if (WIVRN_BUILD_CLIENT)
|
||||
if (WIVRN_USE_LIBKTX STREQUAL "AUTO")
|
||||
if (ANDROID)
|
||||
set(WIVRN_USE_LIBKTX ON)
|
||||
else()
|
||||
set(WIVRN_USE_LIBKTX OFF)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WIVRN_BUILD_CLIENT AND NOT ANDROID)
|
||||
pkg_check_modules(LIBAV REQUIRED IMPORTED_TARGET libavcodec libavutil libswscale libavfilter)
|
||||
find_package(Fontconfig REQUIRED)
|
||||
|
||||
if (WIVRN_USE_SYSTEM_OPENXR)
|
||||
if (WIVRN_USE_SYSTEM_OPENXR STREQUAL "AUTO")
|
||||
find_package(OpenXR 1.1.48)
|
||||
elseif(WIVRN_USE_SYSTEM_OPENXR STREQUAL "ON")
|
||||
find_package(OpenXR 1.1.48 REQUIRED)
|
||||
endif()
|
||||
|
||||
@@ -190,7 +244,9 @@ if(ANDROID)
|
||||
endif()
|
||||
|
||||
if (WIVRN_BUILD_DISSECTOR)
|
||||
if (WIVRN_USE_SYSTEM_OPENXR)
|
||||
if (WIVRN_USE_SYSTEM_OPENXR STREQUAL "AUTO")
|
||||
find_package(OpenXR 1.1.48)
|
||||
elseif(WIVRN_USE_SYSTEM_OPENXR STREQUAL "ON")
|
||||
find_package(OpenXR 1.1.48 REQUIRED)
|
||||
endif()
|
||||
find_package(Wireshark REQUIRED)
|
||||
@@ -248,7 +304,7 @@ FetchContent_Declare(monado
|
||||
)
|
||||
|
||||
add_subdirectory(external)
|
||||
if (NEED_COMMON)
|
||||
if (WIVRN_BUILD_CLIENT OR WIVRN_BUILD_SERVER OR WIVRN_BUILD_DASHBOARD OR WIVRN_BUILD_DISSECTOR)
|
||||
add_subdirectory(common)
|
||||
endif()
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 930 B After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 581 B After Width: | Height: | Size: 292 B |
@@ -83,7 +83,6 @@ android {
|
||||
'-DCMAKE_ANDROID_NDK_VERSION=' + ndkVersion,
|
||||
'-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON',
|
||||
'-DCMAKE_EXPORT_COMPILE_COMMANDS=ON',
|
||||
'-DWIVRN_USE_SYSTEM_BOOST=OFF',
|
||||
'-DWIVRN_USE_SYSTEM_FREETYPE=OFF',
|
||||
'-DWIVRN_BUILD_CLIENT=ON',
|
||||
'-DWIVRN_BUILD_SERVER=OFF',
|
||||
|
||||
+14
-31
@@ -13,7 +13,7 @@ if (WIVRN_USE_LIBKTX)
|
||||
FetchContent_MakeAvailable(libktx)
|
||||
endif()
|
||||
|
||||
if (NOT WIVRN_USE_SYSTEM_BOOST)
|
||||
if (NOT BOOST_FOUND)
|
||||
FetchContent_MakeAvailable(boost)
|
||||
endif()
|
||||
|
||||
@@ -51,7 +51,7 @@ if(ANDROID)
|
||||
else()
|
||||
add_executable(wivrn)
|
||||
|
||||
if (WIVRN_USE_SYSTEM_OPENXR)
|
||||
if (OpenXR_FOUND)
|
||||
target_link_libraries(wivrn OpenXR::openxr_loader OpenXR::headers)
|
||||
else()
|
||||
FetchContent_MakeAvailable(openxr_loader)
|
||||
@@ -91,22 +91,7 @@ file(GLOB_RECURSE VULKAN_SHADERS CONFIGURE_DEPENDS "*.glsl")
|
||||
target_sources(wivrn PRIVATE ${LOCAL_SOURCE} ${VULKAN_SHADERS})
|
||||
wivrn_compile_glsl(wivrn ${VULKAN_SHADERS})
|
||||
|
||||
target_link_libraries(wivrn
|
||||
Boost::locale
|
||||
Boost::url
|
||||
EnTT::EnTT
|
||||
fastgltf
|
||||
FreetypeHarfbuzz
|
||||
glm::glm
|
||||
imspinner
|
||||
simdjson
|
||||
spdlog::spdlog
|
||||
stb
|
||||
uni-algo
|
||||
Vulkan::Vulkan
|
||||
wivrn-common
|
||||
wivrn-external
|
||||
)
|
||||
target_link_libraries(wivrn Vulkan::Vulkan spdlog::spdlog glm::glm fastgltf FreetypeHarfbuzz stb Boost::url Boost::locale)
|
||||
|
||||
if (WIVRN_USE_LIBKTX)
|
||||
target_link_libraries(wivrn ktx_read)
|
||||
@@ -122,6 +107,10 @@ if(NOT ANDROID)
|
||||
install(TARGETS wivrn)
|
||||
endif()
|
||||
|
||||
target_link_libraries(wivrn simdjson uni-algo wivrn-common wivrn-external)
|
||||
|
||||
|
||||
|
||||
##############################################################################
|
||||
# Dear ImGui
|
||||
#
|
||||
@@ -151,6 +140,10 @@ target_link_libraries(wivrn-imgui FreetypeHarfbuzz)
|
||||
target_link_libraries(wivrn wivrn-imgui)
|
||||
|
||||
|
||||
##############################################################################
|
||||
# EnTT
|
||||
#
|
||||
target_link_libraries(wivrn EnTT::EnTT)
|
||||
|
||||
##############################################################################
|
||||
# Vulkan Validation Layer
|
||||
@@ -236,14 +229,8 @@ add_custom_command(OUTPUT ${ASSETS_DIR}/wivrn.png
|
||||
COMMAND ${RSVG_CONVERT} ${IMG_SRC_DIR}/wivrn.svg -w 540 -h 540 -o ${ASSETS_DIR}/wivrn.png ${RSVG_OPTS}
|
||||
DEPENDS ${IMG_SRC_DIR}/wivrn.svg ${WIVRN_CSS_ABS})
|
||||
|
||||
add_custom_command(OUTPUT ${ASSETS_DIR}/wivrn-pride.png
|
||||
COMMAND ${RSVG_CONVERT} ${IMG_SRC_DIR}/wivrn-pride.svg -w 540 -h 540 -o ${ASSETS_DIR}/wivrn-pride.png ${RSVG_OPTS}
|
||||
DEPENDS ${IMG_SRC_DIR}/wivrn-pride.svg ${WIVRN_CSS_ABS})
|
||||
|
||||
add_custom_target(assets ALL DEPENDS
|
||||
${ASSETS_DIR}/wivrn.png
|
||||
${ASSETS_DIR}/wivrn-pride.png
|
||||
)
|
||||
${ASSETS_DIR}/wivrn.png)
|
||||
|
||||
add_dependencies(wivrn assets)
|
||||
|
||||
@@ -252,9 +239,6 @@ if(ANDROID)
|
||||
add_custom_command(OUTPUT ${ASSETS_DIR}/wivrn.ktx2
|
||||
COMMAND ${TOKTX} --encode astc --astc_blk_d 4x4 --astc_quality 100 --genmipmap ${ASSETS_DIR}/wivrn.ktx2 ${ASSETS_DIR}/wivrn.png
|
||||
DEPENDS ${ASSETS_DIR}/wivrn.png)
|
||||
add_custom_command(OUTPUT ${ASSETS_DIR}/wivrn-pride.ktx2
|
||||
COMMAND ${TOKTX} --encode astc --astc_blk_d 4x4 --astc_quality 100 --genmipmap ${ASSETS_DIR}/wivrn-pride.ktx2 ${ASSETS_DIR}/wivrn-pride.png
|
||||
DEPENDS ${ASSETS_DIR}/wivrn-pride.png)
|
||||
|
||||
add_custom_command(OUTPUT ${ASSETS_DIR}/default_icon.ktx2
|
||||
COMMAND ${TOKTX} --encode astc --astc_blk_d 4x4 --astc_quality 100 --genmipmap ${ASSETS_DIR}/wivrn-pride.ktx2 ${ASSETS_DIR}/default_icon.png
|
||||
@@ -270,10 +254,9 @@ if(ANDROID)
|
||||
|
||||
add_custom_target(assets-android ALL DEPENDS
|
||||
${ASSETS_DIR}/wivrn.ktx2
|
||||
${ASSETS_DIR}/wivrn-pride.ktx2
|
||||
${ASSETS_DIR}/WoodFloor051_1K-JPG_Color.ktx2
|
||||
${ASSETS_DIR}/vr_splash.png
|
||||
)
|
||||
${ASSETS_DIR}/vr_splash.png)
|
||||
|
||||
add_dependencies(assets-android assets)
|
||||
add_dependencies(wivrn assets-android)
|
||||
endif()
|
||||
|
||||
+129
-103
@@ -28,20 +28,16 @@
|
||||
#include "utils/files.h"
|
||||
#include "vk/check.h"
|
||||
#include "wifi_lock.h"
|
||||
#include "wivrn_packets.h"
|
||||
#include "xr/actionset.h"
|
||||
#include "xr/check.h"
|
||||
#include "xr/htc_exts.h"
|
||||
#include "xr/htc_face_tracker.h"
|
||||
#include "xr/meta_body_tracking_fidelity.h"
|
||||
#include "xr/to_string.h"
|
||||
#include "xr/xr.h"
|
||||
#include <algorithm>
|
||||
#include <boost/locale.hpp>
|
||||
#include <boost/url/parse.hpp>
|
||||
#include <chrono>
|
||||
#include <ctype.h>
|
||||
#include <exception>
|
||||
#include <magic_enum.hpp>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
@@ -138,7 +134,7 @@ static std::vector<interaction_profile> interaction_profiles{
|
||||
},
|
||||
interaction_profile{
|
||||
.profile_name = "/interaction_profiles/facebook/touch_controller_pro",
|
||||
.required_extensions = {XR_FB_TOUCH_CONTROLLER_PRO_EXTENSION_NAME},
|
||||
.required_extensions = {"XR_FB_touch_controller_pro"},
|
||||
.max_version = XR_MAKE_VERSION(1, 1, 0),
|
||||
.input_sources = {
|
||||
"/user/hand/left/output/haptic",
|
||||
@@ -251,7 +247,7 @@ static std::vector<interaction_profile> interaction_profiles{
|
||||
},
|
||||
interaction_profile{
|
||||
.profile_name = "/interaction_profiles/meta/touch_controller_plus",
|
||||
.required_extensions = {XR_META_TOUCH_CONTROLLER_PLUS_EXTENSION_NAME},
|
||||
.required_extensions = {"XR_META_touch_controller_plus"},
|
||||
.max_version = XR_MAKE_VERSION(1, 1, 0),
|
||||
.input_sources = {
|
||||
"/user/hand/left/output/haptic",
|
||||
@@ -352,7 +348,7 @@ static std::vector<interaction_profile> interaction_profiles{
|
||||
},
|
||||
interaction_profile{
|
||||
.profile_name = "/interaction_profiles/bytedance/pico_neo3_controller",
|
||||
.required_extensions = {XR_BD_CONTROLLER_INTERACTION_EXTENSION_NAME},
|
||||
.required_extensions = {"XR_BD_controller_interaction"},
|
||||
.input_sources = {
|
||||
"/user/hand/left/output/haptic",
|
||||
"/user/hand/right/output/haptic",
|
||||
@@ -395,7 +391,7 @@ static std::vector<interaction_profile> interaction_profiles{
|
||||
},
|
||||
interaction_profile{
|
||||
.profile_name = "/interaction_profiles/bytedance/pico4_controller",
|
||||
.required_extensions = {XR_BD_CONTROLLER_INTERACTION_EXTENSION_NAME},
|
||||
.required_extensions = {"XR_BD_controller_interaction"},
|
||||
.input_sources = {
|
||||
"/user/hand/left/output/haptic",
|
||||
"/user/hand/right/output/haptic",
|
||||
@@ -438,7 +434,7 @@ static std::vector<interaction_profile> interaction_profiles{
|
||||
},
|
||||
interaction_profile{
|
||||
.profile_name = "/interaction_profiles/bytedance/pico4s_controller",
|
||||
.required_extensions = {XR_BD_CONTROLLER_INTERACTION_EXTENSION_NAME},
|
||||
.required_extensions = {"XR_BD_controller_interaction"},
|
||||
.input_sources = {
|
||||
"/user/hand/left/output/haptic",
|
||||
"/user/hand/right/output/haptic",
|
||||
@@ -481,7 +477,7 @@ static std::vector<interaction_profile> interaction_profiles{
|
||||
},
|
||||
interaction_profile{
|
||||
.profile_name = "/interaction_profiles/htc/vive_focus3_controller",
|
||||
.required_extensions = {XR_HTC_VIVE_FOCUS3_CONTROLLER_INTERACTION_EXTENSION_NAME},
|
||||
.required_extensions = {"XR_HTC_vive_focus3_controller_interaction"},
|
||||
.input_sources = {
|
||||
"/user/hand/left/output/haptic",
|
||||
"/user/hand/right/output/haptic",
|
||||
@@ -523,7 +519,7 @@ static std::vector<interaction_profile> interaction_profiles{
|
||||
},
|
||||
interaction_profile{
|
||||
.profile_name = "/interaction_profiles/ext/hand_interaction_ext",
|
||||
.required_extensions = {XR_EXT_HAND_INTERACTION_EXTENSION_NAME},
|
||||
.required_extensions = {"XR_EXT_hand_interaction"},
|
||||
.input_sources = {
|
||||
"/user/hand/left/input/aim/pose",
|
||||
"/user/hand/left/input/grip/pose",
|
||||
@@ -552,14 +548,11 @@ static std::vector<interaction_profile> interaction_profiles{
|
||||
},
|
||||
interaction_profile{
|
||||
.profile_name = "/interaction_profiles/htc/vive_xr_tracker",
|
||||
.required_extensions = {
|
||||
XR_HTC_VIVE_XR_TRACKER_INTERACTION_EXTENSION_NAME,
|
||||
XR_HTC_PATH_ENUMERATION_EXTENSION_NAME,
|
||||
},
|
||||
.required_extensions = {"XR_HTC_vive_xr_tracker_interaction", "XR_HTC_path_enumeration"},
|
||||
},
|
||||
interaction_profile{
|
||||
.profile_name = "/interaction_profiles/ext/eye_gaze_interaction",
|
||||
.required_extensions = {XR_EXT_EYE_GAZE_INTERACTION_EXTENSION_NAME},
|
||||
.required_extensions = {"XR_EXT_eye_gaze_interaction"},
|
||||
.input_sources = {
|
||||
"/user/eyes_ext/input/gaze_ext/pose",
|
||||
},
|
||||
@@ -724,13 +717,15 @@ void application::initialize_vulkan()
|
||||
spdlog::info("Using Vulkan validation layer");
|
||||
layers.push_back("VK_LAYER_KHRONOS_validation");
|
||||
}
|
||||
bool debug_report_found = false;
|
||||
bool debug_utils_found = false;
|
||||
#endif
|
||||
|
||||
std::vector<const char *> instance_extensions{};
|
||||
std::unordered_set<std::string_view> optional_device_extensions{};
|
||||
|
||||
#ifndef NDEBUG
|
||||
bool debug_report_found = false;
|
||||
bool debug_utils_found = false;
|
||||
#endif
|
||||
spdlog::info("Available Vulkan instance extensions:");
|
||||
std::vector<std::pair<std::string, int>> extensions;
|
||||
for (vk::ExtensionProperties & i: vk_context.enumerateInstanceExtensionProperties(nullptr))
|
||||
@@ -739,27 +734,28 @@ void application::initialize_vulkan()
|
||||
|
||||
#ifndef NDEBUG
|
||||
if (!strcmp(i.extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME))
|
||||
{
|
||||
debug_report_found = true;
|
||||
instance_extensions.push_back(VK_EXT_DEBUG_REPORT_EXTENSION_NAME);
|
||||
}
|
||||
|
||||
if (!strcmp(i.extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME) and
|
||||
guess_model() != model::oculus_quest) // Quest 1 lies, the extension won't load
|
||||
{
|
||||
if (!strcmp(i.extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME))
|
||||
debug_utils_found = true;
|
||||
instance_extensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
std::ranges::sort(extensions);
|
||||
for (const auto & [extension_name, spec_version]: extensions)
|
||||
spdlog::info(" {} (version {})", extension_name, spec_version);
|
||||
|
||||
#ifndef NDEBUG
|
||||
if (debug_utils_found && debug_report_found)
|
||||
{
|
||||
// debug_extensions_found = true;
|
||||
// spdlog::info("Using debug extensions");
|
||||
instance_extensions.push_back(VK_EXT_DEBUG_REPORT_EXTENSION_NAME);
|
||||
// instance_extensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
|
||||
}
|
||||
#endif
|
||||
|
||||
vk_device_extensions.push_back(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME);
|
||||
optional_device_extensions.emplace(VK_IMG_FILTER_CUBIC_EXTENSION_NAME);
|
||||
optional_device_extensions.emplace(VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME);
|
||||
optional_device_extensions.emplace(VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME);
|
||||
|
||||
#ifdef __ANDROID__
|
||||
vk_device_extensions.push_back(VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME);
|
||||
@@ -878,7 +874,6 @@ void application::initialize_vulkan()
|
||||
.ppEnabledExtensionNames = vk_device_extensions.data(),
|
||||
.pEnabledFeatures = &device_features,
|
||||
},
|
||||
vk::PhysicalDeviceFragmentShadingRateFeaturesKHR{},
|
||||
#ifdef __ANDROID__
|
||||
vk::PhysicalDeviceSamplerYcbcrConversionFeaturesKHR{
|
||||
.samplerYcbcrConversion = VK_TRUE,
|
||||
@@ -886,22 +881,6 @@ void application::initialize_vulkan()
|
||||
#endif
|
||||
};
|
||||
|
||||
if (utils::contains(vk_device_extensions, VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME) and
|
||||
utils::contains(vk_device_extensions, VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME))
|
||||
{
|
||||
auto [feat, fragment_feat] = vk_physical_device.getFeatures2<vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceFragmentShadingRateFeaturesKHR>();
|
||||
auto & create_feat = device_create_info.get<vk::PhysicalDeviceFragmentShadingRateFeaturesKHR>();
|
||||
create_feat.primitiveFragmentShadingRate = fragment_feat.primitiveFragmentShadingRate;
|
||||
create_feat.attachmentFragmentShadingRate = fragment_feat.attachmentFragmentShadingRate;
|
||||
spdlog::info("Fragment shading rate features: primitive={} attachment={}",
|
||||
create_feat.primitiveFragmentShadingRate,
|
||||
create_feat.attachmentFragmentShadingRate);
|
||||
}
|
||||
else
|
||||
{
|
||||
device_create_info.unlink<vk::PhysicalDeviceFragmentShadingRateFeaturesKHR>();
|
||||
}
|
||||
|
||||
vk_device = xr_system_id.create_device(vk_physical_device, device_create_info.get());
|
||||
*vk_queue.lock() = vk_device.getQueue(vk_queue_family_index, 0);
|
||||
|
||||
@@ -923,16 +902,10 @@ void application::initialize_vulkan()
|
||||
pipeline_cache = vk::raii::PipelineCache(vk_device, pipeline_cache_info);
|
||||
|
||||
allocator.emplace(VmaAllocatorCreateInfo{
|
||||
.physicalDevice = *vk_physical_device,
|
||||
.device = *vk_device,
|
||||
.instance = *vk_instance,
|
||||
},
|
||||
#ifndef NDEBUG
|
||||
debug_utils_found
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
);
|
||||
.physicalDevice = *vk_physical_device,
|
||||
.device = *vk_device,
|
||||
.instance = *vk_instance,
|
||||
});
|
||||
}
|
||||
|
||||
void application::log_views()
|
||||
@@ -979,6 +952,8 @@ void application::initialize_actions()
|
||||
{
|
||||
spdlog::debug("Initializing actions");
|
||||
|
||||
auto * htc_body = std::get_if<xr::htc_body_tracker>(&body_tracker);
|
||||
|
||||
// Build an action set with all possible input sources
|
||||
std::vector<XrActionSet> action_sets;
|
||||
xr_actionset = xr::actionset(xr_instance, "all_actions", "All actions");
|
||||
@@ -992,9 +967,7 @@ void application::initialize_actions()
|
||||
std::vector<std::string> sources;
|
||||
for (auto & profile: interaction_profiles)
|
||||
{
|
||||
profile.available = std::ranges::all_of(profile.required_extensions, [&](auto & ext) { return xr_instance.has_extension(ext); }) and
|
||||
profile.min_version <= api_version and
|
||||
profile.max_version > api_version;
|
||||
profile.available = utils::contains_all(xr_extensions, profile.required_extensions) and profile.min_version <= api_version and profile.max_version > api_version;
|
||||
|
||||
if (profile.profile_name.ends_with("khr/simple_controller"))
|
||||
{
|
||||
@@ -1035,15 +1008,15 @@ void application::initialize_actions()
|
||||
}
|
||||
if (add_palms)
|
||||
{
|
||||
if ((api_version >= XR_MAKE_VERSION(1, 1, 0) or xr_instance.has_extension(XR_KHR_MAINTENANCE1_EXTENSION_NAME)) //
|
||||
and utils::contains(profile.input_sources, "/user/hand/left/input/grip/pose") //
|
||||
if ((api_version >= XR_MAKE_VERSION(1, 1, 0) or utils::contains(xr_extensions, XR_KHR_MAINTENANCE1_EXTENSION_NAME)) //
|
||||
and utils::contains(profile.input_sources, "/user/hand/left/input/grip/pose") //
|
||||
and not utils::contains(profile.input_sources, "/user/hand/left/input/grip_surface/pose"))
|
||||
{
|
||||
spdlog::info("Adding grip_surface/pose for interaction profile {}", profile.profile_name);
|
||||
profile.input_sources.push_back("/user/hand/left/input/grip_surface/pose");
|
||||
profile.input_sources.push_back("/user/hand/right/input/grip_surface/pose");
|
||||
}
|
||||
else if (xr_instance.has_extension(XR_EXT_PALM_POSE_EXTENSION_NAME) //
|
||||
else if (utils::contains(xr_extensions, XR_EXT_PALM_POSE_EXTENSION_NAME) //
|
||||
and utils::contains(profile.input_sources, "/user/hand/left/input/grip/pose") //
|
||||
and not utils::contains(profile.input_sources, "/user/hand/left/input/palm_ext/pose"))
|
||||
{
|
||||
@@ -1054,15 +1027,14 @@ void application::initialize_actions()
|
||||
}
|
||||
|
||||
// Dynamically add VIVE XR Trackers to the profile if available
|
||||
if (utils::contains(profile.required_extensions, XR_HTC_VIVE_XR_TRACKER_INTERACTION_EXTENSION_NAME) and
|
||||
xr_instance.has_extension(XR_HTC_PATH_ENUMERATION_EXTENSION_NAME))
|
||||
if (htc_body && utils::contains(profile.required_extensions, XR_HTC_VIVE_XR_TRACKER_INTERACTION_EXTENSION_NAME))
|
||||
{
|
||||
XrPath tracker_profile = xr_instance.string_to_path("/interaction_profiles/htc/vive_xr_tracker");
|
||||
for (const auto & user_path: xr_instance.enumerate_paths_for_interaction_profile(tracker_profile))
|
||||
for (const auto & user_path: htc_body->get_paths())
|
||||
{
|
||||
generic_trackers.emplace_back(user_path, nullptr);
|
||||
for (const auto & input_path: xr_instance.enumerate_paths_for_interaction_profile(tracker_profile, user_path))
|
||||
profile.input_sources.push_back(xr_instance.path_to_string(user_path) + xr_instance.path_to_string(input_path));
|
||||
for (const auto & input_path: htc_body->get_paths(user_path))
|
||||
{
|
||||
profile.input_sources.push_back(path_to_string(user_path) + path_to_string(input_path));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1110,14 +1082,8 @@ void application::initialize_actions()
|
||||
spaces[size_t(xr::spaces::poke_right)] = xr_session.create_action_space(a);
|
||||
else if (name == "/user/eyes_ext/input/gaze_ext/pose")
|
||||
spaces[size_t(xr::spaces::eye_gaze)] = xr_session.create_action_space(a);
|
||||
else if (name.contains("/input/entity_htc/pose"))
|
||||
{
|
||||
for (auto & [path, action]: generic_trackers)
|
||||
{
|
||||
if (name.starts_with(xr_instance.path_to_string(path)))
|
||||
action = xr_session.create_action_space(a);
|
||||
}
|
||||
}
|
||||
else if (name.contains("/input/entity_htc/pose") && htc_body)
|
||||
htc_body->add(xr_session.create_action_space(a));
|
||||
}
|
||||
|
||||
// Build an action set for each scene
|
||||
@@ -1154,7 +1120,7 @@ void application::initialize_actions()
|
||||
|
||||
xr_bindings.push_back(XrActionSuggestedBinding{
|
||||
.action = a,
|
||||
.binding = xr_instance.string_to_path(k.input_source)});
|
||||
.binding = string_to_path(k.input_source)});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1171,7 +1137,7 @@ void application::initialize_actions()
|
||||
|
||||
for (const auto & name: profile.input_sources)
|
||||
{
|
||||
xr_bindings.push_back({actions_by_name[name], xr_instance.string_to_path(name)});
|
||||
xr_bindings.push_back({actions_by_name[name], string_to_path(name)});
|
||||
}
|
||||
|
||||
try
|
||||
@@ -1191,7 +1157,7 @@ void application::initialize()
|
||||
{
|
||||
// LogLayersAndExtensions
|
||||
assert(!xr_instance);
|
||||
std::vector<std::string> xr_extensions;
|
||||
xr_extensions.clear();
|
||||
|
||||
// Required extensions
|
||||
xr_extensions.push_back(XR_KHR_CONVERT_TIMESPEC_TIME_EXTENSION_NAME);
|
||||
@@ -1264,16 +1230,21 @@ void application::initialize()
|
||||
spdlog::info(" Orientation tracking: {}", (bool)properties.trackingProperties.orientationTracking);
|
||||
spdlog::info(" Position tracking: {}", (bool)properties.trackingProperties.positionTracking);
|
||||
|
||||
spdlog::info(" Hand tracking support: {}", xr_system_id.hand_tracking_supported());
|
||||
if (utils::contains(xr_extensions, XR_EXT_HAND_TRACKING_EXTENSION_NAME))
|
||||
{
|
||||
XrSystemHandTrackingPropertiesEXT hand_tracking_properties = xr_system_id.hand_tracking_properties();
|
||||
spdlog::info(" Hand tracking support: {}", (bool)hand_tracking_properties.supportsHandTracking);
|
||||
hand_tracking_supported = hand_tracking_properties.supportsHandTracking;
|
||||
}
|
||||
|
||||
if (xr_instance.has_extension(XR_EXT_EYE_GAZE_INTERACTION_EXTENSION_NAME))
|
||||
if (utils::contains(xr_extensions, XR_EXT_EYE_GAZE_INTERACTION_EXTENSION_NAME))
|
||||
{
|
||||
XrSystemEyeGazeInteractionPropertiesEXT eye_gaze_properties = xr_system_id.eye_gaze_interaction_properties();
|
||||
spdlog::info(" Eye gaze support: {}", (bool)eye_gaze_properties.supportsEyeGazeInteraction);
|
||||
eye_gaze_supported = eye_gaze_properties.supportsEyeGazeInteraction;
|
||||
}
|
||||
|
||||
if (xr_instance.has_extension(XR_FB_COMPOSITION_LAYER_SETTINGS_EXTENSION_NAME))
|
||||
if (utils::contains(xr_extensions, XR_FB_COMPOSITION_LAYER_SETTINGS_EXTENSION_NAME))
|
||||
{
|
||||
spdlog::info(" OpenXR post-processing extension support: true");
|
||||
openxr_post_processing_supported = true;
|
||||
@@ -1281,39 +1252,23 @@ void application::initialize()
|
||||
|
||||
switch (xr_system_id.passthrough_supported())
|
||||
{
|
||||
case xr::passthrough_type::none:
|
||||
case xr::system::passthrough_type::no_passthrough:
|
||||
spdlog::info(" Passthrough: not supported");
|
||||
break;
|
||||
case xr::passthrough_type::bw:
|
||||
case xr::system::passthrough_type::bw:
|
||||
spdlog::info(" Passthrough: black and white");
|
||||
break;
|
||||
case xr::passthrough_type::color:
|
||||
case xr::system::passthrough_type::color:
|
||||
spdlog::info(" Passthrough: color");
|
||||
break;
|
||||
}
|
||||
|
||||
spdlog::info(" Face tracker: {}", magic_enum::enum_name(xr_system_id.face_tracker_supported()));
|
||||
spdlog::info(" Body tracker: {}", magic_enum::enum_name(xr_system_id.body_tracker_supported()));
|
||||
|
||||
// Log view configurations and blend modes
|
||||
log_views();
|
||||
|
||||
initialize_vulkan();
|
||||
|
||||
xr_session = xr::session(xr_instance, xr_system_id, vk_instance, vk_physical_device, vk_device, vk_queue, vk_queue_family_index);
|
||||
|
||||
spaces[size_t(xr::spaces::view)] = xr_session.create_reference_space(XR_REFERENCE_SPACE_TYPE_VIEW);
|
||||
spaces[size_t(xr::spaces::world)] = xr_session.create_reference_space(XR_REFERENCE_SPACE_TYPE_STAGE);
|
||||
|
||||
config.emplace(xr_system_id);
|
||||
|
||||
// HTC face tracker fails if created later
|
||||
// we can destroy it right away, it actually stores static handles
|
||||
if (xr_system_id.face_tracker_supported() == xr::face_tracker_type::htc)
|
||||
{
|
||||
auto props = xr_system_id.htc_face_tracking_properties();
|
||||
xr::htc_face_tracker(xr_instance, xr_session, props.supportEyeFacialTracking, props.supportLipFacialTracking);
|
||||
}
|
||||
xr_session = xr::session(xr_instance, xr_system_id, vk_instance, vk_physical_device, vk_device, vk_queue_family_index);
|
||||
|
||||
{
|
||||
auto spaces = xr_session.get_reference_spaces();
|
||||
@@ -1322,6 +1277,70 @@ void application::initialize()
|
||||
spdlog::info(" {}", xr::to_string(i));
|
||||
}
|
||||
|
||||
spaces[size_t(xr::spaces::view)] = xr_session.create_reference_space(XR_REFERENCE_SPACE_TYPE_VIEW);
|
||||
spaces[size_t(xr::spaces::world)] = xr_session.create_reference_space(XR_REFERENCE_SPACE_TYPE_STAGE);
|
||||
|
||||
config.emplace(xr_system_id);
|
||||
|
||||
if (hand_tracking_supported)
|
||||
{
|
||||
left_hand = xr_session.create_hand_tracker(XR_HAND_LEFT_EXT);
|
||||
right_hand = xr_session.create_hand_tracker(XR_HAND_RIGHT_EXT);
|
||||
}
|
||||
|
||||
if (utils::contains(xr_extensions, XR_FB_FACE_TRACKING2_EXTENSION_NAME))
|
||||
{
|
||||
XrSystemFaceTrackingProperties2FB fb_face2_properties = xr_system_id.fb_face_tracking2_properties();
|
||||
spdlog::info(" FB face tracking support: {}", (bool)fb_face2_properties.supportsVisualFaceTracking);
|
||||
if (fb_face2_properties.supportsVisualFaceTracking)
|
||||
face_tracker.emplace<xr::fb_face_tracker2>(xr_instance, xr_session);
|
||||
}
|
||||
|
||||
if (std::holds_alternative<std::monostate>(face_tracker) && utils::contains(xr_extensions, XR_HTC_FACIAL_TRACKING_EXTENSION_NAME))
|
||||
{
|
||||
XrSystemFacialTrackingPropertiesHTC htc_face_properties = xr_system_id.htc_face_tracking_properties();
|
||||
spdlog::info(" HTC eye tracking support: {}", (bool)htc_face_properties.supportEyeFacialTracking);
|
||||
spdlog::info(" HTC lip tracking support: {}", (bool)htc_face_properties.supportLipFacialTracking);
|
||||
if (htc_face_properties.supportEyeFacialTracking || htc_face_properties.supportLipFacialTracking)
|
||||
face_tracker.emplace<xr::htc_face_tracker>(xr_instance, xr_session, htc_face_properties.supportEyeFacialTracking, htc_face_properties.supportLipFacialTracking);
|
||||
}
|
||||
|
||||
if (std::holds_alternative<std::monostate>(face_tracker) && eye_gaze_supported)
|
||||
{
|
||||
switch (guess_model())
|
||||
{
|
||||
case model::pico_4_pro:
|
||||
case model::pico_4_enterprise:
|
||||
spdlog::info(" PICO face tracking support: true");
|
||||
face_tracker.emplace<xr::pico_face_tracker>(xr_instance, xr_session);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (utils::contains_all(xr_extensions, std::array{XR_FB_BODY_TRACKING_EXTENSION_NAME, XR_META_BODY_TRACKING_FULL_BODY_EXTENSION_NAME, XR_META_BODY_TRACKING_FIDELITY_EXTENSION_NAME}))
|
||||
{
|
||||
XrSystemBodyTrackingPropertiesFB fb_body_properties = xr_system_id.fb_body_tracking_properties();
|
||||
spdlog::info(" FB body tracking support: {}", (bool)fb_body_properties.supportsBodyTracking);
|
||||
if (fb_body_properties.supportsBodyTracking)
|
||||
body_tracker.emplace<xr::fb_body_tracker>(xr_instance, xr_session);
|
||||
}
|
||||
|
||||
if (std::holds_alternative<std::monostate>(body_tracker) && utils::contains_all(xr_extensions, std::array{XR_HTC_PATH_ENUMERATION_EXTENSION_NAME, XR_HTC_VIVE_XR_TRACKER_INTERACTION_EXTENSION_NAME}))
|
||||
{
|
||||
spdlog::info(" HTC body tracking support: true");
|
||||
body_tracker.emplace<xr::htc_body_tracker>(xr_instance, xr_session);
|
||||
}
|
||||
|
||||
if (std::holds_alternative<std::monostate>(body_tracker) && utils::contains(xr_extensions, XR_BD_BODY_TRACKING_EXTENSION_NAME))
|
||||
{
|
||||
XrSystemBodyTrackingPropertiesBD bd_body_properties = xr_system_id.bd_body_tracking_properties();
|
||||
spdlog::info(" PICO body tracking support: {}", (bool)bd_body_properties.supportsBodyTracking);
|
||||
if (bd_body_properties.supportsBodyTracking)
|
||||
body_tracker.emplace<xr::pico_body_tracker>(xr_instance, xr_session);
|
||||
}
|
||||
|
||||
vk::CommandPoolCreateInfo cmdpool_create_info;
|
||||
cmdpool_create_info.queueFamilyIndex = vk_queue_family_index;
|
||||
cmdpool_create_info.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer;
|
||||
@@ -1856,6 +1875,13 @@ void application::poll_events()
|
||||
exit_requested = true;
|
||||
}
|
||||
break;
|
||||
case XR_TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED: {
|
||||
if (auto * htc_body = std::get_if<xr::htc_body_tracker>(&body_tracker))
|
||||
{
|
||||
htc_body->update_active();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case XR_TYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING:
|
||||
break;
|
||||
case XR_TYPE_EVENT_DATA_SESSION_STATE_CHANGED: {
|
||||
|
||||
+82
-13
@@ -28,11 +28,14 @@
|
||||
#include "utils/thread_safe.h"
|
||||
#include "vk/vk_allocator.h"
|
||||
#include "wifi_lock.h"
|
||||
#include "xr/actionset.h"
|
||||
#include "xr/instance.h"
|
||||
#include "xr/session.h"
|
||||
#include "xr/swapchain.h"
|
||||
#include "xr/system.h"
|
||||
#include "xr/fb_body_tracker.h"
|
||||
#include "xr/fb_face_tracker2.h"
|
||||
#include "xr/hand_tracker.h"
|
||||
#include "xr/htc_body_tracker.h"
|
||||
#include "xr/htc_face_tracker.h"
|
||||
#include "xr/pico_body_tracker.h"
|
||||
#include "xr/pico_face_tracker.h"
|
||||
#include "xr/xr.h"
|
||||
#include <atomic>
|
||||
#include <boost/locale/generator.hpp>
|
||||
#include <boost/locale/gnu_gettext.hpp>
|
||||
@@ -123,7 +126,12 @@ class application : public singleton<application>
|
||||
xr::actionset xr_actionset;
|
||||
std::vector<std::tuple<XrAction, XrActionType, std::string>> actions;
|
||||
|
||||
std::vector<std::pair<XrPath, xr::space>> generic_trackers;
|
||||
bool hand_tracking_supported = false;
|
||||
xr::hand_tracker left_hand;
|
||||
xr::hand_tracker right_hand;
|
||||
|
||||
std::variant<std::monostate, xr::fb_face_tracker2, xr::htc_face_tracker, xr::pico_face_tracker> face_tracker;
|
||||
std::variant<std::monostate, xr::fb_body_tracker, xr::htc_body_tracker, xr::pico_body_tracker> body_tracker;
|
||||
|
||||
bool eye_gaze_supported = false;
|
||||
|
||||
@@ -133,6 +141,7 @@ class application : public singleton<application>
|
||||
bool session_focused = false;
|
||||
bool session_visible = false;
|
||||
bool debug_extensions_found = false;
|
||||
std::vector<std::string> xr_extensions;
|
||||
std::vector<const char *> vk_device_extensions;
|
||||
std::atomic<bool> exit_requested = false;
|
||||
std::filesystem::path config_path;
|
||||
@@ -262,6 +271,16 @@ public:
|
||||
return std::make_pair(position, orientation);
|
||||
}
|
||||
|
||||
static XrPath string_to_path(const std::string & s)
|
||||
{
|
||||
return instance().xr_instance.string_to_path(s);
|
||||
}
|
||||
|
||||
static std::string path_to_string(XrPath p)
|
||||
{
|
||||
return instance().xr_instance.path_to_string(p);
|
||||
}
|
||||
|
||||
void run();
|
||||
|
||||
static void push_scene(std::shared_ptr<scene>);
|
||||
@@ -332,6 +351,16 @@ public:
|
||||
// #endif
|
||||
}
|
||||
|
||||
static XrTime now()
|
||||
{
|
||||
return instance().xr_instance.now();
|
||||
}
|
||||
|
||||
static uint32_t queue_family_index()
|
||||
{
|
||||
return instance().vk_queue_family_index;
|
||||
}
|
||||
|
||||
static thread_safe<vk::raii::Queue> & get_queue()
|
||||
{
|
||||
return instance().vk_queue;
|
||||
@@ -347,21 +376,26 @@ public:
|
||||
return intent;
|
||||
}
|
||||
|
||||
static vk::raii::PhysicalDevice & get_physical_device()
|
||||
{
|
||||
return instance().vk_physical_device;
|
||||
}
|
||||
|
||||
static const vk::PhysicalDeviceProperties & get_physical_device_properties()
|
||||
{
|
||||
return instance().physical_device_properties;
|
||||
}
|
||||
|
||||
static vk::raii::Device & get_device()
|
||||
{
|
||||
return instance().vk_device;
|
||||
}
|
||||
|
||||
static vk::raii::Instance & get_vulkan_instance()
|
||||
{
|
||||
return instance().vk_instance;
|
||||
}
|
||||
|
||||
static xr::system & get_system()
|
||||
{
|
||||
return instance().xr_system_id;
|
||||
}
|
||||
|
||||
static vk::raii::PipelineCache & get_pipeline_cache()
|
||||
{
|
||||
return instance().pipeline_cache;
|
||||
@@ -382,6 +416,21 @@ public:
|
||||
return instance().last_scene_cpu_time;
|
||||
}
|
||||
|
||||
static bool get_hand_tracking_supported()
|
||||
{
|
||||
return instance().hand_tracking_supported;
|
||||
}
|
||||
|
||||
static bool get_face_tracking_supported()
|
||||
{
|
||||
return !std::holds_alternative<std::monostate>(instance().face_tracker);
|
||||
}
|
||||
|
||||
static bool get_body_tracking_supported()
|
||||
{
|
||||
return !std::holds_alternative<std::monostate>(instance().body_tracker);
|
||||
}
|
||||
|
||||
static bool get_eye_gaze_supported()
|
||||
{
|
||||
return instance().eye_gaze_supported;
|
||||
@@ -392,9 +441,29 @@ public:
|
||||
return instance().openxr_post_processing_supported;
|
||||
}
|
||||
|
||||
static auto & get_generic_trackers()
|
||||
static xr::hand_tracker & get_left_hand()
|
||||
{
|
||||
return instance().generic_trackers;
|
||||
return instance().left_hand;
|
||||
}
|
||||
|
||||
static xr::hand_tracker & get_right_hand()
|
||||
{
|
||||
return instance().right_hand;
|
||||
}
|
||||
|
||||
static auto & get_face_tracker()
|
||||
{
|
||||
return instance().face_tracker;
|
||||
}
|
||||
|
||||
static auto & get_body_tracker()
|
||||
{
|
||||
return instance().body_tracker;
|
||||
}
|
||||
|
||||
static const std::vector<std::string> & get_xr_extensions()
|
||||
{
|
||||
return instance().xr_extensions;
|
||||
}
|
||||
|
||||
static const std::vector<const char *> & get_vk_device_extensions()
|
||||
|
||||
+47
-15
@@ -82,8 +82,6 @@ bool configuration::check_feature(feature f) const
|
||||
{
|
||||
std::lock_guard lock(mutex);
|
||||
|
||||
auto & system = application::get_system();
|
||||
|
||||
auto it = features.find(f);
|
||||
if (it == features.end())
|
||||
return false;
|
||||
@@ -96,7 +94,7 @@ bool configuration::check_feature(feature f) const
|
||||
case feature::microphone:
|
||||
break;
|
||||
case feature::hand_tracking:
|
||||
if (not system.hand_tracking_supported())
|
||||
if (not application::get_hand_tracking_supported())
|
||||
return false;
|
||||
break;
|
||||
case feature::eye_gaze:
|
||||
@@ -104,12 +102,50 @@ bool configuration::check_feature(feature f) const
|
||||
return false;
|
||||
break;
|
||||
case feature::face_tracking:
|
||||
if (system.face_tracker_supported() == xr::face_tracker_type::none)
|
||||
return false;
|
||||
switch (guess_model())
|
||||
{
|
||||
case model::htc_vive_focus_3:
|
||||
case model::htc_vive_focus_vision:
|
||||
case model::htc_vive_xr_elite:
|
||||
if (not std::holds_alternative<xr::htc_face_tracker>(application::get_face_tracker()))
|
||||
return false;
|
||||
break;
|
||||
case model::pico_4_pro:
|
||||
case model::pico_4_enterprise:
|
||||
if (not std::holds_alternative<xr::pico_face_tracker>(application::get_face_tracker()))
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
if (not std::holds_alternative<xr::fb_face_tracker2>(application::get_face_tracker()))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case feature::body_tracking:
|
||||
if (system.body_tracker_supported() == xr::body_tracker_type::none)
|
||||
return false;
|
||||
switch (guess_model())
|
||||
{
|
||||
case model::meta_quest_3:
|
||||
case model::meta_quest_3s:
|
||||
if (not std::holds_alternative<xr::fb_body_tracker>(application::get_body_tracker()))
|
||||
return false;
|
||||
break;
|
||||
case model::htc_vive_focus_3:
|
||||
case model::htc_vive_xr_elite:
|
||||
case model::htc_vive_focus_vision:
|
||||
if (not std::holds_alternative<xr::htc_body_tracker>(application::get_body_tracker()))
|
||||
return false;
|
||||
break;
|
||||
case model::pico_neo_3:
|
||||
case model::pico_4:
|
||||
case model::pico_4s:
|
||||
case model::pico_4_pro:
|
||||
case model::pico_4_enterprise:
|
||||
if (not std::holds_alternative<xr::pico_body_tracker>(application::get_body_tracker()))
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -145,8 +181,8 @@ void configuration::set_feature(feature f, bool state)
|
||||
|
||||
configuration::configuration(xr::system & system)
|
||||
{
|
||||
passthrough_enabled = system.passthrough_supported() == xr::passthrough_type::color;
|
||||
features[feature::hand_tracking] = system.hand_tracking_supported();
|
||||
passthrough_enabled = system.passthrough_supported() == xr::system::passthrough_type::color;
|
||||
features[feature::hand_tracking] = application::get_hand_tracking_supported();
|
||||
try
|
||||
{
|
||||
simdjson::dom::parser parser;
|
||||
@@ -178,9 +214,6 @@ configuration::configuration(xr::system & system)
|
||||
if (auto val = root["resolution_scale"]; val.is_double())
|
||||
resolution_scale = val.get_double();
|
||||
|
||||
if (auto val = root["enable_stream_gui"]; val.is_bool())
|
||||
enable_stream_gui = val.get_bool();
|
||||
|
||||
if (auto val = root["sgsr"]; val.is_object())
|
||||
parse_sgsr_options(val.get_object());
|
||||
|
||||
@@ -207,7 +240,7 @@ configuration::configuration(xr::system & system)
|
||||
features[i] = val.get_bool();
|
||||
}
|
||||
|
||||
if (system.passthrough_supported() == xr::passthrough_type::none)
|
||||
if (system.passthrough_supported() == xr::system::passthrough_type::no_passthrough)
|
||||
passthrough_enabled = false;
|
||||
|
||||
if (auto val = root["override_foveation_enable"]; val.is_bool())
|
||||
@@ -233,7 +266,7 @@ configuration::configuration(xr::system & system)
|
||||
resolution_scale = 1.4;
|
||||
sgsr = {};
|
||||
openxr_post_processing = {};
|
||||
passthrough_enabled = system.passthrough_supported() == xr::passthrough_type::color;
|
||||
passthrough_enabled = system.passthrough_supported() == xr::system::passthrough_type::color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,7 +365,6 @@ void configuration::save()
|
||||
json << ",\"mic_unprocessed_audio\":" << std::boolalpha << mic_unprocessed_audio;
|
||||
json << ",\"fb_lower_body\":" << std::boolalpha << fb_lower_body;
|
||||
json << ",\"fb_hip\":" << std::boolalpha << fb_hip;
|
||||
json << ",\"enable_stream_gui\":" << std::boolalpha << enable_stream_gui;
|
||||
for (auto & [key, value]: features)
|
||||
json << "," << key << ":" << std::boolalpha << value;
|
||||
json << ",\"virtual_keyboard_layout\":" << json_string(virtual_keyboard_layout);
|
||||
|
||||
@@ -56,8 +56,6 @@ public:
|
||||
bool fb_lower_body = false;
|
||||
bool fb_hip = true;
|
||||
|
||||
bool enable_stream_gui = true;
|
||||
|
||||
// Snapdragon Game Super Resolution
|
||||
struct sgsr_settings
|
||||
{
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
#include "shard_accumulator.h"
|
||||
#include "scenes/stream.h" // IWYU pragma: keep
|
||||
#include "application.h"
|
||||
#include "scenes/stream.h"
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "xr/instance.h"
|
||||
|
||||
namespace wivrn
|
||||
{
|
||||
@@ -63,10 +63,10 @@ static bool is_complete(const shard_set & shards)
|
||||
return true;
|
||||
}
|
||||
|
||||
std::optional<uint16_t> shard_set::insert(data_shard && shard, xr::instance & instance)
|
||||
std::optional<uint16_t> shard_set::insert(data_shard && shard)
|
||||
{
|
||||
if (empty())
|
||||
feedback.received_first_packet = instance.now();
|
||||
feedback.received_first_packet = application::now();
|
||||
|
||||
auto idx = shard.shard_idx;
|
||||
if (idx >= data.size())
|
||||
@@ -121,12 +121,12 @@ void shard_accumulator::push_shard(video_stream_data_shard && shard)
|
||||
}
|
||||
else if (frame_diff == 0)
|
||||
{
|
||||
auto shard_idx = current.insert(std::move(shard), instance);
|
||||
auto shard_idx = current.insert(std::move(shard));
|
||||
try_submit_frame(shard_idx);
|
||||
}
|
||||
else if (frame_diff == 1)
|
||||
{
|
||||
next.insert(std::move(shard), instance);
|
||||
next.insert(std::move(shard));
|
||||
if (is_complete(next))
|
||||
{
|
||||
debug_why_not_sent(current);
|
||||
@@ -191,7 +191,7 @@ void shard_accumulator::try_submit_frame(uint16_t shard_idx)
|
||||
if (not frame_complete)
|
||||
return;
|
||||
|
||||
current.feedback.received_last_packet = instance.now();
|
||||
current.feedback.received_last_packet = application::now();
|
||||
current.feedback.sent_to_decoder = current.feedback.received_last_packet;
|
||||
data_shard::timing_info_t timing_info = data_shards.back()->timing_info.value_or(data_shard::timing_info_t{});
|
||||
current.feedback.encode_begin = timing_info.encode_begin;
|
||||
@@ -216,7 +216,7 @@ void shard_accumulator::try_submit_frame(uint16_t shard_idx)
|
||||
void shard_accumulator::send_feedback(wivrn::from_headset::feedback & feedback)
|
||||
{
|
||||
if (not feedback.received_last_packet)
|
||||
feedback.received_first_packet = instance.now();
|
||||
feedback.received_first_packet = application::now();
|
||||
auto scene = weak_scene.lock();
|
||||
if (scene)
|
||||
scene->send_feedback(feedback);
|
||||
|
||||
@@ -34,11 +34,6 @@ using decoder_impl = ::wivrn::ffmpeg::decoder;
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
namespace xr
|
||||
{
|
||||
class instance;
|
||||
}
|
||||
|
||||
namespace wivrn
|
||||
{
|
||||
|
||||
@@ -55,7 +50,7 @@ public:
|
||||
void reset(uint64_t frame_index);
|
||||
bool empty() const;
|
||||
|
||||
std::optional<uint16_t> insert(data_shard &&, xr::instance & instance);
|
||||
std::optional<uint16_t> insert(data_shard &&);
|
||||
|
||||
wivrn::from_headset::feedback feedback{};
|
||||
|
||||
@@ -75,13 +70,11 @@ private:
|
||||
shard_set current;
|
||||
shard_set next;
|
||||
std::weak_ptr<scenes::stream> weak_scene;
|
||||
xr::instance & instance;
|
||||
|
||||
public:
|
||||
explicit shard_accumulator(
|
||||
vk::raii::Device & device,
|
||||
vk::raii::PhysicalDevice & physical_device,
|
||||
xr::instance & instance,
|
||||
const wivrn::to_headset::video_stream_description::item & description,
|
||||
float fps,
|
||||
std::weak_ptr<scenes::stream> scene,
|
||||
@@ -89,8 +82,7 @@ public:
|
||||
decoder(std::make_shared<decoder_impl>(device, physical_device, description, fps, stream_index, scene, this)),
|
||||
current(stream_index),
|
||||
next(stream_index),
|
||||
weak_scene(scene),
|
||||
instance(instance)
|
||||
weak_scene(scene)
|
||||
{
|
||||
next.reset(1);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "application.h"
|
||||
#include "utils/alignment.h"
|
||||
#include "vk/allocation.h"
|
||||
#include <fastgltf/tools.hpp>
|
||||
@@ -114,10 +115,10 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
buffer_allocation copy_to_gpu(vk::raii::Device & device)
|
||||
buffer_allocation copy_to_gpu()
|
||||
{
|
||||
buffer_allocation gpu_buffer{
|
||||
device,
|
||||
application::get_device(),
|
||||
vk::BufferCreateInfo{
|
||||
.size = bytes.size(),
|
||||
.usage = usage},
|
||||
|
||||
@@ -345,9 +345,9 @@ imgui_context::imgui_context(
|
||||
|
||||
ImGui_ImplVulkan_InitInfo init_info = {
|
||||
.Instance = *application::get_vulkan_instance(),
|
||||
.PhysicalDevice = *physical_device,
|
||||
.Device = *device,
|
||||
.QueueFamily = queue_family_index,
|
||||
.PhysicalDevice = *application::get_physical_device(),
|
||||
.Device = *application::get_device(),
|
||||
.QueueFamily = application::queue_family_index(),
|
||||
.Queue = *queue.get_unsafe(),
|
||||
.RenderPass = *renderpass,
|
||||
.MinImageCount = 2,
|
||||
@@ -718,7 +718,7 @@ void imgui_context::new_frame(XrTime display_time)
|
||||
ImPlot::SetCurrentContext(plot_context);
|
||||
|
||||
if (last_display_time)
|
||||
io.DeltaTime = std::clamp((display_time - last_display_time) * 1e-9f, 0.001f, 0.0166f);
|
||||
io.DeltaTime = std::min((display_time - last_display_time) * 1e-9f, 0.0166f);
|
||||
last_display_time = display_time;
|
||||
|
||||
// Uses the window list from last frame
|
||||
@@ -1099,13 +1099,6 @@ ImTextureID imgui_context::load_texture(const std::string & filename)
|
||||
|
||||
void imgui_context::free_texture(ImTextureID texture)
|
||||
{
|
||||
// Make sure we are done using the texture
|
||||
std::vector<vk::Fence> fences;
|
||||
for (auto & f: command_buffers)
|
||||
fences.push_back(*f.fence);
|
||||
if (auto result = device.waitForFences(fences, true, 1'000'000'000); result != vk::Result::eSuccess)
|
||||
spdlog::error("vkWaitForfences: {}", vk::to_string(result));
|
||||
|
||||
textures.erase(texture);
|
||||
}
|
||||
|
||||
|
||||
@@ -785,7 +785,7 @@ entt::registry scene_loader::operator()(const std::filesystem::path & gltf_path)
|
||||
|
||||
// Copy the staging buffer to the GPU
|
||||
spdlog::debug("Uploading scene data ({} bytes) to GPU memory", staging_buffer.size());
|
||||
auto buffer = std::make_shared<buffer_allocation>(staging_buffer.copy_to_gpu(device));
|
||||
auto buffer = std::make_shared<buffer_allocation>(staging_buffer.copy_to_gpu());
|
||||
|
||||
for (auto & i: materials)
|
||||
i->buffer = buffer;
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "vk/allocation.h"
|
||||
#include "vk/pipeline.h"
|
||||
#include "vk/shader.h"
|
||||
#include "vk/specialization_constants.h"
|
||||
#include <boost/pfr/core.hpp>
|
||||
#include <entt/entity/entity.hpp>
|
||||
#include <entt/entt.hpp>
|
||||
@@ -536,11 +535,34 @@ vk::raii::Pipeline scene_renderer::create_pipeline(const pipeline_info & info)
|
||||
auto vertex_shader = load_shader(device, info.shader_name + ".vert");
|
||||
auto fragment_shader = load_shader(device, info.shader_name + ".frag");
|
||||
|
||||
auto specialization = make_specialization_constants(
|
||||
int32_t(info.nb_texcoords),
|
||||
VkBool32(info.dithering),
|
||||
VkBool32(info.alpha_cutout),
|
||||
VkBool32(info.skinning));
|
||||
std::array specialization_constants_desc{
|
||||
vk::SpecializationMapEntry{
|
||||
.constantID = 0,
|
||||
.offset = offsetof(pipeline_info, nb_texcoords),
|
||||
.size = sizeof(int32_t),
|
||||
},
|
||||
vk::SpecializationMapEntry{
|
||||
.constantID = 1,
|
||||
.offset = offsetof(pipeline_info, dithering),
|
||||
.size = sizeof(VkBool32),
|
||||
},
|
||||
vk::SpecializationMapEntry{
|
||||
.constantID = 2,
|
||||
.offset = offsetof(pipeline_info, alpha_cutout),
|
||||
.size = sizeof(VkBool32),
|
||||
},
|
||||
vk::SpecializationMapEntry{
|
||||
.constantID = 3,
|
||||
.offset = offsetof(pipeline_info, skinning),
|
||||
.size = sizeof(VkBool32),
|
||||
}};
|
||||
|
||||
vk::SpecializationInfo specialization{
|
||||
.mapEntryCount = specialization_constants_desc.size(),
|
||||
.pMapEntries = specialization_constants_desc.data(),
|
||||
.dataSize = sizeof(pipeline_info),
|
||||
.pData = &info,
|
||||
};
|
||||
|
||||
return vk::raii::Pipeline{
|
||||
device,
|
||||
@@ -551,14 +573,14 @@ vk::raii::Pipeline scene_renderer::create_pipeline(const pipeline_info & info)
|
||||
.stage = vk::ShaderStageFlagBits::eVertex,
|
||||
.module = *vertex_shader,
|
||||
.pName = "main",
|
||||
.pSpecializationInfo = specialization,
|
||||
.pSpecializationInfo = &specialization,
|
||||
|
||||
},
|
||||
vk::PipelineShaderStageCreateInfo{
|
||||
.stage = vk::ShaderStageFlagBits::eFragment,
|
||||
.module = *fragment_shader,
|
||||
.pName = "main",
|
||||
.pSpecializationInfo = specialization,
|
||||
.pSpecializationInfo = &specialization,
|
||||
|
||||
},
|
||||
},
|
||||
@@ -775,7 +797,7 @@ void scene_renderer::update_material_descriptor_set(renderer::material & materia
|
||||
device.updateDescriptorSets(write_ds, {});
|
||||
}
|
||||
|
||||
[[maybe_unused]] static void print_scene_hierarchy(const entt::registry & scene, entt::entity root = entt::null, int level = 0)
|
||||
static void print_scene_hierarchy(const entt::registry & scene, entt::entity root = entt::null, int level = 0)
|
||||
{
|
||||
if (level == 0)
|
||||
spdlog::info("Node hierarchy:");
|
||||
|
||||
@@ -139,42 +139,46 @@ text_rasterizer::text_rasterizer(vk::raii::Device & device, vk::raii::PhysicalDe
|
||||
|
||||
image_allocation text_rasterizer::create_image(vk::Extent2D size)
|
||||
{
|
||||
return {device,
|
||||
vk::ImageCreateInfo{
|
||||
.imageType = vk::ImageType::e2D,
|
||||
.format = text::format,
|
||||
.extent = {
|
||||
.width = size.width,
|
||||
.height = size.height,
|
||||
.depth = 1,
|
||||
},
|
||||
.mipLevels = 1,
|
||||
.arrayLayers = 1,
|
||||
.samples = vk::SampleCountFlagBits::e1,
|
||||
.tiling = vk::ImageTiling::eOptimal,
|
||||
.usage = vk::ImageUsageFlagBits::eSampled | vk::ImageUsageFlagBits::eTransferDst,
|
||||
.sharingMode = vk::SharingMode::eExclusive,
|
||||
.initialLayout = vk::ImageLayout::eUndefined,
|
||||
},
|
||||
VmaAllocationCreateInfo{
|
||||
.flags = 0,
|
||||
.usage = VMA_MEMORY_USAGE_AUTO,
|
||||
},
|
||||
"text_rasterizer image"};
|
||||
image_allocation alloc{device,
|
||||
vk::ImageCreateInfo{
|
||||
.imageType = vk::ImageType::e2D,
|
||||
.format = text::format,
|
||||
.extent = {
|
||||
.width = size.width,
|
||||
.height = size.height,
|
||||
.depth = 1,
|
||||
},
|
||||
.mipLevels = 1,
|
||||
.arrayLayers = 1,
|
||||
.samples = vk::SampleCountFlagBits::e1,
|
||||
.tiling = vk::ImageTiling::eOptimal,
|
||||
.usage = vk::ImageUsageFlagBits::eSampled | vk::ImageUsageFlagBits::eTransferDst,
|
||||
.sharingMode = vk::SharingMode::eExclusive,
|
||||
.initialLayout = vk::ImageLayout::eUndefined,
|
||||
},
|
||||
VmaAllocationCreateInfo{
|
||||
.flags = 0,
|
||||
.usage = VMA_MEMORY_USAGE_AUTO,
|
||||
}};
|
||||
|
||||
application::set_debug_reports_name<vk::Image>(alloc, "text_rasterizer image");
|
||||
return alloc;
|
||||
}
|
||||
|
||||
buffer_allocation text_rasterizer::create_buffer(size_t size)
|
||||
{
|
||||
return {device,
|
||||
vk::BufferCreateInfo{
|
||||
.size = size,
|
||||
.usage = vk::BufferUsageFlagBits::eTransferSrc,
|
||||
},
|
||||
VmaAllocationCreateInfo{
|
||||
.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT,
|
||||
.usage = VMA_MEMORY_USAGE_AUTO,
|
||||
},
|
||||
"text_rasterizer buffer"};
|
||||
buffer_allocation alloc{device,
|
||||
vk::BufferCreateInfo{
|
||||
.size = size,
|
||||
.usage = vk::BufferUsageFlagBits::eTransferSrc,
|
||||
},
|
||||
VmaAllocationCreateInfo{
|
||||
.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT,
|
||||
.usage = VMA_MEMORY_USAGE_AUTO,
|
||||
}};
|
||||
application::set_debug_reports_name<vk::Buffer>(alloc, "text_rasterizer buffer");
|
||||
|
||||
return alloc;
|
||||
}
|
||||
|
||||
text_rasterizer::~text_rasterizer()
|
||||
|
||||
+3
-1
@@ -51,6 +51,8 @@ scene::scene(key, const meta & current_meta, std::span<const vk::Format> support
|
||||
queue_family_index(application::instance().vk_queue_family_index),
|
||||
current_meta(current_meta)
|
||||
{
|
||||
passthrough_supported = system.passthrough_supported();
|
||||
|
||||
swapchain_format = vk::Format::eUndefined;
|
||||
spdlog::info("Supported swapchain formats:");
|
||||
|
||||
@@ -441,7 +443,7 @@ std::pair<entt::entity, components::node &> scene::load_gltf(const std::filesyst
|
||||
node.layer_mask = layer_mask;
|
||||
|
||||
assert(renderer);
|
||||
scene_loader loader(device, physical_device, queue, queue_family_index, renderer->get_default_material());
|
||||
scene_loader loader(device, physical_device, queue, application::queue_family_index(), renderer->get_default_material());
|
||||
|
||||
loader.add_prefab(world, loader(path), entity);
|
||||
|
||||
|
||||
@@ -103,6 +103,7 @@ public:
|
||||
protected:
|
||||
vk::Format swapchain_format;
|
||||
vk::Format depth_format;
|
||||
xr::system::passthrough_type passthrough_supported;
|
||||
bool composition_layer_depth_test_supported;
|
||||
bool composition_layer_color_scale_bias_supported;
|
||||
|
||||
|
||||
+114
-133
@@ -383,18 +383,9 @@ void scenes::lobby::connect(const configuration::server_data & data)
|
||||
data.manual);
|
||||
}
|
||||
|
||||
std::optional<glm::vec3> scenes::lobby::check_recenter_gesture(xr::spaces space, const std::optional<std::array<xr::hand_tracker::joint, XR_HAND_JOINT_COUNT_EXT>> & joints)
|
||||
std::optional<glm::vec3> scenes::lobby::check_recenter_gesture(const std::array<xr::hand_tracker::joint, XR_HAND_JOINT_COUNT_EXT> & joints)
|
||||
{
|
||||
if (recentering_context and std::get<0>(*recentering_context) != space)
|
||||
return std::nullopt;
|
||||
|
||||
if (not joints)
|
||||
{
|
||||
recentering_context.reset();
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
const auto & palm = (*joints)[XR_HAND_JOINT_PALM_EXT].first;
|
||||
const auto & palm = joints[XR_HAND_JOINT_PALM_EXT].first;
|
||||
const auto & o = palm.pose.orientation;
|
||||
const auto & p = palm.pose.position;
|
||||
glm::quat q{o.w, o.x, o.y, o.z};
|
||||
@@ -402,130 +393,102 @@ std::optional<glm::vec3> scenes::lobby::check_recenter_gesture(xr::spaces space,
|
||||
|
||||
if (glm::dot(q * glm::vec3(0, 1, 0), glm::vec3(0, -1, 0)) > constants::lobby::recenter_cosangle_min)
|
||||
{
|
||||
recentering_context.emplace(space, glm::vec3{}, 0);
|
||||
return v + glm::vec3(0, constants::lobby::recenter_distance_up, 0) + q * glm::vec3(0, 0, -constants::lobby::recenter_distance_front);
|
||||
}
|
||||
|
||||
recentering_context.reset();
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
std::optional<glm::vec3> scenes::lobby::check_recenter_action(XrTime predicted_display_time, glm::vec3 head_position)
|
||||
{
|
||||
xr::spaces controller;
|
||||
glm::vec3 recenter_position;
|
||||
float recenter_distance;
|
||||
std::optional<std::pair<glm::vec3, glm::quat>> aim;
|
||||
glm::vec3 offset_position;
|
||||
glm::quat offset_orientation;
|
||||
|
||||
if (recentering_context)
|
||||
if (application::read_action_bool(recenter_left_action).value_or(std::pair{0, false}).second)
|
||||
{
|
||||
controller = std::get<0>(*recentering_context);
|
||||
bool state;
|
||||
switch (controller)
|
||||
{
|
||||
case xr::spaces::aim_left:
|
||||
state = application::read_action_bool(recenter_left_action).value_or(std::pair{0, false}).second;
|
||||
break;
|
||||
|
||||
case xr::spaces::aim_right:
|
||||
state = application::read_action_bool(recenter_right_action).value_or(std::pair{0, false}).second;
|
||||
break;
|
||||
|
||||
default:
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
if (not state)
|
||||
{
|
||||
recentering_context.reset();
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
else if (auto state = application::read_action_bool(recenter_left_action); state and state->second)
|
||||
controller = xr::spaces::aim_left;
|
||||
else if (auto state = application::read_action_bool(recenter_right_action); state and state->second)
|
||||
controller = xr::spaces::aim_right;
|
||||
else
|
||||
return std::nullopt;
|
||||
|
||||
auto aim = application::locate_controller(application::space(controller), application::space(xr::spaces::world), predicted_display_time);
|
||||
|
||||
if (not aim)
|
||||
{
|
||||
// The controller cannot be located
|
||||
recentering_context.reset();
|
||||
return std::nullopt;
|
||||
aim = application::locate_controller(application::space(xr::spaces::aim_left), application::space(xr::spaces::world), predicted_display_time);
|
||||
std::tie(offset_position, offset_orientation) = input->offset[xr::spaces::aim_left];
|
||||
}
|
||||
|
||||
// Handle controller offset
|
||||
auto [offset_position, offset_orientation] = input->offset[controller];
|
||||
aim->first = aim->first + glm::mat3_cast(aim->second * offset_orientation) * offset_position;
|
||||
aim->second = aim->second * offset_orientation;
|
||||
|
||||
if (not recentering_context)
|
||||
if (application::read_action_bool(recenter_right_action).value_or(std::pair{0, false}).second)
|
||||
{
|
||||
// First frame of recentering
|
||||
imgui_context::controller_state state{
|
||||
.active = true,
|
||||
.aim_position = aim->first,
|
||||
.aim_orientation = aim->second,
|
||||
};
|
||||
aim = application::locate_controller(application::space(xr::spaces::aim_right), application::space(xr::spaces::world), predicted_display_time);
|
||||
std::tie(offset_position, offset_orientation) = input->offset[xr::spaces::aim_right];
|
||||
}
|
||||
|
||||
imgui_ctx->compute_pointer_position(state);
|
||||
if (aim)
|
||||
{
|
||||
// Handle controller offset
|
||||
aim->first = aim->first + glm::mat3_cast(aim->second * offset_orientation) * offset_position;
|
||||
aim->second = aim->second * offset_orientation;
|
||||
|
||||
if (state.pointer_position) // TODO: check that the pointer is inside an imgui window
|
||||
if (not gui_recenter_position or not gui_recenter_distance)
|
||||
{
|
||||
auto M = glm::mat3_cast(imgui_ctx->layers()[0].orientation);
|
||||
// First frame where the recenter action is active
|
||||
imgui_context::controller_state state{
|
||||
.active = true,
|
||||
.aim_position = aim->first,
|
||||
.aim_orientation = aim->second,
|
||||
};
|
||||
|
||||
// Pointer position in world
|
||||
glm::vec3 world_pointer_position = imgui_ctx->rw_from_vp(*state.pointer_position);
|
||||
imgui_ctx->compute_pointer_position(state);
|
||||
|
||||
// Pointer position in GUI
|
||||
recenter_position = glm::transpose(M) * (world_pointer_position - imgui_ctx->layers()[0].position);
|
||||
recenter_distance = glm::length(state.aim_position - world_pointer_position);
|
||||
if (state.pointer_position) // TODO: check that the pointer is inside an imgui window
|
||||
{
|
||||
auto M = glm::mat3_cast(imgui_ctx->layers()[0].orientation);
|
||||
|
||||
// Pointer position in world
|
||||
glm::vec3 world_pointer_position = imgui_ctx->rw_from_vp(*state.pointer_position);
|
||||
|
||||
// Pointer position in GUI
|
||||
gui_recenter_position = glm::transpose(M) * (world_pointer_position - imgui_ctx->layers()[0].position);
|
||||
gui_recenter_distance = glm::length(state.aim_position - world_pointer_position);
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_recenter_position = glm::vec3(0, 0, 0);
|
||||
gui_recenter_distance = constants::lobby::recenter_action_distance;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use the center of the GUI if the controller points outside of the GUI
|
||||
recenter_position = glm::vec3(0, 0, 0);
|
||||
recenter_distance = constants::lobby::recenter_action_distance;
|
||||
}
|
||||
// Subsequent frames: find the GUI position that gives the correct world pointer position
|
||||
glm::vec3 controller_direction = -glm::column(glm::mat3_cast(aim->second), 2);
|
||||
glm::vec3 wanted_world_pointer_position = aim->first + controller_direction * *gui_recenter_distance;
|
||||
|
||||
recentering_context.emplace(controller, recenter_position, recenter_distance);
|
||||
return std::nullopt;
|
||||
// I'm sure there's an analytical solution but I can't be bothered to write it so
|
||||
// let's use a gradient descent instead
|
||||
auto f = [&](glm::vec3 new_gui_position) {
|
||||
auto q = compute_gui_orientation(head_position, new_gui_position);
|
||||
auto M = glm::mat3_cast(q); // plane-to-world transform
|
||||
|
||||
glm::vec3 world_pointer_position = new_gui_position + M * *gui_recenter_position;
|
||||
|
||||
return world_pointer_position - wanted_world_pointer_position;
|
||||
};
|
||||
|
||||
// One step is usually enough, the solution will continuously improve in the next frames
|
||||
glm::vec3 gui_position = imgui_ctx->layers()[0].position;
|
||||
float eps = 0.01;
|
||||
glm::vec3 obj = f(gui_position);
|
||||
glm::vec3 obj_dx = (f(gui_position + glm::vec3(eps, 0, 0)) - obj) / eps;
|
||||
glm::vec3 obj_dy = (f(gui_position + glm::vec3(0, eps, 0)) - obj) / eps;
|
||||
glm::vec3 obj_dz = (f(gui_position + glm::vec3(0, 0, eps)) - obj) / eps;
|
||||
|
||||
glm::mat3 jacobian{obj_dx, obj_dy, obj_dz};
|
||||
|
||||
gui_position -= glm::inverse(jacobian) * obj;
|
||||
|
||||
return gui_position;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Subsequent frames: find the GUI position that gives the correct world pointer position
|
||||
std::tie(controller, recenter_position, recenter_distance) = *recentering_context;
|
||||
|
||||
glm::vec3 controller_direction = -glm::column(glm::mat3_cast(aim->second), 2);
|
||||
glm::vec3 wanted_world_pointer_position = aim->first + controller_direction * recenter_distance;
|
||||
|
||||
// I'm sure there's an analytical solution but I can't be bothered to write it so
|
||||
// let's use a gradient descent instead
|
||||
auto f = [&](glm::vec3 new_gui_position) {
|
||||
auto q = compute_gui_orientation(head_position, new_gui_position);
|
||||
auto M = glm::mat3_cast(q); // plane-to-world transform
|
||||
|
||||
glm::vec3 world_pointer_position = new_gui_position + M * recenter_position;
|
||||
|
||||
return world_pointer_position - wanted_world_pointer_position;
|
||||
};
|
||||
|
||||
// One step is usually enough, the solution will continuously improve in the next frames
|
||||
glm::vec3 gui_position = imgui_ctx->layers()[0].position;
|
||||
float eps = 0.01;
|
||||
glm::vec3 obj = f(gui_position);
|
||||
glm::vec3 obj_dx = (f(gui_position + glm::vec3(eps, 0, 0)) - obj) / eps;
|
||||
glm::vec3 obj_dy = (f(gui_position + glm::vec3(0, eps, 0)) - obj) / eps;
|
||||
glm::vec3 obj_dz = (f(gui_position + glm::vec3(0, 0, eps)) - obj) / eps;
|
||||
|
||||
glm::mat3 jacobian{obj_dx, obj_dy, obj_dz};
|
||||
|
||||
gui_position -= glm::inverse(jacobian) * obj;
|
||||
|
||||
return gui_position;
|
||||
gui_recenter_position.reset();
|
||||
}
|
||||
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
std::optional<glm::vec3> scenes::lobby::check_recenter_gui(glm::vec3 head_position, glm::quat head_orientation)
|
||||
@@ -649,24 +612,26 @@ void scenes::lobby::render(const XrFrameState & frame_state)
|
||||
if (!new_gui_position and head_position)
|
||||
new_gui_position = check_recenter_action(frame_state.predictedDisplayTime, head_position->first);
|
||||
|
||||
if (left_hand and right_hand)
|
||||
if (application::get_hand_tracking_supported())
|
||||
{
|
||||
auto left = left_hand->locate(world_space, frame_state.predictedDisplayTime);
|
||||
auto right = right_hand->locate(world_space, frame_state.predictedDisplayTime);
|
||||
auto left = application::get_left_hand().locate(world_space, frame_state.predictedDisplayTime);
|
||||
auto right = application::get_right_hand().locate(world_space, frame_state.predictedDisplayTime);
|
||||
|
||||
hand_model::apply(world, left, right);
|
||||
|
||||
if (left and xr::hand_tracker::check_flags(*left, XR_SPACE_LOCATION_POSITION_TRACKED_BIT | XR_SPACE_LOCATION_POSITION_VALID_BIT, 0))
|
||||
{
|
||||
hide_left_controller = true;
|
||||
if (!new_gui_position)
|
||||
new_gui_position = check_recenter_gesture(*left);
|
||||
}
|
||||
|
||||
if (right and xr::hand_tracker::check_flags(*right, XR_SPACE_LOCATION_POSITION_TRACKED_BIT | XR_SPACE_LOCATION_POSITION_VALID_BIT, 0))
|
||||
{
|
||||
hide_right_controller = true;
|
||||
|
||||
if (not new_gui_position)
|
||||
new_gui_position = check_recenter_gesture(xr::spaces::palm_left, left);
|
||||
|
||||
if (not new_gui_position)
|
||||
new_gui_position = check_recenter_gesture(xr::spaces::palm_right, right);
|
||||
if (!new_gui_position)
|
||||
new_gui_position = check_recenter_gesture(*right);
|
||||
}
|
||||
}
|
||||
|
||||
if (head_position && new_gui_position)
|
||||
@@ -798,7 +763,7 @@ void scenes::lobby::on_focused()
|
||||
// assert(std::ranges::all_of(views, [height](const XrViewConfigurationView & view) { return view.recommendedImageRectHeight == height; }));
|
||||
|
||||
renderer.emplace(device, physical_device, queue, commandpool);
|
||||
loader.emplace(device, physical_device, queue, queue_family_index, renderer->get_default_material());
|
||||
loader.emplace(device, physical_device, queue, application::queue_family_index(), renderer->get_default_material());
|
||||
|
||||
lobby_entity = load_gltf("ground.gltf", layer_lobby).first;
|
||||
|
||||
@@ -835,6 +800,12 @@ void scenes::lobby::on_focused()
|
||||
xyz_axes_right_controller = load_gltf("xyz-arrows.glb", layer_controllers).first;
|
||||
#endif
|
||||
|
||||
if (application::get_hand_tracking_supported())
|
||||
{
|
||||
hand_model::add_hand(*this, XR_HAND_LEFT_EXT, "left-hand.glb", layer_controllers);
|
||||
hand_model::add_hand(*this, XR_HAND_RIGHT_EXT, "right-hand.glb", layer_controllers);
|
||||
}
|
||||
|
||||
recenter_left_action = get_action("recenter_left").first;
|
||||
recenter_right_action = get_action("recenter_right").first;
|
||||
|
||||
@@ -856,18 +827,20 @@ void scenes::lobby::on_focused()
|
||||
.haptic_output = get_action("right_haptic").first,
|
||||
},
|
||||
};
|
||||
|
||||
if (system.hand_tracking_supported())
|
||||
if (auto & hand = application::get_left_hand())
|
||||
{
|
||||
left_hand = session.create_hand_tracker(XR_HAND_LEFT_EXT);
|
||||
right_hand = session.create_hand_tracker(XR_HAND_RIGHT_EXT);
|
||||
hand_model::add_hand(*this, XR_HAND_LEFT_EXT, "left-hand.glb", layer_controllers);
|
||||
hand_model::add_hand(*this, XR_HAND_RIGHT_EXT, "right-hand.glb", layer_controllers);
|
||||
imgui_inputs.push_back({.hand = &*left_hand});
|
||||
imgui_inputs.push_back({.hand = &*right_hand});
|
||||
imgui_inputs.push_back(
|
||||
{
|
||||
.hand = &hand,
|
||||
});
|
||||
}
|
||||
if (auto & hand = application::get_right_hand())
|
||||
{
|
||||
imgui_inputs.push_back(
|
||||
{
|
||||
.hand = &hand,
|
||||
});
|
||||
}
|
||||
|
||||
face_tracker = xr::make_face_tracker(instance, system, session);
|
||||
|
||||
// 0.4mm / pixel
|
||||
std::vector<imgui_context::viewport> vps{
|
||||
@@ -911,9 +884,20 @@ void scenes::lobby::on_focused()
|
||||
|
||||
imgui_ctx.emplace(physical_device, device, queue_family_index, queue, imgui_inputs, swapchain_imgui, vps);
|
||||
|
||||
std::string image;
|
||||
/* Could be used for more patriotics logos
|
||||
|
||||
auto t = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
|
||||
auto tm = std::localtime(&t);
|
||||
std::string image = tm->tm_mon == 5 ? "wivrn-pride" : "wivrn";
|
||||
|
||||
switch (tm->tm_mon)
|
||||
{
|
||||
default:
|
||||
image = "wivrn";
|
||||
break;
|
||||
}
|
||||
*/
|
||||
image = "wivrn";
|
||||
try
|
||||
{
|
||||
about_picture = imgui_ctx->load_texture(image + ".ktx2");
|
||||
@@ -958,9 +942,6 @@ void scenes::lobby::on_unfocused()
|
||||
world.clear(); // Must be cleared before the renderer so that the descriptor sets are freed before their pools
|
||||
|
||||
input.reset();
|
||||
left_hand.reset();
|
||||
right_hand.reset();
|
||||
face_tracker.emplace<std::monostate>();
|
||||
|
||||
loader.reset();
|
||||
renderer.reset();
|
||||
|
||||
+4
-14
@@ -29,9 +29,7 @@
|
||||
#include "wivrn_config.h"
|
||||
#include "wivrn_discover.h"
|
||||
#include "wivrn_packets.h"
|
||||
#include "xr/face_tracker.h"
|
||||
#include <vulkan/vulkan_raii.hpp>
|
||||
#include <openxr/openxr.h>
|
||||
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
@@ -67,11 +65,6 @@ class lobby : public scene_impl<lobby>
|
||||
|
||||
std::optional<imgui_context> imgui_ctx;
|
||||
|
||||
std::optional<xr::hand_tracker> left_hand;
|
||||
std::optional<xr::hand_tracker> right_hand;
|
||||
|
||||
xr::face_tracker face_tracker;
|
||||
|
||||
std::string selected_item;
|
||||
std::unique_ptr<asset> license;
|
||||
|
||||
@@ -101,10 +94,8 @@ class lobby : public scene_impl<lobby>
|
||||
|
||||
XrAction recenter_left_action = XR_NULL_HANDLE;
|
||||
XrAction recenter_right_action = XR_NULL_HANDLE;
|
||||
// std::optional<glm::vec3> gui_recenter_position;
|
||||
// std::optional<float> gui_recenter_distance;
|
||||
// Which controller is used for recentering, position of the pointed point in the GUI, in GUI axes, and distance between the controller and the pointed point during recentering
|
||||
std::optional<std::tuple<xr::spaces, glm::vec3, float>> recentering_context;
|
||||
std::optional<glm::vec3> gui_recenter_position;
|
||||
std::optional<float> gui_recenter_distance;
|
||||
bool recenter_gui = true;
|
||||
void move_gui(glm::vec3 head_position, glm::vec3 new_gui_position);
|
||||
|
||||
@@ -129,7 +120,6 @@ class lobby : public scene_impl<lobby>
|
||||
ImTextureID about_picture;
|
||||
ImTextureID default_icon;
|
||||
std::unordered_map<std::string, ImTextureID> app_icons;
|
||||
std::optional<XrTime> timestamp_start_application;
|
||||
|
||||
virtual_keyboard keyboard;
|
||||
|
||||
@@ -146,7 +136,7 @@ class lobby : public scene_impl<lobby>
|
||||
void draw_features_status(XrTime predicted_display_time);
|
||||
void gui_connecting(locked_notifiable<pin_request_data> & request);
|
||||
void gui_enter_pin(locked_notifiable<pin_request_data> & request);
|
||||
void gui_connected(XrTime predicted_display_time);
|
||||
void gui_connected();
|
||||
void gui_server_list();
|
||||
void gui_new_server();
|
||||
void gui_settings();
|
||||
@@ -162,7 +152,7 @@ class lobby : public scene_impl<lobby>
|
||||
void connect(const configuration::server_data & data);
|
||||
std::unique_ptr<wivrn_session> connect_to_session(wivrn_discover::service service, bool manual_connection);
|
||||
|
||||
std::optional<glm::vec3> check_recenter_gesture(xr::spaces space, const std::optional<std::array<xr::hand_tracker::joint, XR_HAND_JOINT_COUNT_EXT>> & joints);
|
||||
std::optional<glm::vec3> check_recenter_gesture(const std::array<xr::hand_tracker::joint, XR_HAND_JOINT_COUNT_EXT> & joints);
|
||||
std::optional<glm::vec3> check_recenter_action(XrTime predicted_display_time, glm::vec3 head_position);
|
||||
std::optional<glm::vec3> check_recenter_gui(glm::vec3 head_position, glm::quat head_orientation);
|
||||
|
||||
|
||||
+37
-68
@@ -34,13 +34,11 @@
|
||||
#include "utils/overloaded.h"
|
||||
#include "utils/ranges.h"
|
||||
#include "version.h"
|
||||
#include "xr/body_tracker.h"
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <chrono>
|
||||
#include <filesystem>
|
||||
#include <glm/gtc/quaternion.hpp>
|
||||
#include <imspinner.h>
|
||||
#include <ranges>
|
||||
#include <spdlog/fmt/fmt.h>
|
||||
#include <string>
|
||||
@@ -247,7 +245,6 @@ void scenes::lobby::gui_connecting(locked_notifiable<pin_request_data> & pin_req
|
||||
if (next_scene)
|
||||
{
|
||||
current_tab = tab::connected;
|
||||
timestamp_start_application.reset();
|
||||
ImGui::CloseCurrentPopup();
|
||||
return;
|
||||
}
|
||||
@@ -378,7 +375,7 @@ void scenes::lobby::gui_enter_pin(locked_notifiable<pin_request_data> & pin_requ
|
||||
imgui_ctx->vibrate_on_hover();
|
||||
}
|
||||
|
||||
void scenes::lobby::gui_connected(XrTime predicted_display_time)
|
||||
void scenes::lobby::gui_connected()
|
||||
{
|
||||
if (not next_scene)
|
||||
{
|
||||
@@ -403,17 +400,14 @@ void scenes::lobby::gui_connected(XrTime predicted_display_time)
|
||||
|
||||
auto apps = next_scene->get_applications();
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, {20, 20});
|
||||
if (apps->empty())
|
||||
if (apps->applications.empty())
|
||||
{
|
||||
CenterTextHV(_("Start an application on the server to start streaming."));
|
||||
}
|
||||
else
|
||||
{
|
||||
bool app_starting = timestamp_start_application and (predicted_display_time - *timestamp_start_application < 10'000'000'000);
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, {20, 0});
|
||||
ImGui::BeginDisabled(app_starting);
|
||||
ImGui::BeginChild("Main", ImGui::GetWindowSize() - ImGui::GetCursorPos() - ImVec2(0, disconnect_size.y + 80), 0, app_starting ? ImGuiWindowFlags_NoScrollWithMouse : 0);
|
||||
ImGui::BeginChild("Main", ImGui::GetWindowSize() - ImGui::GetCursorPos() - ImVec2(0, disconnect_size.y + 80), 0);
|
||||
|
||||
ImGui::Indent(20);
|
||||
if (server_name.empty())
|
||||
@@ -432,7 +426,7 @@ void scenes::lobby::gui_connected(XrTime predicted_display_time)
|
||||
ImGui::Indent((usable_window_width - icon_line_width) / 2);
|
||||
|
||||
auto t0 = std::chrono::steady_clock::now();
|
||||
for (const auto [index, app]: utils::enumerate(*apps))
|
||||
for (const auto [index, app]: utils::enumerate(apps->applications))
|
||||
{
|
||||
ImTextureID texture = [&]() -> ImTextureID {
|
||||
if (app.image.empty())
|
||||
@@ -463,11 +457,8 @@ void scenes::lobby::gui_connected(XrTime predicted_display_time)
|
||||
}();
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, 0);
|
||||
if (icon(app.name + "##" + app.id, texture, {256, 256}, ImGuiButtonFlags_PressedOnClickRelease, {icon_width, 0}))
|
||||
{
|
||||
timestamp_start_application = predicted_display_time;
|
||||
if (icon(app.name + "##" + app.id, texture, {256, 256}, 0, {icon_width, 0}))
|
||||
next_scene->start_application(app.id);
|
||||
}
|
||||
imgui_ctx->vibrate_on_hover();
|
||||
ImGui::PopStyleColor(); // ImGuiCol_Button
|
||||
|
||||
@@ -479,7 +470,7 @@ void scenes::lobby::gui_connected(XrTime predicted_display_time)
|
||||
std::vector<std::pair<std::string, ImTextureID>> to_be_removed;
|
||||
for (const auto & [app_id, app_icon]: app_icons)
|
||||
{
|
||||
if (not std::ranges::contains(*apps, app_id, &scenes::stream::app::id))
|
||||
if (not std::ranges::contains(apps->applications, app_id, &to_headset::application_list::application::id))
|
||||
to_be_removed.emplace_back(app_id, app_icon);
|
||||
}
|
||||
for (const auto & [app_id, app_icon]: to_be_removed)
|
||||
@@ -490,26 +481,12 @@ void scenes::lobby::gui_connected(XrTime predicted_display_time)
|
||||
|
||||
ScrollWhenDragging();
|
||||
ImGui::EndChild();
|
||||
ImGui::EndDisabled();
|
||||
|
||||
if (app_starting)
|
||||
{
|
||||
ImGui::SetCursorPos(ImGui::GetWindowSize() / 2 - ImVec2{200, 200} - ImGui::GetStyle().FramePadding);
|
||||
ImSpinner::SpinnerAng("App starting spinner",
|
||||
200, // Radius
|
||||
40, // Thickness
|
||||
ImColor{1.f, 1.f, 1.f, 1.f}, // Colour
|
||||
ImColor{1.f, 1.f, 1.f, 0.f}, // Background
|
||||
6, // Velocity
|
||||
0.75f * 2 * M_PI // Angle
|
||||
);
|
||||
}
|
||||
|
||||
ImGui::PopStyleVar(); // ImGuiStyleVar_WindowPadding
|
||||
}
|
||||
ImGui::PopStyleVar();
|
||||
|
||||
ImGui::SetCursorPos(ImGui::GetWindowSize() - disconnect_size - ImVec2{50, 50});
|
||||
ImGui::SetCursorPosX(ImGui::GetWindowSize().x - disconnect_size.x - 50);
|
||||
ImGui::SetCursorPosY(ImGui::GetWindowSize().y - disconnect_size.y - 50);
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.8f, 0.2f, 0.2f, 0.40f));
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.8f, 0.2f, 0.2f, 1.00f));
|
||||
@@ -890,7 +867,7 @@ void scenes::lobby::gui_settings()
|
||||
ImGui::EndDisabled();
|
||||
}
|
||||
{
|
||||
ImGui::BeginDisabled(not system.hand_tracking_supported());
|
||||
ImGui::BeginDisabled(not application::get_hand_tracking_supported());
|
||||
bool enabled = config.check_feature(feature::hand_tracking);
|
||||
if (ImGui::Checkbox(_S("Enable hand tracking"), &enabled))
|
||||
{
|
||||
@@ -914,7 +891,7 @@ void scenes::lobby::gui_settings()
|
||||
ImGui::EndDisabled();
|
||||
}
|
||||
{
|
||||
ImGui::BeginDisabled(std::holds_alternative<std::monostate>(face_tracker));
|
||||
ImGui::BeginDisabled(not application::get_face_tracking_supported());
|
||||
bool enabled = config.check_feature(feature::face_tracking);
|
||||
if (ImGui::Checkbox(_S("Enable face tracking"), &enabled))
|
||||
{
|
||||
@@ -926,9 +903,8 @@ void scenes::lobby::gui_settings()
|
||||
imgui_ctx->vibrate_on_hover();
|
||||
}
|
||||
|
||||
auto body_tracker = system.body_tracker_supported();
|
||||
{
|
||||
ImGui::BeginDisabled(body_tracker == xr::body_tracker_type::none);
|
||||
ImGui::BeginDisabled(not application::get_body_tracking_supported());
|
||||
bool enabled = config.check_feature(feature::body_tracking);
|
||||
if (ImGui::Checkbox(_S("Enable body tracking"), &enabled))
|
||||
{
|
||||
@@ -943,14 +919,19 @@ void scenes::lobby::gui_settings()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (body_tracker == xr::body_tracker_type::fb)
|
||||
imgui_ctx->tooltip(_("Requires 'Hand and body tracking' to be enabled in the Quest movement tracking settings,\notherwise body data will be guessed from controller and headset positions"));
|
||||
std::visit(utils::overloaded{
|
||||
[](auto &) {},
|
||||
[this](xr::fb_body_tracker &) {
|
||||
imgui_ctx->tooltip(_("Requires 'Hand and body tracking' to be enabled in the Quest movement tracking settings,\notherwise body data will be guessed from controller and headset positions"));
|
||||
},
|
||||
},
|
||||
application::get_body_tracker());
|
||||
}
|
||||
}
|
||||
|
||||
imgui_ctx->vibrate_on_hover();
|
||||
}
|
||||
if (body_tracker == xr::body_tracker_type::fb)
|
||||
if (std::holds_alternative<xr::fb_body_tracker>(application::get_body_tracker()))
|
||||
{
|
||||
ImGui::BeginDisabled(not config.check_feature(feature::body_tracking));
|
||||
ImGui::Indent();
|
||||
@@ -976,7 +957,7 @@ void scenes::lobby::gui_settings()
|
||||
ImGui::EndDisabled();
|
||||
}
|
||||
|
||||
ImGui::BeginDisabled(system.passthrough_supported() == xr::passthrough_type::none);
|
||||
ImGui::BeginDisabled(passthrough_supported == xr::system::passthrough_type::no_passthrough);
|
||||
if (ImGui::Checkbox(_S("Enable video passthrough in lobby"), &config.passthrough_enabled))
|
||||
{
|
||||
setup_passthrough();
|
||||
@@ -987,13 +968,6 @@ void scenes::lobby::gui_settings()
|
||||
imgui_ctx->tooltip(_("This feature is not supported by your headset"));
|
||||
ImGui::EndDisabled();
|
||||
|
||||
{
|
||||
ImGui::Checkbox(_S("Enable in-stream window"), &config.enable_stream_gui);
|
||||
imgui_ctx->vibrate_on_hover();
|
||||
if (ImGui::IsItemHovered())
|
||||
imgui_ctx->tooltip(_("Enables the configuration window to be shown while the game is streaming.\nIf enabled, the window is activated by pressing both thumbsticks."));
|
||||
}
|
||||
|
||||
ImGui::PopStyleVar(); // ImGuiStyleVar_ItemSpacing
|
||||
}
|
||||
|
||||
@@ -1276,6 +1250,9 @@ void scenes::lobby::gui_about()
|
||||
ImGui::SetCursorPosX(win_width / 4);
|
||||
|
||||
ImGui::Image(about_picture, {win_width / 2, win_width / 2});
|
||||
ImGui::PushFont(nullptr, constants::gui::font_size_large);
|
||||
CenterTextH(std::string("Sneed'n'Chuck Edition"));
|
||||
ImGui::PopFont();
|
||||
}
|
||||
|
||||
void scenes::lobby::gui_first_run()
|
||||
@@ -1305,12 +1282,12 @@ void scenes::lobby::gui_first_run()
|
||||
item{
|
||||
.f = feature::face_tracking,
|
||||
.text = _S("Enable face tracking?"),
|
||||
.supported = not std::holds_alternative<std::monostate>(face_tracker),
|
||||
.supported = application::get_face_tracking_supported(),
|
||||
},
|
||||
item{
|
||||
.f = feature::body_tracking,
|
||||
.text = _S("Enable body tracking?"),
|
||||
.supported = system.body_tracker_supported() != xr::body_tracker_type::none,
|
||||
.supported = application::get_body_tracking_supported(),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1640,22 +1617,11 @@ static auto face_weights()
|
||||
return res;
|
||||
}
|
||||
|
||||
static const char * get_face_icon(XrTime predicted_display_time, xr::face_tracker & face_tracker)
|
||||
static const char * get_face_icon(XrTime predicted_display_time)
|
||||
{
|
||||
static const auto w = face_weights();
|
||||
wivrn::from_headset::tracking::fb_face2 expression;
|
||||
const char * result = nullptr;
|
||||
std::visit(utils::overloaded{
|
||||
[](std::monostate &) {},
|
||||
[&](xr::htc_face_tracker &) { result = ICON_FA_FACE_SMILE_WINK; },
|
||||
[&](auto & ft) {
|
||||
ft.get_weights(predicted_display_time, expression);
|
||||
},
|
||||
},
|
||||
face_tracker);
|
||||
|
||||
if (result)
|
||||
return result;
|
||||
std::get<xr::fb_face_tracker2>(application::get_face_tracker()).get_weights(predicted_display_time, expression);
|
||||
|
||||
if (not expression.is_valid)
|
||||
return ICON_FA_FACE_MEH;
|
||||
@@ -1698,7 +1664,7 @@ void scenes::lobby::draw_features_status(XrTime predicted_display_time)
|
||||
.icon_disabled = ICON_FA_MICROPHONE_SLASH,
|
||||
});
|
||||
|
||||
if (system.hand_tracking_supported())
|
||||
if (application::get_hand_tracking_supported())
|
||||
{
|
||||
items.push_back({
|
||||
.f = feature::hand_tracking,
|
||||
@@ -1719,18 +1685,21 @@ void scenes::lobby::draw_features_status(XrTime predicted_display_time)
|
||||
});
|
||||
}
|
||||
|
||||
if (not std::holds_alternative<std::monostate>(face_tracker))
|
||||
if (application::get_face_tracking_supported())
|
||||
{
|
||||
const char * icon_enabled = std::holds_alternative<xr::fb_face_tracker2>(application::get_face_tracker())
|
||||
? get_face_icon(predicted_display_time)
|
||||
: ICON_FA_FACE_KISS_WINK_HEART;
|
||||
items.push_back({
|
||||
.f = feature::face_tracking,
|
||||
.tooltip_enabled = _("Face tracking is enabled"),
|
||||
.tooltip_disabled = _("Face tracking is disabled"),
|
||||
.icon_enabled = get_face_icon(predicted_display_time, face_tracker),
|
||||
.icon_enabled = icon_enabled,
|
||||
.icon_disabled = ICON_FA_FACE_MEH_BLANK,
|
||||
});
|
||||
}
|
||||
|
||||
if (system.body_tracker_supported() != xr::body_tracker_type::none)
|
||||
if (application::get_body_tracking_supported())
|
||||
{
|
||||
items.push_back({
|
||||
.f = feature::body_tracking,
|
||||
@@ -1804,7 +1773,7 @@ void scenes::lobby::draw_features_status(XrTime predicted_display_time)
|
||||
if (*status.charge > 0.995)
|
||||
icon_nr = 5;
|
||||
else
|
||||
icon_nr = instance.now() / 500'000'000 % 5;
|
||||
icon_nr = application::now() / 500'000'000 % 5;
|
||||
}
|
||||
else
|
||||
icon_nr = std::round((*status.charge) * 4);
|
||||
@@ -1921,7 +1890,7 @@ std::vector<std::pair<int, XrCompositionLayerQuad>> scenes::lobby::draw_gui(XrTi
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 10);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {10, 10});
|
||||
ImGui::Begin("WiVRn", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove);
|
||||
gui_connected(predicted_display_time);
|
||||
gui_connected();
|
||||
ImGui::End();
|
||||
ImGui::PopStyleVar(3); // ImGuiStyleVar_WindowPadding, ImGuiStyleVar_FrameRounding, ImGuiStyleVar_FramePadding
|
||||
}
|
||||
@@ -2033,7 +2002,7 @@ std::vector<std::pair<int, XrCompositionLayerQuad>> scenes::lobby::draw_gui(XrTi
|
||||
|
||||
if (not is_gui_visible(*imgui_ctx, predicted_display_time))
|
||||
{
|
||||
if (system.hand_tracking_supported())
|
||||
if (application::get_hand_tracking_supported())
|
||||
display_recentering_tip(*imgui_ctx, _("Press the grip button or put your palm up\nto move the main window"));
|
||||
else
|
||||
display_recentering_tip(*imgui_ctx, _("Press the grip button to move the main window"));
|
||||
|
||||
+101
-77
@@ -17,9 +17,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "constants.h"
|
||||
#include "xr/body_tracker.h"
|
||||
#include "xr/face_tracker.h"
|
||||
#include "utils/overloaded.h"
|
||||
#include "xr/fb_body_tracker.h"
|
||||
#include "xr/fb_face_tracker2.h"
|
||||
#include "xr/htc_body_tracker.h"
|
||||
#include "xr/pico_body_tracker.h"
|
||||
#include "xr/space.h"
|
||||
#include <glm/gtc/matrix_access.hpp>
|
||||
#include <glm/gtc/quaternion.hpp>
|
||||
@@ -40,7 +42,6 @@
|
||||
#include "utils/ranges.h"
|
||||
#include "vk/pipeline.h"
|
||||
#include "vk/shader.h"
|
||||
#include "vk/specialization_constants.h"
|
||||
#include "wivrn_packets.h"
|
||||
#include <algorithm>
|
||||
#include <mutex>
|
||||
@@ -188,11 +189,7 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
|
||||
self->network_session = std::move(network_session);
|
||||
|
||||
self->network_session->send_control([&]() {
|
||||
from_headset::headset_info_packet info{
|
||||
.language = application::get_messages_info().language,
|
||||
.country = application::get_messages_info().country,
|
||||
.variant = application::get_messages_info().variant,
|
||||
};
|
||||
from_headset::headset_info_packet info{};
|
||||
|
||||
auto view = self->system.view_configuration_views(self->viewconfig)[0];
|
||||
view = override_view(view, guess_model());
|
||||
@@ -254,42 +251,39 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
|
||||
|
||||
if (config.check_feature(feature::face_tracking))
|
||||
{
|
||||
switch (self->system.face_tracker_supported())
|
||||
{
|
||||
case xr::face_tracker_type::none:
|
||||
info.face_tracking = from_headset::face_type::none;
|
||||
break;
|
||||
case xr::face_tracker_type::fb:
|
||||
case xr::face_tracker_type::pico:
|
||||
info.face_tracking = from_headset::face_type::fb2;
|
||||
break;
|
||||
case xr::face_tracker_type::htc:
|
||||
info.face_tracking = from_headset::face_type::htc;
|
||||
break;
|
||||
}
|
||||
info.face_tracking = std::visit(utils::overloaded{
|
||||
[](std::monostate &) {
|
||||
return from_headset::face_type::none;
|
||||
},
|
||||
[](xr::fb_face_tracker2 &) {
|
||||
return from_headset::face_type::fb2;
|
||||
},
|
||||
[](xr::htc_face_tracker &) {
|
||||
return from_headset::face_type::htc;
|
||||
},
|
||||
[](xr::pico_face_tracker &) {
|
||||
return from_headset::face_type::fb2;
|
||||
},
|
||||
},
|
||||
application::get_face_tracker());
|
||||
}
|
||||
|
||||
info.num_generic_trackers = 0;
|
||||
if (config.check_feature(feature::body_tracking))
|
||||
{
|
||||
switch (self->system.body_tracker_supported())
|
||||
{
|
||||
case xr::body_tracker_type::none:
|
||||
break;
|
||||
case xr::body_tracker_type::fb:
|
||||
info.num_generic_trackers = xr::fb_body_tracker::get_whitelisted_joints(config.fb_lower_body, config.fb_hip).size();
|
||||
break;
|
||||
case xr::body_tracker_type::htc:
|
||||
info.num_generic_trackers = application::get_generic_trackers().size();
|
||||
break;
|
||||
case xr::body_tracker_type::pico:
|
||||
info.num_generic_trackers = xr::pico_body_tracker::joint_whitelist.size();
|
||||
break;
|
||||
}
|
||||
info.num_generic_trackers = std::visit(utils::overloaded{
|
||||
[&](std::monostate &) {
|
||||
return size_t(0);
|
||||
},
|
||||
[&](auto & b) {
|
||||
return b.count();
|
||||
},
|
||||
},
|
||||
application::get_body_tracker());
|
||||
}
|
||||
|
||||
info.palm_pose = application::space(xr::spaces::palm_left) or application::space(xr::spaces::palm_right);
|
||||
info.passthrough = self->system.passthrough_supported() != xr::passthrough_type::none;
|
||||
info.passthrough = self->system.passthrough_supported() != xr::system::passthrough_type::no_passthrough;
|
||||
info.system_name = std::string(self->system.properties().systemName);
|
||||
|
||||
audio::get_audio_description(info);
|
||||
@@ -317,6 +311,15 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
const auto & info = application::get_messages_info();
|
||||
self->network_session->send_control(from_headset::get_application_list{
|
||||
.language = info.language,
|
||||
.country = info.country,
|
||||
.variant = info.variant,
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
const auto & config = application::get_config();
|
||||
self->override_foveation_enable = config.override_foveation_enable;
|
||||
@@ -360,7 +363,7 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
|
||||
{
|
||||
self->haptics_actions.emplace(id, haptics_action{
|
||||
.action = action.first,
|
||||
.path = self->instance.string_to_path(path),
|
||||
.path = application::string_to_path(path),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -391,7 +394,7 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
|
||||
|
||||
void scenes::stream::on_focused()
|
||||
{
|
||||
gui_status_last_change = instance.now();
|
||||
gui_status_last_change = application::now();
|
||||
|
||||
auto views = system.view_configuration_views(viewconfig);
|
||||
// stream_view = override_view(views[0], guess_model());
|
||||
@@ -399,7 +402,7 @@ void scenes::stream::on_focused()
|
||||
height = views[0].recommendedImageRectHeight;
|
||||
|
||||
renderer.emplace(device, physical_device, queue, commandpool);
|
||||
loader.emplace(device, physical_device, queue, queue_family_index, renderer->get_default_material());
|
||||
loader.emplace(device, physical_device, queue, application::queue_family_index(), renderer->get_default_material());
|
||||
|
||||
std::string profile = controller_name();
|
||||
input.emplace(
|
||||
@@ -467,11 +470,8 @@ void scenes::stream::on_focused()
|
||||
swapchain_imgui,
|
||||
std::vector{vp});
|
||||
|
||||
if (application::get_config().enable_stream_gui)
|
||||
{
|
||||
plots_toggle_1 = get_action("plots_toggle_1").first;
|
||||
plots_toggle_2 = get_action("plots_toggle_2").first;
|
||||
}
|
||||
plots_toggle_1 = get_action("plots_toggle_1").first;
|
||||
plots_toggle_2 = get_action("plots_toggle_2").first;
|
||||
recenter_left = get_action("recenter_left").first;
|
||||
recenter_right = get_action("recenter_right").first;
|
||||
foveation_pitch = get_action("foveation_pitch").first;
|
||||
@@ -494,8 +494,6 @@ void scenes::stream::on_unfocused()
|
||||
loader.reset();
|
||||
renderer.reset();
|
||||
clear_swapchains();
|
||||
left_hand.reset();
|
||||
right_hand.reset();
|
||||
|
||||
imgui_ctx.reset();
|
||||
swapchain_imgui = xr::swapchain();
|
||||
@@ -526,16 +524,16 @@ void scenes::stream::push_blit_handle(shard_accumulator * decoder, std::shared_p
|
||||
{
|
||||
if (decoder != decoders[stream].decoder.get())
|
||||
return;
|
||||
handle->feedback.received_from_decoder = instance.now();
|
||||
handle->feedback.received_from_decoder = application::now();
|
||||
std::swap(handle, decoders[stream].latest_frames[handle->feedback.frame_index % decoders[stream].latest_frames.size()]);
|
||||
}
|
||||
|
||||
if (state_ != state::streaming and std::ranges::all_of(decoders, [](accumulator_images & i) {
|
||||
return i.alpha() or not i.empty();
|
||||
return i.alpha() or not i.frames().empty();
|
||||
}))
|
||||
{
|
||||
state_ = state::streaming;
|
||||
spdlog::info("Stream scene ready at t={}", instance.now());
|
||||
spdlog::info("Stream scene ready at t={}", application::now());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -550,14 +548,15 @@ bool scenes::stream::accumulator_images::alpha() const
|
||||
return decoder->desc().channels == wivrn::to_headset::video_stream_description::channels_t::alpha;
|
||||
}
|
||||
|
||||
bool scenes::stream::accumulator_images::empty() const
|
||||
std::vector<uint64_t> scenes::stream::accumulator_images::frames() const
|
||||
{
|
||||
std::vector<uint64_t> result;
|
||||
for (const auto & frame: latest_frames)
|
||||
{
|
||||
if (frame)
|
||||
return false;
|
||||
result.push_back(frame->feedback.frame_index);
|
||||
}
|
||||
return true;
|
||||
return result;
|
||||
}
|
||||
|
||||
std::vector<std::shared_ptr<shard_accumulator::blit_handle>> scenes::stream::common_frame(XrTime display_time)
|
||||
@@ -767,15 +766,7 @@ void scenes::stream::render(const XrFrameState & frame_state)
|
||||
}
|
||||
|
||||
if (state_ == state::stalled)
|
||||
{
|
||||
network_session->send_control(from_headset::get_application_list{
|
||||
.language = application::get_messages_info().language,
|
||||
.country = application::get_messages_info().country,
|
||||
.variant = application::get_messages_info().variant,
|
||||
});
|
||||
|
||||
application::pop_scene();
|
||||
}
|
||||
|
||||
assert(swapchain);
|
||||
for (auto & i: decoders)
|
||||
@@ -808,19 +799,51 @@ void scenes::stream::render(const XrFrameState & frame_state)
|
||||
|
||||
const auto & description = i.decoder->desc();
|
||||
vk::Extent2D image_size = i.decoder->image_size();
|
||||
std::array useful_size{
|
||||
float(description.width) / image_size.width,
|
||||
float(description.height) / image_size.height,
|
||||
};
|
||||
spdlog::info("useful size: {}x{} with buffer {}x{}",
|
||||
description.width,
|
||||
description.height,
|
||||
image_size.width,
|
||||
image_size.height);
|
||||
|
||||
auto vert_constants = make_specialization_constants(
|
||||
float(description.width) / image_size.width,
|
||||
float(description.height) / image_size.height);
|
||||
std::array specialization_constants_desc{
|
||||
vk::SpecializationMapEntry{
|
||||
.constantID = 0,
|
||||
.offset = 0,
|
||||
.size = sizeof(float),
|
||||
},
|
||||
vk::SpecializationMapEntry{
|
||||
.constantID = 1,
|
||||
.offset = sizeof(float),
|
||||
.size = sizeof(float),
|
||||
}};
|
||||
|
||||
auto frag_constants = make_specialization_constants(
|
||||
VkBool32(need_srgb_conversion(guess_model())),
|
||||
VkBool32(i.alpha()));
|
||||
vk::SpecializationInfo vert_specialization_info;
|
||||
vert_specialization_info.setMapEntries(specialization_constants_desc);
|
||||
vert_specialization_info.setData<float>(useful_size);
|
||||
|
||||
std::array<VkBool32, 2> constants = {
|
||||
need_srgb_conversion(guess_model()),
|
||||
i.alpha(),
|
||||
};
|
||||
std::array frag_specialization_constant_desc = {
|
||||
vk::SpecializationMapEntry{
|
||||
.constantID = 0,
|
||||
.offset = 0,
|
||||
.size = sizeof(constants[0]),
|
||||
},
|
||||
vk::SpecializationMapEntry{
|
||||
.constantID = 1,
|
||||
.offset = sizeof(constants[0]),
|
||||
.size = sizeof(constants[1]),
|
||||
},
|
||||
};
|
||||
vk::SpecializationInfo frag_specialization_info;
|
||||
frag_specialization_info.setMapEntries(frag_specialization_constant_desc);
|
||||
frag_specialization_info.setData<VkBool32>(constants);
|
||||
|
||||
// Create graphics pipeline
|
||||
vk::raii::ShaderModule vertex_shader = load_shader(device, "stream.vert");
|
||||
@@ -838,13 +861,13 @@ void scenes::stream::render(const XrFrameState & frame_state)
|
||||
.stage = vk::ShaderStageFlagBits::eVertex,
|
||||
.module = *vertex_shader,
|
||||
.pName = "main",
|
||||
.pSpecializationInfo = vert_constants,
|
||||
.pSpecializationInfo = &vert_specialization_info,
|
||||
},
|
||||
{
|
||||
.stage = vk::ShaderStageFlagBits::eFragment,
|
||||
.module = *fragment_shader,
|
||||
.pName = "main",
|
||||
.pSpecializationInfo = frag_constants,
|
||||
.pSpecializationInfo = &frag_specialization_info,
|
||||
}},
|
||||
.VertexBindingDescriptions = {},
|
||||
.VertexAttributeDescriptions = {},
|
||||
@@ -930,7 +953,7 @@ void scenes::stream::render(const XrFrameState & frame_state)
|
||||
if (not blit_handle or not *i.blit_pipeline)
|
||||
continue;
|
||||
|
||||
blit_handle->feedback.blitted = instance.now();
|
||||
blit_handle->feedback.blitted = application::now();
|
||||
if (blit_handle->feedback.blitted - blit_handle->feedback.received_from_decoder > 1'000'000'000)
|
||||
state_ = stream::state::stalled;
|
||||
++blit_handle->feedback.times_displayed;
|
||||
@@ -979,10 +1002,6 @@ void scenes::stream::render(const XrFrameState & frame_state)
|
||||
uint16_t x_offset = 0;
|
||||
for (auto & out: decoder_output)
|
||||
{
|
||||
vk::Extent2D decoder_out_size{
|
||||
.width = decoder_out_image.info().extent.width,
|
||||
.height = decoder_out_image.info().extent.height,
|
||||
};
|
||||
command_buffer.beginRenderPass(
|
||||
{
|
||||
.renderPass = *blit_render_pass,
|
||||
@@ -1291,7 +1310,10 @@ void scenes::stream::setup(const to_headset::video_stream_description & descript
|
||||
}
|
||||
|
||||
// Create outputs for the decoders
|
||||
decoder_out_size = vk::Extent2D{video_width, video_height};
|
||||
{
|
||||
decoder_out_format = vk::Format::eA8B8G8R8SrgbPack32;
|
||||
|
||||
vk::ImageCreateInfo image_info{
|
||||
.flags = vk::ImageCreateFlags{},
|
||||
.imageType = vk::ImageType::e2D,
|
||||
@@ -1315,7 +1337,7 @@ void scenes::stream::setup(const to_headset::video_stream_description & descript
|
||||
vk::ImageViewCreateInfo image_view_info{
|
||||
.image = vk::Image{decoder_out_image},
|
||||
.viewType = vk::ImageViewType::e2D,
|
||||
.format = image_info.format,
|
||||
.format = vk::Format::eA8B8G8R8SrgbPack32,
|
||||
.components = {},
|
||||
.subresourceRange = {
|
||||
.aspectMask = vk::ImageAspectFlagBits::eColor,
|
||||
@@ -1339,8 +1361,8 @@ void scenes::stream::setup(const to_headset::video_stream_description & descript
|
||||
.renderPass = *blit_render_pass,
|
||||
.attachmentCount = 1,
|
||||
.pAttachments = &*output.image_view,
|
||||
.width = image_info.extent.width,
|
||||
.height = image_info.extent.height,
|
||||
.width = decoder_out_size.width,
|
||||
.height = decoder_out_size.height,
|
||||
.layers = 1,
|
||||
});
|
||||
}
|
||||
@@ -1365,7 +1387,7 @@ void scenes::stream::setup(const to_headset::video_stream_description & descript
|
||||
spdlog::info("Creating decoder size {}x{} offset {},{}", item.width, item.height, item.offset_x, item.offset_y);
|
||||
|
||||
decoders.push_back(accumulator_images{
|
||||
.decoder = std::make_unique<shard_accumulator>(device, physical_device, instance, item, description.fps, shared_from_this(), stream_index),
|
||||
.decoder = std::make_unique<shard_accumulator>(device, physical_device, item, description.fps, shared_from_this(), stream_index),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1407,6 +1429,8 @@ void scenes::stream::setup_reprojection_swapchain(uint32_t swapchain_width, uint
|
||||
device,
|
||||
physical_device,
|
||||
decoder_out_image,
|
||||
vk::Extent2D{.width = video_width, .height = video_height},
|
||||
2,
|
||||
swapchain_images,
|
||||
extent,
|
||||
swapchain.format());
|
||||
|
||||
+7
-15
@@ -48,13 +48,6 @@ public:
|
||||
};
|
||||
static const size_t image_buffer_size = 3;
|
||||
|
||||
struct app
|
||||
{
|
||||
std::string id;
|
||||
std::string name;
|
||||
std::vector<std::byte> image;
|
||||
};
|
||||
|
||||
private:
|
||||
static const size_t view_count = 2;
|
||||
|
||||
@@ -67,12 +60,12 @@ private:
|
||||
vk::DescriptorSet descriptor_set = nullptr;
|
||||
vk::raii::PipelineLayout blit_pipeline_layout = nullptr;
|
||||
vk::raii::Pipeline blit_pipeline = nullptr;
|
||||
// latest frames, rolling buffer
|
||||
// latest frames from oldest to most recent
|
||||
std::array<std::shared_ptr<wivrn::shard_accumulator::blit_handle>, image_buffer_size> latest_frames;
|
||||
|
||||
std::shared_ptr<wivrn::shard_accumulator::blit_handle> frame(uint64_t id) const;
|
||||
bool alpha() const;
|
||||
bool empty() const;
|
||||
std::vector<uint64_t> frames() const;
|
||||
};
|
||||
|
||||
wifi_lock::wifi wifi;
|
||||
@@ -84,9 +77,9 @@ private:
|
||||
std::unique_ptr<wivrn_session> network_session;
|
||||
std::atomic<bool> exiting = false;
|
||||
std::thread network_thread;
|
||||
thread_safe<to_headset::tracking_control> tracking_control{};
|
||||
std::mutex tracking_control_mutex;
|
||||
to_headset::tracking_control tracking_control{};
|
||||
std::array<std::atomic<interaction_profile>, 2> interaction_profiles; // left and right hand
|
||||
std::atomic<bool> interaction_profile_changed = false;
|
||||
std::atomic<bool> recenter_requested = false;
|
||||
std::atomic<XrDuration> display_time_phase = 0;
|
||||
std::atomic<XrDuration> display_time_period = 0;
|
||||
@@ -100,6 +93,8 @@ private:
|
||||
vk::raii::DescriptorPool blit_descriptor_pool = nullptr;
|
||||
vk::raii::RenderPass blit_render_pass = nullptr;
|
||||
|
||||
vk::Extent2D decoder_out_size;
|
||||
vk::Format decoder_out_format;
|
||||
image_allocation decoder_out_image;
|
||||
|
||||
struct renderpass_output
|
||||
@@ -130,8 +125,6 @@ private:
|
||||
|
||||
std::optional<audio> audio_handle;
|
||||
|
||||
std::optional<xr::hand_tracker> left_hand;
|
||||
std::optional<xr::hand_tracker> right_hand;
|
||||
std::optional<input_profile> input;
|
||||
static inline const uint32_t layer_controllers = 1 << 0;
|
||||
static inline const uint32_t layer_rays = 1 << 1;
|
||||
@@ -183,7 +176,7 @@ private:
|
||||
std::vector<std::shared_ptr<wivrn::shard_accumulator::blit_handle>> current_blit_handles;
|
||||
|
||||
// Last application list received from server
|
||||
thread_safe<std::vector<app>> applications;
|
||||
thread_safe<to_headset::application_list> applications;
|
||||
|
||||
stream();
|
||||
|
||||
@@ -209,7 +202,6 @@ public:
|
||||
void operator()(to_headset::video_stream_description &&);
|
||||
void operator()(to_headset::refresh_rate_change &&);
|
||||
void operator()(to_headset::application_list &&);
|
||||
void operator()(to_headset::application_icon &&);
|
||||
void operator()(audio_data &&);
|
||||
|
||||
void push_blit_handle(wivrn::shard_accumulator * decoder, std::shared_ptr<wivrn::shard_accumulator::blit_handle> handle);
|
||||
|
||||
@@ -389,14 +389,8 @@ void scenes::stream::gui_performance_metrics()
|
||||
|
||||
ImPlot::PopStyleColor(5);
|
||||
{
|
||||
ImGui::Text(
|
||||
"%s",
|
||||
fmt::format(
|
||||
_F("Estimated motion to photons latency: {}ms"),
|
||||
std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||
tracking_control.lock()->max_offset)
|
||||
.count())
|
||||
.c_str());
|
||||
std::lock_guard lock(tracking_control_mutex);
|
||||
ImGui::Text("%s", fmt::format(_F("Estimated motion to photons latency: {}ms"), std::chrono::duration_cast<std::chrono::milliseconds>(tracking_control.max_offset).count()).c_str());
|
||||
|
||||
if (is_gui_interactable())
|
||||
ImGui::Text("%s", _S("Press the grip button to move the window"));
|
||||
@@ -423,12 +417,7 @@ void scenes::stream::gui_compact_view()
|
||||
f(_S("Upload"), 8 * compact_bandwidth_tx * 1e-6, "Mbit/s");
|
||||
f(_S("CPU time"), compact_cpu_time * 1000, "ms");
|
||||
f(_S("GPU time"), compact_gpu_time * 1000, "ms");
|
||||
f(_S("Motion to photon latency"),
|
||||
std::chrono::duration_cast<std::chrono::microseconds>(
|
||||
tracking_control.lock()->max_offset)
|
||||
.count() *
|
||||
1e-3f,
|
||||
"ms");
|
||||
f(_S("Motion to photon latency"), std::chrono::duration_cast<std::chrono::microseconds>(tracking_control.max_offset).count() * 1e-3f, "ms");
|
||||
ImGui::EndTable();
|
||||
}
|
||||
}
|
||||
@@ -626,8 +615,6 @@ static glm::vec4 compute_ray_limits(const XrPosef & pose, float margin = 0)
|
||||
|
||||
void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicted_display_period)
|
||||
{
|
||||
if (not(plots_toggle_1 and plots_toggle_2))
|
||||
return;
|
||||
bool interactable = true;
|
||||
XrSpace world_space = application::space(xr::spaces::world);
|
||||
auto views = session.locate_views(viewconfig, predicted_display_time, world_space).second;
|
||||
@@ -645,19 +632,6 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
|
||||
break;
|
||||
}
|
||||
imgui_ctx->set_controllers_enabled(interactable);
|
||||
if (interactable)
|
||||
{
|
||||
if (system.hand_tracking_supported())
|
||||
{
|
||||
left_hand = session.create_hand_tracker(XR_HAND_LEFT_EXT);
|
||||
right_hand = session.create_hand_tracker(XR_HAND_RIGHT_EXT);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
left_hand.reset();
|
||||
right_hand.reset();
|
||||
}
|
||||
|
||||
if (gui_status != last_gui_status)
|
||||
{
|
||||
@@ -889,10 +863,10 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
|
||||
bool hide_left_controller = false;
|
||||
bool hide_right_controller = false;
|
||||
|
||||
if (left_hand and right_hand)
|
||||
if (application::get_hand_tracking_supported())
|
||||
{
|
||||
auto left = left_hand->locate(world_space, predicted_display_time);
|
||||
auto right = right_hand->locate(world_space, predicted_display_time);
|
||||
auto left = application::get_left_hand().locate(world_space, predicted_display_time);
|
||||
auto right = application::get_right_hand().locate(world_space, predicted_display_time);
|
||||
|
||||
if (left and xr::hand_tracker::check_flags(*left, XR_SPACE_LOCATION_POSITION_TRACKED_BIT | XR_SPACE_LOCATION_POSITION_VALID_BIT, 0))
|
||||
hide_left_controller = true;
|
||||
|
||||
@@ -111,26 +111,8 @@ void scenes::stream::operator()(to_headset::application_list && apps)
|
||||
std::ranges::sort(apps.applications, [](auto & l, auto & r) {
|
||||
return una::casesens::collate_utf8(l.name, r.name) < 0;
|
||||
});
|
||||
|
||||
auto locked = applications.lock();
|
||||
|
||||
locked->clear();
|
||||
locked->reserve(apps.applications.size());
|
||||
for (const auto & i: apps.applications)
|
||||
{
|
||||
locked->push_back(app{
|
||||
.id = std::move(i.id),
|
||||
.name = std::move(i.name),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void scenes::stream::operator()(to_headset::application_icon && icon)
|
||||
{
|
||||
auto locked = applications.lock();
|
||||
|
||||
if (auto it = std::ranges::find(*locked, icon.id, &app::id); it != locked->end())
|
||||
it->image = std::move(icon.image);
|
||||
*locked = std::move(apps);
|
||||
}
|
||||
|
||||
void scenes::stream::start_application(std::string appid)
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "vk/allocation.h"
|
||||
#include "vk/pipeline.h"
|
||||
#include "vk/shader.h"
|
||||
#include "vk/specialization_constants.h"
|
||||
#include <array>
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtx/quaternion.hpp>
|
||||
@@ -38,7 +37,13 @@ struct stream_reprojection::vertex
|
||||
alignas(8) glm::vec2 position;
|
||||
// input texture coordinates
|
||||
alignas(8) glm::vec2 uv;
|
||||
int32_t shading_rate;
|
||||
};
|
||||
|
||||
struct SgsrSpecializationConstants
|
||||
{
|
||||
VkBool32 use_edge_direction;
|
||||
float edge_threshold;
|
||||
float edge_sharpness;
|
||||
};
|
||||
|
||||
void stream_reprojection::ensure_vertices(size_t num_vertices)
|
||||
@@ -69,16 +74,16 @@ stream_reprojection::vertex * stream_reprojection::get_vertices(size_t view)
|
||||
stream_reprojection::stream_reprojection(
|
||||
vk::raii::Device & device,
|
||||
vk::raii::PhysicalDevice & physical_device,
|
||||
image_allocation & input_image,
|
||||
vk::Image input_image_,
|
||||
vk::Extent2D input_extent,
|
||||
uint32_t view_count,
|
||||
std::vector<vk::Image> output_images_,
|
||||
vk::Extent2D output_extent,
|
||||
vk::Format format) :
|
||||
view_count(input_image.info().arrayLayers),
|
||||
view_count(view_count),
|
||||
device(device),
|
||||
input_extent{
|
||||
.width = input_image.info().extent.width,
|
||||
.height = input_image.info().extent.height,
|
||||
},
|
||||
input_image(input_image_),
|
||||
input_extent(input_extent),
|
||||
output_images(std::move(output_images_)),
|
||||
output_extent(output_extent)
|
||||
{
|
||||
@@ -139,7 +144,7 @@ stream_reprojection::stream_reprojection(
|
||||
vk::ImageViewCreateInfo iv_info{
|
||||
.image = input_image,
|
||||
.viewType = vk::ImageViewType::e2D,
|
||||
.format = input_image.info().format,
|
||||
.format = vk::Format::eA8B8G8R8SrgbPack32,
|
||||
.components = {
|
||||
.r = vk::ComponentSwizzle::eIdentity,
|
||||
.g = vk::ComponentSwizzle::eIdentity,
|
||||
@@ -214,30 +219,50 @@ stream_reprojection::stream_reprojection(
|
||||
|
||||
renderpass = vk::raii::RenderPass(device, renderpass_info.get());
|
||||
|
||||
const auto & vk_device_extensions = application::get_vk_device_extensions();
|
||||
bool fragment_shading_rate = false;
|
||||
if (utils::contains(vk_device_extensions, VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME) and
|
||||
utils::contains(vk_device_extensions, VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME))
|
||||
{
|
||||
const auto & [prop, rate_prop] = physical_device.getProperties2<vk::PhysicalDeviceProperties2, vk::PhysicalDeviceFragmentShadingRatePropertiesKHR>();
|
||||
const auto & [feat, fragment_feat] = physical_device.getFeatures2<vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceFragmentShadingRateFeaturesKHR>();
|
||||
fragment_shading_rate = rate_prop.fragmentShadingRateNonTrivialCombinerOps and
|
||||
fragment_feat.primitiveFragmentShadingRate and
|
||||
fragment_feat.attachmentFragmentShadingRate;
|
||||
}
|
||||
|
||||
// Vertex shader
|
||||
vk::raii::ShaderModule vertex_shader = load_shader(device, fragment_shading_rate ? "reprojection_vsr.vert" : "reprojection.vert");
|
||||
vk::raii::ShaderModule vertex_shader = load_shader(device, "reprojection.vert");
|
||||
|
||||
// Fragment shader
|
||||
std::string fragment_shader_name = "reprojection.frag";
|
||||
|
||||
const configuration::sgsr_settings & sgsr = application::get_config().sgsr;
|
||||
auto sgsr_specialization = make_specialization_constants(
|
||||
VkBool32(sgsr.use_edge_direction),
|
||||
float(sgsr.edge_threshold / 255.f),
|
||||
float(sgsr.edge_sharpness));
|
||||
vk::SpecializationInfo fragment_specialization_info;
|
||||
SgsrSpecializationConstants fragment_specialization_constants;
|
||||
std::vector<vk::SpecializationMapEntry> fragment_specialization_constants_desc;
|
||||
const configuration::sgsr_settings sgsr = application::get_config().sgsr;
|
||||
if (sgsr.enabled)
|
||||
{
|
||||
fragment_shader_name = "reprojection_sgsr.frag";
|
||||
|
||||
vk::raii::ShaderModule fragment_shader = load_shader(device, sgsr.enabled ? "reprojection_sgsr.frag" : "reprojection.frag");
|
||||
fragment_specialization_constants = {
|
||||
.use_edge_direction = sgsr.use_edge_direction,
|
||||
.edge_threshold = float(sgsr.edge_threshold / 255.0),
|
||||
.edge_sharpness = sgsr.edge_sharpness,
|
||||
};
|
||||
|
||||
fragment_specialization_constants_desc = {
|
||||
vk::SpecializationMapEntry{
|
||||
.constantID = 0,
|
||||
.offset = offsetof(SgsrSpecializationConstants, use_edge_direction),
|
||||
.size = sizeof(fragment_specialization_constants.use_edge_direction),
|
||||
},
|
||||
vk::SpecializationMapEntry{
|
||||
.constantID = 1,
|
||||
.offset = offsetof(SgsrSpecializationConstants, edge_threshold),
|
||||
.size = sizeof(fragment_specialization_constants.edge_threshold),
|
||||
},
|
||||
vk::SpecializationMapEntry{
|
||||
.constantID = 2,
|
||||
.offset = offsetof(SgsrSpecializationConstants, edge_sharpness),
|
||||
.size = sizeof(fragment_specialization_constants.edge_sharpness),
|
||||
},
|
||||
};
|
||||
|
||||
fragment_specialization_info.setMapEntries(fragment_specialization_constants_desc);
|
||||
fragment_specialization_info.setDataSize(sizeof(fragment_specialization_constants));
|
||||
fragment_specialization_info.setPData(&fragment_specialization_constants);
|
||||
}
|
||||
|
||||
vk::raii::ShaderModule fragment_shader = load_shader(device, fragment_shader_name);
|
||||
|
||||
// Create graphics pipeline
|
||||
vk::PipelineLayoutCreateInfo pipeline_layout_info;
|
||||
@@ -245,7 +270,7 @@ stream_reprojection::stream_reprojection(
|
||||
|
||||
layout = vk::raii::PipelineLayout(device, pipeline_layout_info);
|
||||
|
||||
vk::pipeline_builder pipeline_info_builder{
|
||||
vk::pipeline_builder pipeline_info{
|
||||
.flags = {},
|
||||
.Stages = {
|
||||
{
|
||||
@@ -257,7 +282,7 @@ stream_reprojection::stream_reprojection(
|
||||
.stage = vk::ShaderStageFlagBits::eFragment,
|
||||
.module = *fragment_shader,
|
||||
.pName = "main",
|
||||
.pSpecializationInfo = sgsr.enabled ? sgsr_specialization.info() : nullptr,
|
||||
.pSpecializationInfo = &fragment_specialization_info,
|
||||
},
|
||||
},
|
||||
.VertexBindingDescriptions = {
|
||||
@@ -280,12 +305,6 @@ stream_reprojection::stream_reprojection(
|
||||
.format = vk::Format::eR32G32Sfloat,
|
||||
.offset = offsetof(vertex, uv),
|
||||
},
|
||||
{
|
||||
.location = 2,
|
||||
.binding = 0,
|
||||
.format = vk::Format::eR32Sint,
|
||||
.offset = offsetof(vertex, shading_rate),
|
||||
},
|
||||
},
|
||||
.InputAssemblyState = {{
|
||||
.topology = vk::PrimitiveTopology::eTriangleStrip,
|
||||
@@ -318,48 +337,6 @@ stream_reprojection::stream_reprojection(
|
||||
.subpass = 0,
|
||||
};
|
||||
|
||||
vk::GraphicsPipelineCreateInfo pipeline_info(pipeline_info_builder);
|
||||
|
||||
// Variable fragment shading
|
||||
std::array combiner{
|
||||
vk::FragmentShadingRateCombinerOpKHR::eMax,
|
||||
vk::FragmentShadingRateCombinerOpKHR::eMax,
|
||||
};
|
||||
vk::PipelineFragmentShadingRateStateCreateInfoKHR shading{
|
||||
.fragmentSize = vk::Extent2D{1, 1},
|
||||
.combinerOps = combiner,
|
||||
};
|
||||
if (fragment_shading_rate)
|
||||
{
|
||||
pipeline_info.pNext = &shading;
|
||||
|
||||
spdlog::info("Available fragment shading rates:");
|
||||
for (const auto rate: physical_device.getFragmentShadingRatesKHR())
|
||||
{
|
||||
if (rate.sampleCounts & vk::SampleCountFlagBits::e1)
|
||||
{
|
||||
spdlog::info("\tfragment size: {}x{}", rate.fragmentSize.width, rate.fragmentSize.height);
|
||||
int flags = 0;
|
||||
if (rate.fragmentSize.width == 4)
|
||||
flags |= 8;
|
||||
else if (rate.fragmentSize.width == 2)
|
||||
flags |= 4;
|
||||
if (rate.fragmentSize.height == 4)
|
||||
flags |= 2;
|
||||
else if (rate.fragmentSize.height == 2)
|
||||
flags |= 1;
|
||||
for (int y = std::bit_width(rate.fragmentSize.height) - 1; y < 3; ++y)
|
||||
{
|
||||
for (int x = std::bit_width(rate.fragmentSize.width) - 1; x < 3; ++x)
|
||||
{
|
||||
if (fragment_sizes[x][y] == 0)
|
||||
fragment_sizes[x][y] = flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pipeline = vk::raii::Pipeline(device, application::get_pipeline_cache(), pipeline_info);
|
||||
|
||||
// Create image views and framebuffers
|
||||
@@ -413,21 +390,6 @@ static size_t required_vertices(const wivrn::to_headset::foveation_parameter & p
|
||||
return (2 * (p.x.size() + 1) + 1) * p.y.size();
|
||||
}
|
||||
|
||||
int32_t stream_reprojection::shading_rate(int pixels_x, int pixels_y)
|
||||
{
|
||||
int x = 0;
|
||||
if (pixels_x >= 2)
|
||||
x = 1;
|
||||
if (pixels_x >= 4)
|
||||
x = 2;
|
||||
int y = 0;
|
||||
if (pixels_y >= 2)
|
||||
y = 1;
|
||||
if (pixels_y >= 4)
|
||||
y = 2;
|
||||
return fragment_sizes[x][y];
|
||||
}
|
||||
|
||||
void stream_reprojection::reproject(vk::raii::CommandBuffer & command_buffer,
|
||||
const std::array<wivrn::to_headset::foveation_parameter, 2> & foveation,
|
||||
int destination)
|
||||
@@ -463,12 +425,10 @@ void stream_reprojection::reproject(vk::raii::CommandBuffer & command_buffer,
|
||||
*vertices++ = {
|
||||
.position = out * out_pixel_size - glm::vec2(1),
|
||||
.uv = in * in_pixel_size,
|
||||
.shading_rate = shading_rate(ratio_x, ratio_y),
|
||||
};
|
||||
*vertices++ = {
|
||||
.position = (out + glm::vec2(0, n_out_y * ratio_y)) * out_pixel_size - glm::vec2(1),
|
||||
.uv = (in + glm::vec2(0, n_out_y)) * in_pixel_size,
|
||||
.shading_rate = shading_rate(ratio_x, ratio_y),
|
||||
};
|
||||
in.x += n_out_x;
|
||||
out.x += n_out_x * ratio_x;
|
||||
|
||||
@@ -41,15 +41,9 @@ class stream_reprojection
|
||||
vk::raii::RenderPass renderpass = nullptr;
|
||||
vk::raii::Pipeline pipeline = nullptr;
|
||||
|
||||
// Allowed sizes for variable shading rate
|
||||
// indices are for x, y
|
||||
// 0 is 1 pixel
|
||||
// 1 is 2 or 3 pixels
|
||||
// 2 is 4 pixels or more
|
||||
int32_t fragment_sizes[3][3] = {};
|
||||
|
||||
// Source image
|
||||
vk::raii::Sampler sampler = nullptr;
|
||||
vk::Image input_image;
|
||||
std::vector<vk::raii::ImageView> input_image_views;
|
||||
std::vector<vk::DescriptorSet> descriptor_sets;
|
||||
vk::Extent2D input_extent;
|
||||
@@ -63,13 +57,13 @@ class stream_reprojection
|
||||
void ensure_vertices(size_t num_vertices);
|
||||
vertex * get_vertices(size_t view);
|
||||
|
||||
int32_t shading_rate(int pixels_x, int pixels_y);
|
||||
|
||||
public:
|
||||
stream_reprojection(
|
||||
vk::raii::Device & device,
|
||||
vk::raii::PhysicalDevice & physical_device,
|
||||
image_allocation & input_image,
|
||||
vk::Image input_image,
|
||||
vk::Extent2D input_extent,
|
||||
uint32_t view_count,
|
||||
std::vector<vk::Image> output_images,
|
||||
vk::Extent2D output_extent,
|
||||
vk::Format format);
|
||||
|
||||
@@ -21,10 +21,7 @@
|
||||
#include "stream.h"
|
||||
#include "utils/overloaded.h"
|
||||
#include "wivrn_packets.h"
|
||||
#include "xr/body_tracker.h"
|
||||
#include "xr/face_tracker.h"
|
||||
#include "xr/fb_body_tracker.h"
|
||||
#include "xr/to_string.h"
|
||||
#include <magic_enum.hpp>
|
||||
#include <ranges>
|
||||
#include <spdlog/spdlog.h>
|
||||
@@ -380,6 +377,7 @@ void scenes::stream::tracking()
|
||||
std::vector<from_headset::tracking> tracking;
|
||||
std::vector<from_headset::tracking> tracking_pool; // pre-allocated objects
|
||||
std::vector<from_headset::hand_tracking> hands;
|
||||
std::array<bool, 2> should_skip_simple_controllers{};
|
||||
std::vector<from_headset::body_tracking> body;
|
||||
std::vector<XrView> views;
|
||||
|
||||
@@ -387,14 +385,31 @@ void scenes::stream::tracking()
|
||||
std::vector<serialization_packet> packets;
|
||||
|
||||
const bool hand_tracking = config.check_feature(feature::hand_tracking);
|
||||
std::optional<xr::hand_tracker> left_hand;
|
||||
std::optional<xr::hand_tracker> right_hand;
|
||||
|
||||
const bool face_tracking = config.check_feature(feature::face_tracking);
|
||||
xr::face_tracker face_tracker;
|
||||
auto & face_tracker = application::get_face_tracker();
|
||||
if (face_tracking)
|
||||
{
|
||||
// We can't start the face tracking on application initialisation like we do for
|
||||
// other face trackers due to a Pico runtime bug where face tracking freezes when
|
||||
// the headset is taken off or the application is quit.
|
||||
if (auto * face_pico = std::get_if<xr::pico_face_tracker>(&face_tracker))
|
||||
face_pico->start();
|
||||
}
|
||||
|
||||
const bool body_tracking = config.check_feature(feature::body_tracking);
|
||||
xr::body_tracker body_tracker;
|
||||
auto & body_tracker = application::get_body_tracker();
|
||||
if (body_tracking)
|
||||
{
|
||||
if (auto * body_fb = std::get_if<xr::fb_body_tracker>(&body_tracker))
|
||||
{
|
||||
// TODO maybe handle reconnection better, if the settings are changed since
|
||||
// last connection to running server, the tracker count will mismatch and
|
||||
// stuff might break
|
||||
body_fb->stop();
|
||||
body_fb->start(config.fb_lower_body, config.fb_hip);
|
||||
}
|
||||
}
|
||||
|
||||
locate_spaces_functor locate_spaces{instance, world_space};
|
||||
|
||||
@@ -418,50 +433,11 @@ void scenes::stream::tracking()
|
||||
timer t(instance);
|
||||
int samples = 0;
|
||||
|
||||
auto control = *tracking_control.lock();
|
||||
bool interaction_profile_changed = this->interaction_profile_changed.exchange(false);
|
||||
|
||||
if (control.enabled[size_t(tid::left_hand)])
|
||||
to_headset::tracking_control control;
|
||||
{
|
||||
if (not left_hand and system.hand_tracking_supported())
|
||||
left_hand = session.create_hand_tracker(XR_HAND_LEFT_EXT);
|
||||
std::lock_guard lock(tracking_control_mutex);
|
||||
control = tracking_control;
|
||||
}
|
||||
else
|
||||
left_hand.reset();
|
||||
|
||||
if (control.enabled[size_t(tid::right_hand)])
|
||||
{
|
||||
if (not right_hand and system.hand_tracking_supported())
|
||||
right_hand = session.create_hand_tracker(XR_HAND_RIGHT_EXT);
|
||||
}
|
||||
else
|
||||
right_hand.reset();
|
||||
|
||||
if (face_tracking and control.enabled[size_t(tid::face)])
|
||||
{
|
||||
if (std::holds_alternative<std::monostate>(face_tracker))
|
||||
face_tracker = xr::make_face_tracker(instance, system, session);
|
||||
}
|
||||
else
|
||||
face_tracker.emplace<std::monostate>();
|
||||
|
||||
if (body_tracking and control.enabled[size_t(tid::generic_tracker)])
|
||||
{
|
||||
if (std::holds_alternative<std::monostate>(body_tracker))
|
||||
body_tracker = xr::make_body_tracker(
|
||||
instance,
|
||||
system,
|
||||
session,
|
||||
application::get_generic_trackers(),
|
||||
config.fb_lower_body,
|
||||
config.fb_hip);
|
||||
}
|
||||
else
|
||||
body_tracker.emplace<std::monostate>();
|
||||
|
||||
if (interaction_profile_changed)
|
||||
if (auto htc = std::get_if<xr::htc_body_tracker>(&body_tracker))
|
||||
htc->update_active();
|
||||
|
||||
XrDuration prediction = std::clamp<XrDuration>(control.max_offset.count(), 0, 80'000'000);
|
||||
auto period = std::max<XrDuration>(display_time_period.load(), 1'000'000);
|
||||
@@ -493,9 +469,9 @@ void scenes::stream::tracking()
|
||||
(Δt == 0 or Δt >= prediction - 2 * period))
|
||||
{
|
||||
last_hand_sample = t0;
|
||||
if (left_hand)
|
||||
if (control.enabled[size_t(tid::left_hand)])
|
||||
{
|
||||
auto joints = locate_hands(*left_hand, world_space, t0 + Δt);
|
||||
auto joints = locate_hands(application::get_left_hand(), world_space, t0 + Δt);
|
||||
hands.emplace_back(
|
||||
t0,
|
||||
t0 + Δt,
|
||||
@@ -503,9 +479,9 @@ void scenes::stream::tracking()
|
||||
joints);
|
||||
}
|
||||
|
||||
if (right_hand)
|
||||
if (control.enabled[size_t(tid::right_hand)])
|
||||
{
|
||||
auto joints = locate_hands(*right_hand, world_space, t0 + Δt);
|
||||
auto joints = locate_hands(application::get_right_hand(), world_space, t0 + Δt);
|
||||
hands.emplace_back(
|
||||
t0,
|
||||
t0 + Δt,
|
||||
@@ -522,33 +498,37 @@ void scenes::stream::tracking()
|
||||
}
|
||||
locate_spaces.resolve(session, t0 + Δt, packet.device_poses);
|
||||
|
||||
std::visit(utils::overloaded{
|
||||
[](std::monostate &) {},
|
||||
[&](auto & b) {
|
||||
if (t0 >= last_body_sample + period and
|
||||
(Δt == 0 or Δt >= prediction - 2 * period))
|
||||
{
|
||||
last_body_sample = t0;
|
||||
if (control.enabled[size_t(tid::generic_tracker)])
|
||||
if (body_tracking)
|
||||
std::visit(utils::overloaded{
|
||||
[](std::monostate &) {},
|
||||
[&](auto & b) {
|
||||
if (t0 >= last_body_sample + period and
|
||||
(Δt == 0 or Δt >= prediction - 2 * period))
|
||||
{
|
||||
body.push_back(from_headset::body_tracking{
|
||||
.production_timestamp = t0,
|
||||
.timestamp = t0 + Δt,
|
||||
.poses = b.locate_spaces(t0 + Δt, world_space),
|
||||
});
|
||||
last_body_sample = t0;
|
||||
if (control.enabled[size_t(tid::generic_tracker)])
|
||||
{
|
||||
body.push_back(from_headset::body_tracking{
|
||||
.production_timestamp = t0,
|
||||
.timestamp = t0 + Δt,
|
||||
.poses = b.locate_spaces(t0 + Δt, world_space),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
body_tracker);
|
||||
},
|
||||
},
|
||||
body_tracker);
|
||||
|
||||
std::visit(utils::overloaded{
|
||||
[](std::monostate &) {},
|
||||
[&](auto & ft) {
|
||||
ft.get_weights(t0 + Δt, packet.face.emplace<typename std::remove_reference_t<decltype(ft)>::packet_type>());
|
||||
},
|
||||
},
|
||||
face_tracker);
|
||||
if (face_tracking && control.enabled[size_t(tid::face)])
|
||||
{
|
||||
std::visit(utils::overloaded{
|
||||
[](std::monostate &) {},
|
||||
[&](auto & ft) {
|
||||
ft.get_weights(t0 + Δt, packet.face.emplace<typename std::remove_reference_t<decltype(ft)>::packet_type>());
|
||||
},
|
||||
},
|
||||
face_tracker);
|
||||
}
|
||||
}
|
||||
catch (const std::system_error & e)
|
||||
{
|
||||
@@ -649,17 +629,20 @@ void scenes::stream::tracking()
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
if (auto * face_pico = std::get_if<xr::pico_face_tracker>(&face_tracker))
|
||||
face_pico->stop();
|
||||
}
|
||||
|
||||
void scenes::stream::operator()(to_headset::tracking_control && packet)
|
||||
{
|
||||
auto locked = tracking_control.lock();
|
||||
std::lock_guard lock(tracking_control_mutex);
|
||||
auto m = size_t(to_headset::tracking_control::id::microphone);
|
||||
if (audio_handle)
|
||||
audio_handle->set_mic_state(packet.enabled[m]);
|
||||
|
||||
*locked = packet;
|
||||
locked->min_offset = std::min(locked->min_offset, locked->max_offset);
|
||||
tracking_control = packet;
|
||||
tracking_control.min_offset = std::min(tracking_control.min_offset, tracking_control.max_offset);
|
||||
}
|
||||
|
||||
static device_id derived_from(device_id target)
|
||||
@@ -680,7 +663,6 @@ static device_id derived_from(device_id target)
|
||||
|
||||
void scenes::stream::on_interaction_profile_changed(const XrEventDataInteractionProfileChanged &)
|
||||
{
|
||||
interaction_profile_changed = true;
|
||||
std::array path = {
|
||||
"/user/hand/left",
|
||||
"/user/hand/right",
|
||||
|
||||
@@ -1,4 +1,49 @@
|
||||
/*
|
||||
* WiVRn VR streaming
|
||||
* Copyright (C) 2022 Guillaume Meunier <guillaume.meunier@centraliens.net>
|
||||
* Copyright (C) 2022 Patrick Nicolas <patricknicolas@laposte.net>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#version 450
|
||||
#extension GL_ARB_shading_language_include : require
|
||||
#define VSR 0
|
||||
#include "reprojection.glsl.inc"
|
||||
|
||||
#ifdef VERT_SHADER
|
||||
|
||||
layout (location = 0) in vec2 vPosition;
|
||||
layout (location = 1) in vec2 vUV;
|
||||
|
||||
layout(location = 0) out vec2 outUV;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(vPosition, 0.0, 1.0);
|
||||
outUV = vUV;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FRAG_SHADER
|
||||
|
||||
layout(set = 0, binding = 0) uniform sampler2D texSampler;
|
||||
|
||||
layout(location = 0) in vec2 inUV;
|
||||
|
||||
layout(location = 0) out vec4 outColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
outColor = texture(texSampler, inUV).rgba;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_shading_language_include : require
|
||||
#define VSR 1
|
||||
#include "reprojection.glsl.inc"
|
||||
|
||||
+3
-11
@@ -26,17 +26,9 @@ namespace utils
|
||||
template <typename Rng, typename T>
|
||||
bool contains(Rng && range, const T & value)
|
||||
{
|
||||
if constexpr (std::is_convertible_v<T, const char *> and
|
||||
std::is_convertible_v<typename std::decay_t<Rng>::value_type, const char *>)
|
||||
{
|
||||
auto it = std::find_if(range.begin(), range.end(), [&](const char * i) { return strcmp(i, value) == 0; });
|
||||
return it != range.end();
|
||||
}
|
||||
else
|
||||
{
|
||||
auto it = std::find(range.begin(), range.end(), value);
|
||||
return it != range.end();
|
||||
}
|
||||
auto it = std::find(range.begin(), range.end(), value);
|
||||
|
||||
return it != range.end();
|
||||
}
|
||||
|
||||
// Check if all values of range2 are in range1
|
||||
|
||||
+5
-49
@@ -19,81 +19,37 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <variant>
|
||||
#include <openxr/openxr.h>
|
||||
|
||||
namespace utils
|
||||
{
|
||||
|
||||
template <typename T, auto Deleter = nullptr>
|
||||
template <typename T, XrResult deleter(T)>
|
||||
class handle
|
||||
{
|
||||
public:
|
||||
// true if the deleter is provided when constructing the object
|
||||
// typically if it's from an OpenXR extension
|
||||
static constexpr bool runtime_deleter = Deleter == nullptr;
|
||||
|
||||
protected:
|
||||
static const inline T null_value = 0;
|
||||
|
||||
T id = null_value;
|
||||
[[no_unique_address]] std::conditional_t<runtime_deleter, XrResult (*)(T), std::monostate> deleter;
|
||||
|
||||
public:
|
||||
template <typename = void>
|
||||
requires(not runtime_deleter)
|
||||
handle()
|
||||
{}
|
||||
|
||||
template <typename = void>
|
||||
requires(not runtime_deleter)
|
||||
handle() {}
|
||||
handle(T id) :
|
||||
id(id)
|
||||
{}
|
||||
|
||||
template <typename = void>
|
||||
requires(runtime_deleter)
|
||||
handle(XrResult (*deleter)(T)) :
|
||||
deleter(deleter)
|
||||
{
|
||||
assert(deleter);
|
||||
}
|
||||
|
||||
template <typename = void>
|
||||
requires(runtime_deleter)
|
||||
handle(T id, XrResult (*deleter)(T)) :
|
||||
id(id), deleter(deleter)
|
||||
{
|
||||
assert(deleter);
|
||||
}
|
||||
|
||||
id(id) {}
|
||||
~handle()
|
||||
{
|
||||
if (id != null_value)
|
||||
{
|
||||
XrResult res = XR_SUCCESS;
|
||||
if constexpr (runtime_deleter)
|
||||
res = deleter(id);
|
||||
else
|
||||
res = Deleter(id);
|
||||
if (not XR_SUCCEEDED(res))
|
||||
spdlog::warn("Failed to destroy {}", typeid(T).name());
|
||||
}
|
||||
deleter(id);
|
||||
}
|
||||
|
||||
handle(handle && other) noexcept :
|
||||
id(other.id), deleter(other.deleter)
|
||||
id(other.id)
|
||||
{
|
||||
other.id = null_value;
|
||||
}
|
||||
|
||||
handle & operator=(handle && other) noexcept
|
||||
{
|
||||
if constexpr (runtime_deleter)
|
||||
std::swap(deleter, other.deleter);
|
||||
std::swap(id, other.id);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
/*
|
||||
* WiVRn VR streaming
|
||||
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "body_tracker.h"
|
||||
|
||||
#include "xr/htc_exts.h"
|
||||
#include "xr/instance.h"
|
||||
#include "xr/system.h"
|
||||
|
||||
xr::body_tracker_type xr::body_tracker_supported(xr::instance & instance, xr::system & system)
|
||||
{
|
||||
if (instance.has_extension(XR_FB_BODY_TRACKING_EXTENSION_NAME) and
|
||||
instance.has_extension(XR_META_BODY_TRACKING_FULL_BODY_EXTENSION_NAME) and
|
||||
instance.has_extension(XR_META_BODY_TRACKING_FIDELITY_EXTENSION_NAME))
|
||||
{
|
||||
auto fb_body_properties = system.fb_body_tracking_properties();
|
||||
if (fb_body_properties.supportsBodyTracking)
|
||||
return body_tracker_type::fb;
|
||||
}
|
||||
|
||||
if (instance.has_extension(XR_HTC_PATH_ENUMERATION_EXTENSION_NAME) and
|
||||
instance.has_extension(XR_HTC_VIVE_XR_TRACKER_INTERACTION_EXTENSION_NAME))
|
||||
return body_tracker_type::htc;
|
||||
|
||||
if (instance.has_extension(XR_BD_BODY_TRACKING_EXTENSION_NAME))
|
||||
{
|
||||
auto bd_body_properties = system.bd_body_tracking_properties();
|
||||
if (bd_body_properties.supportsBodyTracking)
|
||||
return body_tracker_type::pico;
|
||||
}
|
||||
|
||||
return xr::body_tracker_type::none;
|
||||
}
|
||||
|
||||
xr::body_tracker xr::make_body_tracker(xr::instance & instance, xr::system & system, xr::session & session, std::vector<std::pair<XrPath, xr::space>> & generic_trackers, bool full_body, bool hips)
|
||||
{
|
||||
if (instance.has_extension(XR_FB_BODY_TRACKING_EXTENSION_NAME) and
|
||||
instance.has_extension(XR_META_BODY_TRACKING_FULL_BODY_EXTENSION_NAME) and
|
||||
instance.has_extension(XR_META_BODY_TRACKING_FIDELITY_EXTENSION_NAME))
|
||||
{
|
||||
auto fb_body_properties = system.fb_body_tracking_properties();
|
||||
if (fb_body_properties.supportsBodyTracking)
|
||||
return xr::body_tracker(std::in_place_type_t<xr::fb_body_tracker>(),
|
||||
instance,
|
||||
session,
|
||||
full_body,
|
||||
hips);
|
||||
}
|
||||
|
||||
if (not generic_trackers.empty())
|
||||
return xr::body_tracker(std::in_place_type_t<xr::htc_body_tracker>(),
|
||||
session,
|
||||
generic_trackers);
|
||||
|
||||
if (instance.has_extension(XR_BD_BODY_TRACKING_EXTENSION_NAME))
|
||||
{
|
||||
auto bd_body_properties = system.bd_body_tracking_properties();
|
||||
if (bd_body_properties.supportsBodyTracking)
|
||||
return xr::body_tracker(std::in_place_type_t<xr::pico_body_tracker>(),
|
||||
instance,
|
||||
session);
|
||||
}
|
||||
|
||||
return std::monostate();
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* WiVRn VR streaming
|
||||
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "fb_body_tracker.h"
|
||||
#include "htc_body_tracker.h"
|
||||
#include "pico_body_tracker.h"
|
||||
#include "xr/system.h"
|
||||
|
||||
#include <utility>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
#include <openxr/openxr.h>
|
||||
|
||||
namespace xr
|
||||
{
|
||||
|
||||
class instance;
|
||||
class session;
|
||||
|
||||
using body_tracker = std::variant<std::monostate, xr::fb_body_tracker, xr::htc_body_tracker, xr::pico_body_tracker>;
|
||||
|
||||
body_tracker make_body_tracker(xr::instance &, xr::system &, xr::session &, std::vector<std::pair<XrPath, xr::space>> & generic_trackers, bool full_body, bool hips);
|
||||
|
||||
body_tracker_type body_tracker_supported(xr::instance &, xr::system &);
|
||||
|
||||
} // namespace xr
|
||||
@@ -17,8 +17,8 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "xr.h"
|
||||
#include "xr/check.h"
|
||||
#include "xr/to_string.h"
|
||||
#include <system_error>
|
||||
|
||||
namespace
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
* WiVRn VR streaming
|
||||
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "face_tracker.h"
|
||||
|
||||
#include "hardware.h"
|
||||
#include "xr/instance.h"
|
||||
#include "xr/system.h"
|
||||
|
||||
xr::face_tracker_type xr::face_tracker_supported(xr::instance & instance, xr::system & system)
|
||||
{
|
||||
if (instance.has_extension(XR_FB_FACE_TRACKING2_EXTENSION_NAME))
|
||||
{
|
||||
auto properties = system.fb_face_tracking2_properties();
|
||||
if (properties.supportsVisualFaceTracking)
|
||||
return xr::face_tracker_type::fb;
|
||||
}
|
||||
|
||||
if (instance.has_extension(XR_HTC_FACIAL_TRACKING_EXTENSION_NAME))
|
||||
{
|
||||
auto properties = system.htc_face_tracking_properties();
|
||||
if (properties.supportEyeFacialTracking or properties.supportLipFacialTracking)
|
||||
return xr::face_tracker_type::htc;
|
||||
}
|
||||
|
||||
switch (guess_model())
|
||||
{
|
||||
case model::pico_4_pro:
|
||||
case model::pico_4_enterprise:
|
||||
// The extension used by Pico is not published
|
||||
// it doesn't even need to be requested...
|
||||
if (instance.has_extension(XR_EXT_EYE_GAZE_INTERACTION_EXTENSION_NAME) and
|
||||
system.eye_gaze_interaction_properties().supportsEyeGazeInteraction)
|
||||
return xr::face_tracker_type::pico;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return xr::face_tracker_type::none;
|
||||
}
|
||||
|
||||
xr::face_tracker xr::make_face_tracker(xr::instance & instance, xr::system & system, xr::session & session)
|
||||
{
|
||||
if (instance.has_extension(XR_FB_FACE_TRACKING2_EXTENSION_NAME))
|
||||
{
|
||||
auto properties = system.fb_face_tracking2_properties();
|
||||
if (properties.supportsVisualFaceTracking)
|
||||
return xr::face_tracker(std::in_place_type_t<xr::fb_face_tracker2>(), instance, session);
|
||||
}
|
||||
|
||||
if (instance.has_extension(XR_HTC_FACIAL_TRACKING_EXTENSION_NAME))
|
||||
{
|
||||
auto properties = system.htc_face_tracking_properties();
|
||||
if (properties.supportEyeFacialTracking or properties.supportLipFacialTracking)
|
||||
return xr::face_tracker(
|
||||
std::in_place_type_t<xr::htc_face_tracker>(),
|
||||
instance,
|
||||
session,
|
||||
properties.supportEyeFacialTracking,
|
||||
properties.supportLipFacialTracking);
|
||||
}
|
||||
|
||||
switch (guess_model())
|
||||
{
|
||||
case model::pico_4_pro:
|
||||
case model::pico_4_enterprise:
|
||||
// The extension used by Pico is not published
|
||||
// it doesn't even need to be requested...
|
||||
if (instance.has_extension(XR_EXT_EYE_GAZE_INTERACTION_EXTENSION_NAME) and
|
||||
system.eye_gaze_interaction_properties().supportsEyeGazeInteraction)
|
||||
return xr::face_tracker(std::in_place_type_t<xr::pico_face_tracker>(), instance, session);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return std::monostate();
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
* WiVRn VR streaming
|
||||
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "fb_face_tracker2.h"
|
||||
#include "htc_face_tracker.h"
|
||||
#include "pico_face_tracker.h"
|
||||
#include "xr/system.h"
|
||||
|
||||
#include <variant>
|
||||
|
||||
namespace xr
|
||||
{
|
||||
|
||||
class instance;
|
||||
class session;
|
||||
|
||||
using face_tracker = std::variant<std::monostate, xr::fb_face_tracker2, xr::htc_face_tracker, xr::pico_face_tracker>;
|
||||
|
||||
face_tracker make_face_tracker(xr::instance &, xr::system &, xr::session &);
|
||||
|
||||
face_tracker_type face_tracker_supported(xr::instance &, xr::system &);
|
||||
|
||||
} // namespace xr
|
||||
@@ -17,11 +17,10 @@
|
||||
*/
|
||||
|
||||
#include "fb_body_tracker.h"
|
||||
#include "application.h"
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "xr/instance.h"
|
||||
#include "xr/meta_body_tracking_fidelity.h"
|
||||
#include "xr/session.h"
|
||||
#include "xr/to_string.h"
|
||||
#include "xr/xr.h"
|
||||
#include <ranges>
|
||||
#include <openxr/openxr.h>
|
||||
|
||||
@@ -40,33 +39,59 @@ std::vector<XrFullBodyJointMETA> xr::fb_body_tracker::get_whitelisted_joints(boo
|
||||
return {whitelisted_joints.begin(), whitelisted_joints.end()};
|
||||
}
|
||||
|
||||
xr::fb_body_tracker::fb_body_tracker(instance & inst, session & s, bool full_body, bool hip) :
|
||||
handle(inst.get_proc<PFN_xrDestroyBodyTrackerFB>("xrDestroyBodyTrackerFB")),
|
||||
xrRequestBodyTrackingFidelityMETA(inst.get_proc<PFN_xrRequestBodyTrackingFidelityMETA>("xrRequestBodyTrackingFidelityMETA")),
|
||||
xrLocateBodyJointsFB(inst.get_proc<PFN_xrLocateBodyJointsFB>("xrLocateBodyJointsFB")),
|
||||
full_body(full_body),
|
||||
hip(hip)
|
||||
xr::fb_body_tracker::fb_body_tracker(instance & inst, session & s) :
|
||||
s(s)
|
||||
{
|
||||
auto xrCreateBodyTrackerFB = inst.get_proc<PFN_xrCreateBodyTrackerFB>("xrCreateBodyTrackerFB");
|
||||
xrCreateBodyTrackerFB = inst.get_proc<PFN_xrCreateBodyTrackerFB>("xrCreateBodyTrackerFB");
|
||||
xrRequestBodyTrackingFidelityMETA = inst.get_proc<PFN_xrRequestBodyTrackingFidelityMETA>("xrRequestBodyTrackingFidelityMETA");
|
||||
xrLocateBodyJointsFB = inst.get_proc<PFN_xrLocateBodyJointsFB>("xrLocateBodyJointsFB");
|
||||
xrDestroyBodyTrackerFB = inst.get_proc<PFN_xrDestroyBodyTrackerFB>("xrDestroyBodyTrackerFB");
|
||||
}
|
||||
xr::fb_body_tracker::~fb_body_tracker()
|
||||
{
|
||||
stop();
|
||||
}
|
||||
|
||||
void xr::fb_body_tracker::start(bool full_body, bool hip)
|
||||
{
|
||||
assert(xrCreateBodyTrackerFB);
|
||||
this->full_body = full_body;
|
||||
this->hip = hip;
|
||||
|
||||
XrBodyTrackerCreateInfoFB create_info{
|
||||
.type = XR_TYPE_BODY_TRACKER_CREATE_INFO_FB,
|
||||
.bodyJointSet = full_body
|
||||
? XR_BODY_JOINT_SET_FULL_BODY_META
|
||||
: XR_BODY_JOINT_SET_DEFAULT_FB,
|
||||
.next = nullptr,
|
||||
};
|
||||
create_info.bodyJointSet = full_body
|
||||
? XR_BODY_JOINT_SET_FULL_BODY_META
|
||||
: XR_BODY_JOINT_SET_DEFAULT_FB;
|
||||
|
||||
CHECK_XR(xrCreateBodyTrackerFB(s, &create_info, &id));
|
||||
CHECK_XR(xrCreateBodyTrackerFB(s, &create_info, &handle));
|
||||
|
||||
// Enable IOBT.
|
||||
CHECK_XR(xrRequestBodyTrackingFidelityMETA(id, XR_BODY_TRACKING_FIDELITY_HIGH_META));
|
||||
CHECK_XR(xrRequestBodyTrackingFidelityMETA(handle, XR_BODY_TRACKING_FIDELITY_HIGH_META));
|
||||
|
||||
whitelisted_joints = get_whitelisted_joints(full_body, hip);
|
||||
}
|
||||
void xr::fb_body_tracker::stop()
|
||||
{
|
||||
full_body = false;
|
||||
hip = false;
|
||||
if (handle)
|
||||
{
|
||||
assert(xrDestroyBodyTrackerFB);
|
||||
CHECK_XR(xrDestroyBodyTrackerFB(std::exchange(handle, nullptr)));
|
||||
}
|
||||
}
|
||||
size_t xr::fb_body_tracker::count() const
|
||||
{
|
||||
const auto & config = application::get_config();
|
||||
return get_whitelisted_joints(config.fb_lower_body, config.fb_hip).size();
|
||||
}
|
||||
|
||||
std::optional<std::array<wivrn::from_headset::body_tracking::pose, wivrn::from_headset::body_tracking::max_tracked_poses>> xr::fb_body_tracker::locate_spaces(XrTime time, XrSpace reference)
|
||||
{
|
||||
if (!id)
|
||||
if (!handle)
|
||||
return std::nullopt;
|
||||
|
||||
assert(xrLocateBodyJointsFB);
|
||||
@@ -86,7 +111,7 @@ std::optional<std::array<wivrn::from_headset::body_tracking::pose, wivrn::from_h
|
||||
.jointLocations = joints.data(),
|
||||
};
|
||||
|
||||
if (auto res = xrLocateBodyJointsFB(id, &locate_info, &joint_locations); !XR_SUCCEEDED(res))
|
||||
if (auto res = xrLocateBodyJointsFB(handle, &locate_info, &joint_locations); !XR_SUCCEEDED(res))
|
||||
{
|
||||
spdlog::warn("xrLocateBodyJointsFB returned {}", xr::to_string(res));
|
||||
return std::nullopt;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#include "wivrn_packets.h"
|
||||
|
||||
#include "utils/handle.h"
|
||||
#include "xr/meta_body_tracking_fidelity.h"
|
||||
#include <array>
|
||||
#include <optional>
|
||||
@@ -31,10 +30,15 @@ namespace xr
|
||||
class instance;
|
||||
class session;
|
||||
|
||||
class fb_body_tracker : public utils::handle<XrBodyTrackerFB>
|
||||
class fb_body_tracker
|
||||
{
|
||||
XrSession s;
|
||||
XrBodyTrackerFB handle{};
|
||||
|
||||
PFN_xrCreateBodyTrackerFB xrCreateBodyTrackerFB{};
|
||||
PFN_xrRequestBodyTrackingFidelityMETA xrRequestBodyTrackingFidelityMETA{};
|
||||
PFN_xrLocateBodyJointsFB xrLocateBodyJointsFB{};
|
||||
PFN_xrDestroyBodyTrackerFB xrDestroyBodyTrackerFB{};
|
||||
|
||||
bool full_body{};
|
||||
bool hip{};
|
||||
@@ -55,7 +59,13 @@ public:
|
||||
};
|
||||
static std::vector<XrFullBodyJointMETA> get_whitelisted_joints(bool full_body, bool hip);
|
||||
|
||||
fb_body_tracker(instance & inst, session & s, bool full_body, bool hip);
|
||||
fb_body_tracker() = default;
|
||||
fb_body_tracker(instance & inst, session & s);
|
||||
~fb_body_tracker();
|
||||
|
||||
void start(bool lower_body, bool hip);
|
||||
void stop();
|
||||
size_t count() const;
|
||||
|
||||
std::optional<std::array<wivrn::from_headset::body_tracking::pose, wivrn::from_headset::body_tracking::max_tracked_poses>> locate_spaces(XrTime time, XrSpace reference);
|
||||
};
|
||||
|
||||
@@ -23,11 +23,18 @@
|
||||
#include <cstdint>
|
||||
#include <openxr/openxr.h>
|
||||
|
||||
xr::fb_face_tracker2::fb_face_tracker2(instance & inst, session & s) :
|
||||
handle(inst.get_proc<PFN_xrDestroyFaceTracker2FB>("xrDestroyFaceTracker2FB"))
|
||||
static PFN_xrDestroyFaceTracker2FB xrDestroyFaceTracker2FB{};
|
||||
|
||||
XrResult xr::destroy_fb_face_tracker2(XrFaceTracker2FB id)
|
||||
{
|
||||
return xrDestroyFaceTracker2FB(id);
|
||||
}
|
||||
|
||||
xr::fb_face_tracker2::fb_face_tracker2(instance & inst, session & s)
|
||||
{
|
||||
auto xrCreateFaceTracker2FB = inst.get_proc<PFN_xrCreateFaceTracker2FB>("xrCreateFaceTracker2FB");
|
||||
xrGetFaceExpressionWeights2FB = inst.get_proc<PFN_xrGetFaceExpressionWeights2FB>("xrGetFaceExpressionWeights2FB");
|
||||
xrDestroyFaceTracker2FB = inst.get_proc<PFN_xrDestroyFaceTracker2FB>("xrDestroyFaceTracker2FB");
|
||||
assert(xrCreateFaceTracker2FB);
|
||||
|
||||
XrFaceTrackingDataSource2FB data_sources[1];
|
||||
|
||||
@@ -27,12 +27,16 @@ namespace xr
|
||||
class instance;
|
||||
class session;
|
||||
|
||||
class fb_face_tracker2 : public utils::handle<XrFaceTracker2FB>
|
||||
XrResult destroy_fb_face_tracker2(XrFaceTracker2FB);
|
||||
|
||||
class fb_face_tracker2 : public utils::handle<XrFaceTracker2FB, destroy_fb_face_tracker2>
|
||||
{
|
||||
PFN_xrGetFaceExpressionWeights2FB xrGetFaceExpressionWeights2FB{};
|
||||
PFN_xrDestroyFaceTracker2FB xrDestroyFaceTracker2FB{};
|
||||
|
||||
public:
|
||||
using packet_type = wivrn::from_headset::tracking::fb_face2;
|
||||
fb_face_tracker2() = default;
|
||||
fb_face_tracker2(instance & inst, session & s);
|
||||
|
||||
void get_weights(XrTime time, packet_type & out_expressions);
|
||||
|
||||
@@ -23,12 +23,19 @@
|
||||
#include "xr/session.h"
|
||||
#include <cassert>
|
||||
|
||||
xr::hand_tracker::hand_tracker(instance & inst, session & session, const XrHandTrackerCreateInfoEXT & info) :
|
||||
handle(inst.get_proc<PFN_xrDestroyHandTrackerEXT>("xrDestroyHandTrackerEXT"))
|
||||
static PFN_xrDestroyHandTrackerEXT xrDestroyHandTrackerEXT{};
|
||||
|
||||
XrResult xr::destroy_hand_tracker(XrHandTrackerEXT id)
|
||||
{
|
||||
auto xrCreateHandTrackerEXT = inst.get_proc<PFN_xrCreateHandTrackerEXT>("xrCreateHandTrackerEXT");
|
||||
return xrDestroyHandTrackerEXT(id);
|
||||
}
|
||||
|
||||
xr::hand_tracker::hand_tracker(instance & inst, session & session, const XrHandTrackerCreateInfoEXT & info)
|
||||
{
|
||||
static auto xrCreateHandTrackerEXT = inst.get_proc<PFN_xrCreateHandTrackerEXT>("xrCreateHandTrackerEXT");
|
||||
assert(xrCreateHandTrackerEXT);
|
||||
xrLocateHandJointsEXT = inst.get_proc<PFN_xrLocateHandJointsEXT>("xrLocateHandJointsEXT");
|
||||
xrDestroyHandTrackerEXT = inst.get_proc<PFN_xrDestroyHandTrackerEXT>("xrDestroyHandTrackerEXT");
|
||||
CHECK_XR(xrCreateHandTrackerEXT(session, &info, &id));
|
||||
}
|
||||
|
||||
|
||||
@@ -28,12 +28,14 @@ namespace xr
|
||||
{
|
||||
class instance;
|
||||
class session;
|
||||
XrResult destroy_hand_tracker(XrHandTrackerEXT);
|
||||
|
||||
class hand_tracker : public utils::handle<XrHandTrackerEXT>
|
||||
class hand_tracker : public utils::handle<XrHandTrackerEXT, destroy_hand_tracker>
|
||||
{
|
||||
PFN_xrLocateHandJointsEXT xrLocateHandJointsEXT{};
|
||||
|
||||
public:
|
||||
hand_tracker() = default;
|
||||
hand_tracker(instance & inst, session & session, const XrHandTrackerCreateInfoEXT & info);
|
||||
|
||||
using joint = std::pair<XrHandJointLocationEXT, XrHandJointVelocityEXT>;
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
* WiVRn VR streaming
|
||||
* Copyright (C) 2025 Awzri <awzri@awzricat.com>
|
||||
* Copyright (C) 2025 Sapphire <imsapphire0@gmail.com>
|
||||
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -20,7 +19,8 @@
|
||||
|
||||
#include "htc_body_tracker.h"
|
||||
#include "xr/details/enumerate.h"
|
||||
#include "xr/session.h"
|
||||
#include "xr/htc_exts.h"
|
||||
#include "xr/xr.h"
|
||||
#include <openxr/openxr.h>
|
||||
|
||||
// Note: This utilizes extensions not present in the OpenXR spec!
|
||||
@@ -28,25 +28,11 @@
|
||||
// https://hub.vive.com/apidoc/api/VIVE.OpenXR.Tracker.ViveXRTracker.html
|
||||
// https://hub.vive.com/apidoc/api/VIVE.OpenXR.VivePathEnumerationHelper.xrEnumeratePathsForInteractionProfileHTCDelegate.html
|
||||
|
||||
xr::vive_xr_tracker::vive_xr_tracker(XrPath path, xr::space & space, XrSession session) :
|
||||
path(path),
|
||||
space(space)
|
||||
xr::vive_xr_tracker::vive_xr_tracker(xr::space && space) :
|
||||
space(std::move(space)) {}
|
||||
void xr::vive_xr_tracker::set_active(bool active)
|
||||
{
|
||||
update_active(session);
|
||||
}
|
||||
|
||||
void xr::vive_xr_tracker::update_active(XrSession session)
|
||||
{
|
||||
XrInputSourceLocalizedNameGetInfo get_info{
|
||||
.type = XR_TYPE_INPUT_SOURCE_LOCALIZED_NAME_GET_INFO,
|
||||
.next = nullptr,
|
||||
.sourcePath = path,
|
||||
.whichComponents = XR_INPUT_SOURCE_LOCALIZED_NAME_USER_PATH_BIT,
|
||||
};
|
||||
|
||||
auto role = xr::details::enumerate<char>(xrGetInputSourceLocalizedName, session, &get_info);
|
||||
|
||||
is_active = not role.contains("_");
|
||||
is_active = active;
|
||||
}
|
||||
bool xr::vive_xr_tracker::get_active() const
|
||||
{
|
||||
@@ -90,18 +76,63 @@ static wivrn::from_headset::body_tracking::pose locate_space(XrSpace space, XrSp
|
||||
return res;
|
||||
}
|
||||
|
||||
xr::htc_body_tracker::htc_body_tracker(session & s, std::vector<std::pair<XrPath, xr::space>> & trackers) :
|
||||
std::vector<std::string> xr::htc_body_tracker::get_roles()
|
||||
{
|
||||
auto paths = get_paths();
|
||||
std::vector<std::string> roles{};
|
||||
roles.reserve(paths.size());
|
||||
|
||||
for (auto & path: paths)
|
||||
{
|
||||
XrInputSourceLocalizedNameGetInfo get_info{
|
||||
.type = XR_TYPE_INPUT_SOURCE_LOCALIZED_NAME_GET_INFO,
|
||||
.next = nullptr,
|
||||
.sourcePath = path,
|
||||
.whichComponents = XR_INPUT_SOURCE_LOCALIZED_NAME_USER_PATH_BIT,
|
||||
};
|
||||
|
||||
roles.emplace_back(xr::details::enumerate<char>(xrGetInputSourceLocalizedName, s, &get_info));
|
||||
}
|
||||
|
||||
return roles;
|
||||
}
|
||||
|
||||
xr::htc_body_tracker::htc_body_tracker(instance & inst, session & s) :
|
||||
inst(&inst),
|
||||
s(s)
|
||||
{
|
||||
this->trackers.reserve(trackers.size());
|
||||
for (auto & [path, space]: trackers)
|
||||
this->trackers.emplace_back(path, space, s);
|
||||
xrEnumeratePathsForInteractionProfileHTC = inst.get_proc<PFN_xrEnumeratePathsForInteractionProfileHTC>("xrEnumeratePathsForInteractionProfileHTC");
|
||||
}
|
||||
|
||||
std::vector<XrPath> xr::htc_body_tracker::get_paths(XrPath user_path)
|
||||
{
|
||||
assert(xrEnumeratePathsForInteractionProfileHTC);
|
||||
XrPath tracker_profile = inst->string_to_path("/interaction_profiles/htc/vive_xr_tracker");
|
||||
|
||||
XrPathsForInteractionProfileEnumerateInfoHTC profile_info{
|
||||
.type = XR_TYPE_UNKNOWN,
|
||||
.next = nullptr,
|
||||
.interactionProfile = tracker_profile,
|
||||
.userPath = user_path,
|
||||
};
|
||||
return xr::details::enumerate<XrPath>(xrEnumeratePathsForInteractionProfileHTC, *inst, profile_info);
|
||||
}
|
||||
|
||||
void xr::htc_body_tracker::add(xr::space && space)
|
||||
{
|
||||
trackers.emplace_back(std::move(space));
|
||||
}
|
||||
size_t xr::htc_body_tracker::count() const
|
||||
{
|
||||
return trackers.size();
|
||||
}
|
||||
|
||||
void xr::htc_body_tracker::update_active()
|
||||
{
|
||||
for (auto & tracker: trackers)
|
||||
tracker.update_active(s);
|
||||
auto roles = get_roles();
|
||||
assert(roles.size() >= trackers.size());
|
||||
for (int i = 0; i < trackers.size(); i++)
|
||||
trackers[i].set_active(!roles[i].contains('_'));
|
||||
}
|
||||
|
||||
std::array<wivrn::from_headset::body_tracking::pose, wivrn::from_headset::body_tracking::max_tracked_poses> xr::htc_body_tracker::locate_spaces(XrTime time, XrSpace reference)
|
||||
@@ -110,7 +141,7 @@ std::array<wivrn::from_headset::body_tracking::pose, wivrn::from_headset::body_t
|
||||
|
||||
for (int i = 0; i < trackers.size(); i++)
|
||||
{
|
||||
auto & tracker = trackers[i];
|
||||
auto & tracker = trackers.at(i);
|
||||
wivrn::from_headset::body_tracking::pose pose{
|
||||
.pose = {},
|
||||
.flags = 0,
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
* WiVRn VR streaming
|
||||
* Copyright (C) 2025 Awzri <awzri@awzricat.com>
|
||||
* Copyright (C) 2025 Sapphire <imsapphire0@gmail.com>
|
||||
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -21,7 +20,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "wivrn_packets.h"
|
||||
#include "xr/htc_exts.h"
|
||||
#include "xr/space.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <openxr/openxr.h>
|
||||
|
||||
@@ -33,24 +34,32 @@ class session;
|
||||
class vive_xr_tracker
|
||||
{
|
||||
bool is_active = false;
|
||||
XrPath path;
|
||||
xr::space & space;
|
||||
xr::space space;
|
||||
|
||||
public:
|
||||
vive_xr_tracker(XrPath path, xr::space & s, XrSession session);
|
||||
void update_active(XrSession session);
|
||||
vive_xr_tracker(xr::space && s);
|
||||
void set_active(bool active);
|
||||
bool get_active() const;
|
||||
XrSpace get_space() const;
|
||||
};
|
||||
|
||||
class htc_body_tracker
|
||||
{
|
||||
instance * inst;
|
||||
XrSession s;
|
||||
std::vector<vive_xr_tracker> trackers;
|
||||
|
||||
public:
|
||||
htc_body_tracker(session & s, std::vector<std::pair<XrPath, xr::space>> & trackers);
|
||||
PFN_xrEnumeratePathsForInteractionProfileHTC xrEnumeratePathsForInteractionProfileHTC{};
|
||||
|
||||
std::vector<std::string> get_roles();
|
||||
|
||||
public:
|
||||
htc_body_tracker() = default;
|
||||
htc_body_tracker(instance & inst, session & s);
|
||||
|
||||
std::vector<XrPath> get_paths(XrPath user_path = XR_NULL_PATH);
|
||||
void add(xr::space && space);
|
||||
size_t count() const;
|
||||
void update_active();
|
||||
std::array<wivrn::from_headset::body_tracking::pose, wivrn::from_headset::body_tracking::max_tracked_poses> locate_spaces(XrTime time, XrSpace reference);
|
||||
};
|
||||
|
||||
@@ -18,43 +18,53 @@
|
||||
*/
|
||||
|
||||
#include "htc_face_tracker.h"
|
||||
#include "wivrn_packets.h"
|
||||
#include "xr/instance.h"
|
||||
#include "xr/session.h"
|
||||
#include <openxr/openxr.h>
|
||||
|
||||
static XrFacialTrackerHTC make_tracker(xr::instance & inst, xr::session & s, XrFacialTrackingTypeHTC type)
|
||||
xr::htc_face_tracker::htc_face_tracker(instance & inst, session & s, bool eye, bool lip) :
|
||||
s(s)
|
||||
{
|
||||
if (!eye && !lip)
|
||||
return;
|
||||
|
||||
xrCreateFacialTrackerHTC = inst.get_proc<PFN_xrCreateFacialTrackerHTC>("xrCreateFacialTrackerHTC");
|
||||
xrGetFacialExpressionsHTC = inst.get_proc<PFN_xrGetFacialExpressionsHTC>("xrGetFacialExpressionsHTC");
|
||||
xrDestroyFacialTrackerHTC = inst.get_proc<PFN_xrDestroyFacialTrackerHTC>("xrDestroyFacialTrackerHTC");
|
||||
|
||||
XrFacialTrackerCreateInfoHTC create_info{
|
||||
.type = XR_TYPE_FACIAL_TRACKER_CREATE_INFO_HTC,
|
||||
.facialTrackingType = type,
|
||||
.next = nullptr,
|
||||
};
|
||||
auto xrCreateFacialTrackerHTC = inst.get_proc<PFN_xrCreateFacialTrackerHTC>("xrCreateFacialTrackerHTC");
|
||||
XrFacialTrackerHTC id;
|
||||
CHECK_XR(xrCreateFacialTrackerHTC(s, &create_info, &id));
|
||||
return id;
|
||||
|
||||
if (eye)
|
||||
{
|
||||
create_info.facialTrackingType = XR_FACIAL_TRACKING_TYPE_EYE_DEFAULT_HTC;
|
||||
xrCreateFacialTrackerHTC(s, &create_info, &this->eye);
|
||||
}
|
||||
if (lip)
|
||||
{
|
||||
create_info.facialTrackingType = XR_FACIAL_TRACKING_TYPE_LIP_DEFAULT_HTC;
|
||||
xrCreateFacialTrackerHTC(s, &create_info, &this->lip);
|
||||
}
|
||||
}
|
||||
|
||||
static XrFacialTrackerHTC get_eye_tracker(xr::instance & inst, xr::session & s)
|
||||
xr::htc_face_tracker::~htc_face_tracker()
|
||||
{
|
||||
static XrFacialTrackerHTC res = make_tracker(inst, s, XR_FACIAL_TRACKING_TYPE_EYE_DEFAULT_HTC);
|
||||
return res;
|
||||
}
|
||||
static XrFacialTrackerHTC get_lip_tracker(xr::instance & inst, xr::session & s)
|
||||
{
|
||||
static XrFacialTrackerHTC res = make_tracker(inst, s, XR_FACIAL_TRACKING_TYPE_LIP_DEFAULT_HTC);
|
||||
return res;
|
||||
}
|
||||
if (!xrDestroyFacialTrackerHTC)
|
||||
return;
|
||||
|
||||
xr::htc_face_tracker::htc_face_tracker(instance & inst, session & s, bool eye, bool lip) :
|
||||
xrGetFacialExpressionsHTC(inst.get_proc<PFN_xrGetFacialExpressionsHTC>("xrGetFacialExpressionsHTC")),
|
||||
eye(eye ? get_eye_tracker(inst, s) : XR_NULL_HANDLE),
|
||||
lip(lip ? get_lip_tracker(inst, s) : XR_NULL_HANDLE)
|
||||
{
|
||||
if (eye)
|
||||
CHECK_XR(xrDestroyFacialTrackerHTC(std::exchange(eye, nullptr)));
|
||||
if (lip)
|
||||
CHECK_XR(xrDestroyFacialTrackerHTC(std::exchange(lip, nullptr)));
|
||||
}
|
||||
|
||||
void xr::htc_face_tracker::get_weights(XrTime time, packet_type & out_expressions)
|
||||
{
|
||||
assert(xrGetFacialExpressionsHTC);
|
||||
if (!(eye || lip) || !xrGetFacialExpressionsHTC)
|
||||
return;
|
||||
|
||||
XrFacialExpressionsHTC expressions{
|
||||
.type = XR_TYPE_FACIAL_EXPRESSIONS_HTC,
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "utils/handle.h"
|
||||
#include "wivrn_packets.h"
|
||||
#include <openxr/openxr.h>
|
||||
|
||||
@@ -29,13 +30,18 @@ class session;
|
||||
|
||||
class htc_face_tracker
|
||||
{
|
||||
PFN_xrGetFacialExpressionsHTC xrGetFacialExpressionsHTC;
|
||||
XrFacialTrackerHTC eye;
|
||||
XrFacialTrackerHTC lip;
|
||||
XrSession s;
|
||||
XrFacialTrackerHTC eye{};
|
||||
XrFacialTrackerHTC lip{};
|
||||
PFN_xrCreateFacialTrackerHTC xrCreateFacialTrackerHTC{};
|
||||
PFN_xrGetFacialExpressionsHTC xrGetFacialExpressionsHTC{};
|
||||
PFN_xrDestroyFacialTrackerHTC xrDestroyFacialTrackerHTC{};
|
||||
|
||||
public:
|
||||
using packet_type = wivrn::from_headset::tracking::htc_face;
|
||||
htc_face_tracker() = default;
|
||||
htc_face_tracker(instance & inst, session & s, bool eye, bool lip);
|
||||
~htc_face_tracker();
|
||||
|
||||
void get_weights(XrTime time, packet_type & out_expressions);
|
||||
};
|
||||
|
||||
+1
-16
@@ -19,9 +19,8 @@
|
||||
|
||||
#include "instance.h"
|
||||
|
||||
#include "xr.h"
|
||||
#include "xr/details/enumerate.h"
|
||||
#include "xr/htc_exts.h"
|
||||
#include "xr/to_string.h"
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
@@ -213,20 +212,6 @@ XrPath xr::instance::string_to_path(const std::string & path)
|
||||
return p;
|
||||
}
|
||||
|
||||
std::vector<XrPath> xr::instance::enumerate_paths_for_interaction_profile(XrPath interaction_profile, XrPath user_path)
|
||||
{
|
||||
assert(has_extension(XR_HTC_PATH_ENUMERATION_EXTENSION_NAME));
|
||||
static auto xrEnumeratePathsForInteractionProfileHTC = get_proc<PFN_xrEnumeratePathsForInteractionProfileHTC>("xrEnumeratePathsForInteractionProfileHTC");
|
||||
|
||||
XrPathsForInteractionProfileEnumerateInfoHTC profile_info{
|
||||
.type = XR_TYPE_UNKNOWN,
|
||||
.next = nullptr,
|
||||
.interactionProfile = interaction_profile,
|
||||
.userPath = user_path,
|
||||
};
|
||||
return xr::details::enumerate<XrPath>(xrEnumeratePathsForInteractionProfileHTC, id, profile_info);
|
||||
}
|
||||
|
||||
bool xr::instance::poll_event(xr::event & buffer)
|
||||
{
|
||||
buffer.header.type = XR_TYPE_EVENT_DATA_BUFFER;
|
||||
|
||||
@@ -90,8 +90,6 @@ public:
|
||||
XrPath string_to_path(const std::string & path);
|
||||
std::string path_to_string(XrPath path);
|
||||
|
||||
std::vector<XrPath> enumerate_paths_for_interaction_profile(XrPath interaction_profile, XrPath user_path = XR_NULL_PATH);
|
||||
|
||||
void suggest_bindings(const std::string & interaction_profile,
|
||||
std::vector<XrActionSuggestedBinding> & bindings);
|
||||
|
||||
|
||||
@@ -23,9 +23,27 @@
|
||||
#include "xr/check.h"
|
||||
#include "xr/instance.h"
|
||||
|
||||
xr::passthrough_layer_fb::passthrough_layer_fb(instance & inst, session & s, const XrPassthroughLayerCreateInfoFB & info) :
|
||||
handle(inst.get_proc<PFN_xrDestroyPassthroughLayerFB>("xrDestroyPassthroughLayerFB"))
|
||||
static PFN_xrDestroyPassthroughLayerFB xrDestroyPassthroughLayerFB{};
|
||||
static PFN_xrDestroyPassthroughFB xrDestroyPassthroughFB{};
|
||||
static PFN_xrDestroyPassthroughHTC xrDestroyPassthroughHTC{};
|
||||
|
||||
XrResult xr::destroy_passthrough_layer_fb(XrPassthroughLayerFB id)
|
||||
{
|
||||
return xrDestroyPassthroughLayerFB(id);
|
||||
}
|
||||
XrResult xr::destroy_passthrough_fb(XrPassthroughFB id)
|
||||
{
|
||||
return xrDestroyPassthroughFB(id);
|
||||
}
|
||||
XrResult xr::destroy_passthrough_htc(XrPassthroughHTC id)
|
||||
{
|
||||
return xrDestroyPassthroughHTC(id);
|
||||
}
|
||||
|
||||
xr::passthrough_layer_fb::passthrough_layer_fb(instance & inst, session & s, const XrPassthroughLayerCreateInfoFB & info)
|
||||
{
|
||||
xrDestroyPassthroughLayerFB = inst.get_proc<PFN_xrDestroyPassthroughLayerFB>("xrDestroyPassthroughLayerFB");
|
||||
|
||||
PFN_xrCreatePassthroughLayerFB xrCreatePassthroughLayerFB = inst.get_proc<PFN_xrCreatePassthroughLayerFB>("xrCreatePassthroughLayerFB");
|
||||
CHECK_XR(xrCreatePassthroughLayerFB(s, &info, &id));
|
||||
}
|
||||
@@ -33,6 +51,7 @@ xr::passthrough_layer_fb::passthrough_layer_fb(instance & inst, session & s, con
|
||||
static XrPassthroughFB create_passthrough_fb(xr::instance & inst, xr::session & s)
|
||||
{
|
||||
PFN_xrCreatePassthroughFB xrCreatePassthroughFB = inst.get_proc<PFN_xrCreatePassthroughFB>("xrCreatePassthroughFB");
|
||||
xrDestroyPassthroughFB = inst.get_proc<PFN_xrDestroyPassthroughFB>("xrDestroyPassthroughFB");
|
||||
|
||||
XrPassthroughFB id;
|
||||
XrPassthroughCreateInfoFB info{
|
||||
@@ -45,7 +64,7 @@ static XrPassthroughFB create_passthrough_fb(xr::instance & inst, xr::session &
|
||||
}
|
||||
|
||||
xr::passthrough_fb::passthrough_fb(instance & inst, session & s) :
|
||||
handle(create_passthrough_fb(inst, s), inst.get_proc<PFN_xrDestroyPassthroughFB>("xrDestroyPassthroughFB")),
|
||||
utils::handle<XrPassthroughFB, destroy_passthrough_fb>(create_passthrough_fb(inst, s)),
|
||||
passthrough_layer(inst, s, XrPassthroughLayerCreateInfoFB{
|
||||
.type = XR_TYPE_PASSTHROUGH_LAYER_CREATE_INFO_FB,
|
||||
.passthrough = id,
|
||||
@@ -79,10 +98,10 @@ void xr::passthrough_fb::pause()
|
||||
CHECK_XR(xrPassthroughPauseFB(id));
|
||||
}
|
||||
|
||||
xr::passthrough_htc::passthrough_htc(instance & inst, session & s) :
|
||||
handle(inst.get_proc<PFN_xrDestroyPassthroughHTC>("xrDestroyPassthroughHTC"))
|
||||
xr::passthrough_htc::passthrough_htc(instance & inst, session & s)
|
||||
{
|
||||
PFN_xrCreatePassthroughHTC xrCreatePassthroughHTC = inst.get_proc<PFN_xrCreatePassthroughHTC>("xrCreatePassthroughHTC");
|
||||
xrDestroyPassthroughHTC = inst.get_proc<PFN_xrDestroyPassthroughHTC>("xrDestroyPassthroughHTC");
|
||||
|
||||
XrPassthroughCreateInfoHTC info{
|
||||
.type = XR_TYPE_PASSTHROUGH_CREATE_INFO_HTC,
|
||||
|
||||
@@ -28,13 +28,17 @@ namespace xr
|
||||
class instance;
|
||||
class session;
|
||||
|
||||
class passthrough_layer_fb : public utils::handle<XrPassthroughLayerFB>
|
||||
XrResult destroy_passthrough_layer_fb(XrPassthroughLayerFB);
|
||||
XrResult destroy_passthrough_fb(XrPassthroughFB);
|
||||
XrResult destroy_passthrough_htc(XrPassthroughHTC);
|
||||
|
||||
class passthrough_layer_fb : public utils::handle<XrPassthroughLayerFB, destroy_passthrough_layer_fb>
|
||||
{
|
||||
public:
|
||||
passthrough_layer_fb(instance &, session &, const XrPassthroughLayerCreateInfoFB &);
|
||||
};
|
||||
|
||||
class passthrough_fb : public utils::handle<XrPassthroughFB>
|
||||
class passthrough_fb : public utils::handle<XrPassthroughFB, destroy_passthrough_fb>
|
||||
{
|
||||
PFN_xrPassthroughStartFB xrPassthroughStartFB{};
|
||||
PFN_xrPassthroughPauseFB xrPassthroughPauseFB{};
|
||||
@@ -55,7 +59,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class passthrough_htc : public utils::handle<XrPassthroughHTC>
|
||||
class passthrough_htc : public utils::handle<XrPassthroughHTC, destroy_passthrough_htc>
|
||||
{
|
||||
XrCompositionLayerPassthroughHTC composition_layer;
|
||||
|
||||
|
||||
@@ -18,15 +18,19 @@
|
||||
|
||||
#include "pico_body_tracker.h"
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "xr/instance.h"
|
||||
#include "xr/session.h"
|
||||
#include "xr/to_string.h"
|
||||
#include "xr/xr.h"
|
||||
#include <openxr/openxr.h>
|
||||
|
||||
static_assert(xr::pico_body_tracker::joint_whitelist.size() <= wivrn::from_headset::body_tracking::max_tracked_poses);
|
||||
|
||||
xr::pico_body_tracker::pico_body_tracker(instance & inst, session & s) :
|
||||
handle(inst.get_proc<PFN_xrDestroyBodyTrackerBD>("xrDestroyBodyTrackerBD"))
|
||||
static PFN_xrDestroyBodyTrackerBD xrDestroyBodyTrackerBD{};
|
||||
|
||||
XrResult xr::destroy_pico_body_tracker(XrBodyTrackerBD id)
|
||||
{
|
||||
return xrDestroyBodyTrackerBD(id);
|
||||
}
|
||||
|
||||
xr::pico_body_tracker::pico_body_tracker(instance & inst, session & s)
|
||||
{
|
||||
auto xrCreateBodyTrackerBD = inst.get_proc<PFN_xrCreateBodyTrackerBD>("xrCreateBodyTrackerBD");
|
||||
xrLocateBodyJointsBD = inst.get_proc<PFN_xrLocateBodyJointsBD>("xrLocateBodyJointsBD");
|
||||
@@ -41,6 +45,10 @@ xr::pico_body_tracker::pico_body_tracker(instance & inst, session & s) :
|
||||
CHECK_XR(xrCreateBodyTrackerBD(s, &create_info, &id));
|
||||
}
|
||||
|
||||
size_t xr::pico_body_tracker::count() const
|
||||
{
|
||||
return joint_whitelist.size();
|
||||
}
|
||||
std::optional<std::array<wivrn::from_headset::body_tracking::pose, wivrn::from_headset::body_tracking::max_tracked_poses>> xr::pico_body_tracker::locate_spaces(XrTime time, XrSpace reference)
|
||||
{
|
||||
if (!xrLocateBodyJointsBD)
|
||||
|
||||
@@ -30,7 +30,9 @@ namespace xr
|
||||
class instance;
|
||||
class session;
|
||||
|
||||
class pico_body_tracker : public utils::handle<XrBodyTrackerBD>
|
||||
XrResult destroy_pico_body_tracker(XrBodyTrackerBD);
|
||||
|
||||
class pico_body_tracker : public utils::handle<XrBodyTrackerBD, destroy_pico_body_tracker>
|
||||
{
|
||||
PFN_xrLocateBodyJointsBD xrLocateBodyJointsBD{};
|
||||
|
||||
@@ -46,8 +48,10 @@ public:
|
||||
XR_BODY_JOINT_RIGHT_FOOT_BD,
|
||||
};
|
||||
|
||||
pico_body_tracker() = default;
|
||||
pico_body_tracker(instance & inst, session & s);
|
||||
|
||||
size_t count() const;
|
||||
std::optional<std::array<wivrn::from_headset::body_tracking::pose, wivrn::from_headset::body_tracking::max_tracked_poses>> locate_spaces(XrTime time, XrSpace reference);
|
||||
};
|
||||
} // namespace xr
|
||||
|
||||
+124
-135
@@ -18,163 +18,152 @@
|
||||
*/
|
||||
|
||||
#include "pico_face_tracker.h"
|
||||
|
||||
#include "spdlog/common.h"
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "wivrn_packets.h"
|
||||
#include "xr/instance.h"
|
||||
#include "xr/pico_eye_types.h"
|
||||
#include "xr/pico_eye_types_reflection.h"
|
||||
#include "xr/session.h"
|
||||
#include "xr/to_string.h"
|
||||
|
||||
#include <mutex>
|
||||
#include <cstring>
|
||||
#include <stdexcept>
|
||||
#include <openxr/openxr.h>
|
||||
|
||||
struct xr::pico_face_tracker::impl
|
||||
xr::pico_face_tracker::pico_face_tracker(instance & inst, session & s_) :
|
||||
s(s_)
|
||||
{
|
||||
const XrSession s;
|
||||
const PFN_xrStopEyeTrackingPICO xrStopEyeTrackingPICO;
|
||||
const PFN_xrGetFaceTrackingDataPICO xrGetFaceTrackingDataPICO;
|
||||
xrStartEyeTrackingPICO = inst.get_proc<PFN_xrStartEyeTrackingPICO>("xrStartEyeTrackingPICO");
|
||||
xrStopEyeTrackingPICO = inst.get_proc<PFN_xrStopEyeTrackingPICO>("xrStopEyeTrackingPICO");
|
||||
xrSetTrackingModePICO = inst.get_proc<PFN_xrSetTrackingModePICO>("xrSetTrackingModePICO");
|
||||
xrGetFaceTrackingDataPICO = inst.get_proc<PFN_xrGetFaceTrackingDataPICO>("xrGetFaceTrackingDataPICO");
|
||||
}
|
||||
xr::pico_face_tracker::~pico_face_tracker()
|
||||
{
|
||||
stop();
|
||||
}
|
||||
|
||||
impl(instance & inst, session & s) :
|
||||
s(s),
|
||||
xrStopEyeTrackingPICO(inst.get_proc<PFN_xrStopEyeTrackingPICO>("xrStopEyeTrackingPICO")),
|
||||
xrGetFaceTrackingDataPICO(inst.get_proc<PFN_xrGetFaceTrackingDataPICO>("xrGetFaceTrackingDataPICO"))
|
||||
void xr::pico_face_tracker::start()
|
||||
{
|
||||
if (started)
|
||||
throw std::invalid_argument("face tracking already started");
|
||||
|
||||
CHECK_XR(xrStartEyeTrackingPICO(s));
|
||||
CHECK_XR(xrSetTrackingModePICO(s, XR_TRACKING_MODE_FACE_BIT_PICO));
|
||||
started = true;
|
||||
}
|
||||
void xr::pico_face_tracker::stop()
|
||||
{
|
||||
if (!started)
|
||||
return;
|
||||
|
||||
if (auto res = xrStopEyeTrackingPICO(s, XR_TRACKING_MODE_FACE_BIT_PICO); !XR_SUCCEEDED(res))
|
||||
spdlog::warn("Failed to deactivate face tracking: {}", xr::to_string(res));
|
||||
|
||||
started = false;
|
||||
}
|
||||
|
||||
void xr::pico_face_tracker::get_weights(XrTime time, wivrn::from_headset::tracking::fb_face2 & out_expressions)
|
||||
{
|
||||
out_expressions.is_valid = false;
|
||||
out_expressions.is_eye_following_blendshapes_valid = false;
|
||||
|
||||
if (!started or !xrGetFaceTrackingDataPICO)
|
||||
return;
|
||||
|
||||
XrFaceTrackingDataPICO face_tracking{.time = 0};
|
||||
|
||||
if (auto res = xrGetFaceTrackingDataPICO(s, time, XR_GET_FACE_DATA_DEFAULT_PICO, &face_tracking); !XR_SUCCEEDED(res))
|
||||
{
|
||||
auto xrStartEyeTrackingPICO = inst.get_proc<PFN_xrStartEyeTrackingPICO>("xrStartEyeTrackingPICO");
|
||||
auto xrSetTrackingModePICO = inst.get_proc<PFN_xrSetTrackingModePICO>("xrSetTrackingModePICO");
|
||||
CHECK_XR(xrStartEyeTrackingPICO(s));
|
||||
CHECK_XR(xrSetTrackingModePICO(s, XR_TRACKING_MODE_FACE_BIT_PICO));
|
||||
spdlog::warn("Unable to get face tracking data: xrGetFaceTrackingDataPICO returned {}", xr::to_string(res));
|
||||
return;
|
||||
}
|
||||
|
||||
~impl()
|
||||
{
|
||||
if (auto res = xrStopEyeTrackingPICO(s, XR_TRACKING_MODE_FACE_BIT_PICO); not XR_SUCCEEDED(res))
|
||||
spdlog::warn("Failed to deactivate face tracking: {}", xr::to_string(res));
|
||||
}
|
||||
|
||||
void get_weights(XrTime time, wivrn::from_headset::tracking::fb_face2 & out_expressions)
|
||||
{
|
||||
out_expressions.is_valid = false;
|
||||
out_expressions.is_eye_following_blendshapes_valid = false;
|
||||
|
||||
XrFaceTrackingDataPICO face_tracking{.time = 0};
|
||||
|
||||
if (auto res = xrGetFaceTrackingDataPICO(s, time, XR_GET_FACE_DATA_DEFAULT_PICO, &face_tracking); !XR_SUCCEEDED(res))
|
||||
{
|
||||
spdlog::warn("Unable to get face tracking data: xrGetFaceTrackingDataPICO returned {}", xr::to_string(res));
|
||||
return;
|
||||
}
|
||||
|
||||
if (face_tracking.time == 0)
|
||||
return;
|
||||
if (face_tracking.time == 0)
|
||||
return;
|
||||
|
||||
#define MAP_EXPRESSION(fb, pico) \
|
||||
out_expressions.weights[fb] = face_tracking.blendShapeWeight[pico];
|
||||
|
||||
// Map the blendshapes.
|
||||
out_expressions.weights.fill(0.f);
|
||||
out_expressions.confidences.fill(1.f);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_BROW_LOWERER_L_FB, XR_BS_BROWDOWN_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_BROW_LOWERER_R_FB, XR_BS_BROWDOWN_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_CHEEK_PUFF_L_FB, XR_BS_CHEEKPUFF_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_CHEEK_PUFF_R_FB, XR_BS_CHEEKPUFF_PICO);
|
||||
// XR_FACE_EXPRESSION2_CHEEK_RAISER_L_FB
|
||||
// XR_FACE_EXPRESSION2_CHEEK_RAISER_R_FB
|
||||
// XR_FACE_EXPRESSION2_CHEEK_SUCK_L_FB
|
||||
// XR_FACE_EXPRESSION2_CHEEK_SUCK_R_FB
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_CHIN_RAISER_B_FB, XR_BS_MOUTHSHRUGLOWER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_CHIN_RAISER_T_FB, XR_BS_MOUTHSHRUGUPPER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_DIMPLER_L_FB, XR_BS_MOUTHDIMPLE_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_DIMPLER_R_FB, XR_BS_MOUTHDIMPLE_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_CLOSED_L_FB, XR_BS_EYEBLINK_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_CLOSED_R_FB, XR_BS_EYEBLINK_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_DOWN_L_FB, XR_BS_EYELOOKDOWN_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_DOWN_R_FB, XR_BS_EYELOOKDOWN_R_PICO);
|
||||
// Map the blendshapes.
|
||||
out_expressions.weights.fill(0.f);
|
||||
out_expressions.confidences.fill(1.f);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_BROW_LOWERER_L_FB, XR_BS_BROWDOWN_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_BROW_LOWERER_R_FB, XR_BS_BROWDOWN_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_CHEEK_PUFF_L_FB, XR_BS_CHEEKPUFF_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_CHEEK_PUFF_R_FB, XR_BS_CHEEKPUFF_PICO);
|
||||
// XR_FACE_EXPRESSION2_CHEEK_RAISER_L_FB
|
||||
// XR_FACE_EXPRESSION2_CHEEK_RAISER_R_FB
|
||||
// XR_FACE_EXPRESSION2_CHEEK_SUCK_L_FB
|
||||
// XR_FACE_EXPRESSION2_CHEEK_SUCK_R_FB
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_CHIN_RAISER_B_FB, XR_BS_MOUTHSHRUGLOWER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_CHIN_RAISER_T_FB, XR_BS_MOUTHSHRUGUPPER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_DIMPLER_L_FB, XR_BS_MOUTHDIMPLE_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_DIMPLER_R_FB, XR_BS_MOUTHDIMPLE_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_CLOSED_L_FB, XR_BS_EYEBLINK_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_CLOSED_R_FB, XR_BS_EYEBLINK_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_DOWN_L_FB, XR_BS_EYELOOKDOWN_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_DOWN_R_FB, XR_BS_EYELOOKDOWN_R_PICO);
|
||||
|
||||
// "out" is left for the left eye, right for the right eye
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_LEFT_L_FB, XR_BS_EYELOOKOUT_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_RIGHT_L_FB, XR_BS_EYELOOKIN_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_LEFT_R_FB, XR_BS_EYELOOKIN_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_RIGHT_R_FB, XR_BS_EYELOOKOUT_R_PICO);
|
||||
// "out" is left for the left eye, right for the right eye
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_LEFT_L_FB, XR_BS_EYELOOKOUT_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_RIGHT_L_FB, XR_BS_EYELOOKIN_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_LEFT_R_FB, XR_BS_EYELOOKIN_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_RIGHT_R_FB, XR_BS_EYELOOKOUT_R_PICO);
|
||||
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_UP_L_FB, XR_BS_EYELOOKUP_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_UP_R_FB, XR_BS_EYELOOKUP_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_INNER_BROW_RAISER_L_FB, XR_BS_BROWINNERUP_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_INNER_BROW_RAISER_R_FB, XR_BS_BROWINNERUP_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_JAW_DROP_FB, XR_BS_JAWOPEN_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_JAW_SIDEWAYS_LEFT_FB, XR_BS_JAWLEFT_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_JAW_SIDEWAYS_RIGHT_FB, XR_BS_JAWRIGHT_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_JAW_THRUST_FB, XR_BS_JAWFORWARD_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LID_TIGHTENER_L_FB, XR_BS_EYESQUINT_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LID_TIGHTENER_R_FB, XR_BS_EYESQUINT_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_CORNER_DEPRESSOR_L_FB, XR_BS_MOUTHFROWN_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_CORNER_DEPRESSOR_R_FB, XR_BS_MOUTHFROWN_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_CORNER_PULLER_L_FB, XR_BS_MOUTHSMILE_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_CORNER_PULLER_R_FB, XR_BS_MOUTHSMILE_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_FUNNELER_LB_FB, XR_BS_MOUTHFUNNEL_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_FUNNELER_LT_FB, XR_BS_MOUTHFUNNEL_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_FUNNELER_RB_FB, XR_BS_MOUTHFUNNEL_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_FUNNELER_RT_FB, XR_BS_MOUTHFUNNEL_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_PRESSOR_L_FB, XR_BS_MOUTHPRESS_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_PRESSOR_R_FB, XR_BS_MOUTHPRESS_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_PUCKER_L_FB, XR_BS_MOUTHPUCKER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_PUCKER_R_FB, XR_BS_MOUTHPUCKER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_STRETCHER_L_FB, XR_BS_MOUTHSTRETCH_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_STRETCHER_R_FB, XR_BS_MOUTHSTRETCH_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_SUCK_LB_FB, XR_BS_MOUTHROLLLOWER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_SUCK_LT_FB, XR_BS_MOUTHROLLLOWER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_SUCK_RT_FB, XR_BS_MOUTHROLLUPPER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_SUCK_RB_FB, XR_BS_MOUTHROLLUPPER_PICO);
|
||||
// XR_FACE_EXPRESSION2_LIP_TIGHTENER_L_FB
|
||||
// XR_FACE_EXPRESSION2_LIP_TIGHTENER_R_FB
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIPS_TOWARD_FB, XR_BS_MOUTHCLOSE_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LOWER_LIP_DEPRESSOR_L_FB, XR_BS_MOUTHLOWERDOWN_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LOWER_LIP_DEPRESSOR_R_FB, XR_BS_MOUTHLOWERDOWN_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_MOUTH_LEFT_FB, XR_BS_MOUTHLEFT_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_MOUTH_RIGHT_FB, XR_BS_MOUTHRIGHT_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_NOSE_WRINKLER_L_FB, XR_BS_NOSESNEER_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_NOSE_WRINKLER_R_FB, XR_BS_NOSESNEER_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_OUTER_BROW_RAISER_L_FB, XR_BS_BROWOUTERUP_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_OUTER_BROW_RAISER_R_FB, XR_BS_BROWOUTERUP_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_UPPER_LID_RAISER_L_FB, XR_BS_EYEWIDE_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_UPPER_LID_RAISER_R_FB, XR_BS_EYEWIDE_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_UPPER_LIP_RAISER_L_FB, XR_BS_MOUTHUPPERUP_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_UPPER_LIP_RAISER_R_FB, XR_BS_MOUTHUPPERUP_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_TONGUE_OUT_FB, XR_BS_TONGUEOUT_PICO);
|
||||
// XR_FACE_EXPRESSION2_TONGUE_TIP_INTERDENTAL_FB
|
||||
// XR_FACE_EXPRESSION2_TONGUE_TIP_ALVEOLAR_FB
|
||||
// XR_FACE_EXPRESSION2_TONGUE_FRONT_DORSAL_PALATE_FB
|
||||
// XR_FACE_EXPRESSION2_TONGUE_MID_DORSAL_PALATE_FB
|
||||
// XR_FACE_EXPRESSION2_TONGUE_BACK_DORSAL_VELAR_FB
|
||||
// XR_FACE_EXPRESSION2_TONGUE_RETREAT_FB
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_UP_L_FB, XR_BS_EYELOOKUP_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_UP_R_FB, XR_BS_EYELOOKUP_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_INNER_BROW_RAISER_L_FB, XR_BS_BROWINNERUP_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_INNER_BROW_RAISER_R_FB, XR_BS_BROWINNERUP_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_JAW_DROP_FB, XR_BS_JAWOPEN_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_JAW_SIDEWAYS_LEFT_FB, XR_BS_JAWLEFT_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_JAW_SIDEWAYS_RIGHT_FB, XR_BS_JAWRIGHT_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_JAW_THRUST_FB, XR_BS_JAWFORWARD_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LID_TIGHTENER_L_FB, XR_BS_EYESQUINT_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LID_TIGHTENER_R_FB, XR_BS_EYESQUINT_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_CORNER_DEPRESSOR_L_FB, XR_BS_MOUTHFROWN_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_CORNER_DEPRESSOR_R_FB, XR_BS_MOUTHFROWN_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_CORNER_PULLER_L_FB, XR_BS_MOUTHSMILE_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_CORNER_PULLER_R_FB, XR_BS_MOUTHSMILE_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_FUNNELER_LB_FB, XR_BS_MOUTHFUNNEL_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_FUNNELER_LT_FB, XR_BS_MOUTHFUNNEL_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_FUNNELER_RB_FB, XR_BS_MOUTHFUNNEL_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_FUNNELER_RT_FB, XR_BS_MOUTHFUNNEL_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_PRESSOR_L_FB, XR_BS_MOUTHPRESS_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_PRESSOR_R_FB, XR_BS_MOUTHPRESS_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_PUCKER_L_FB, XR_BS_MOUTHPUCKER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_PUCKER_R_FB, XR_BS_MOUTHPUCKER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_STRETCHER_L_FB, XR_BS_MOUTHSTRETCH_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_STRETCHER_R_FB, XR_BS_MOUTHSTRETCH_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_SUCK_LB_FB, XR_BS_MOUTHROLLLOWER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_SUCK_LT_FB, XR_BS_MOUTHROLLLOWER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_SUCK_RT_FB, XR_BS_MOUTHROLLUPPER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_SUCK_RB_FB, XR_BS_MOUTHROLLUPPER_PICO);
|
||||
// XR_FACE_EXPRESSION2_LIP_TIGHTENER_L_FB
|
||||
// XR_FACE_EXPRESSION2_LIP_TIGHTENER_R_FB
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIPS_TOWARD_FB, XR_BS_MOUTHCLOSE_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LOWER_LIP_DEPRESSOR_L_FB, XR_BS_MOUTHLOWERDOWN_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LOWER_LIP_DEPRESSOR_R_FB, XR_BS_MOUTHLOWERDOWN_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_MOUTH_LEFT_FB, XR_BS_MOUTHLEFT_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_MOUTH_RIGHT_FB, XR_BS_MOUTHRIGHT_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_NOSE_WRINKLER_L_FB, XR_BS_NOSESNEER_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_NOSE_WRINKLER_R_FB, XR_BS_NOSESNEER_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_OUTER_BROW_RAISER_L_FB, XR_BS_BROWOUTERUP_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_OUTER_BROW_RAISER_R_FB, XR_BS_BROWOUTERUP_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_UPPER_LID_RAISER_L_FB, XR_BS_EYEWIDE_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_UPPER_LID_RAISER_R_FB, XR_BS_EYEWIDE_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_UPPER_LIP_RAISER_L_FB, XR_BS_MOUTHUPPERUP_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_UPPER_LIP_RAISER_R_FB, XR_BS_MOUTHUPPERUP_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_TONGUE_OUT_FB, XR_BS_TONGUEOUT_PICO);
|
||||
// XR_FACE_EXPRESSION2_TONGUE_TIP_INTERDENTAL_FB
|
||||
// XR_FACE_EXPRESSION2_TONGUE_TIP_ALVEOLAR_FB
|
||||
// XR_FACE_EXPRESSION2_TONGUE_FRONT_DORSAL_PALATE_FB
|
||||
// XR_FACE_EXPRESSION2_TONGUE_MID_DORSAL_PALATE_FB
|
||||
// XR_FACE_EXPRESSION2_TONGUE_BACK_DORSAL_VELAR_FB
|
||||
// XR_FACE_EXPRESSION2_TONGUE_RETREAT_FB
|
||||
|
||||
#undef MAP_EXPRESSION
|
||||
|
||||
out_expressions.is_valid = true;
|
||||
out_expressions.is_eye_following_blendshapes_valid = true;
|
||||
}
|
||||
};
|
||||
|
||||
xr::pico_face_tracker::pico_face_tracker(instance & inst, session & s)
|
||||
{
|
||||
// The API has a global start and stop method
|
||||
// use a shared handle so we can have independent objects
|
||||
// and start/stop accordingly
|
||||
static std::mutex mutex;
|
||||
std::unique_lock lock(mutex);
|
||||
static std::weak_ptr<impl> instance;
|
||||
if (auto shared = instance.lock())
|
||||
{
|
||||
i = std::move(shared);
|
||||
return;
|
||||
}
|
||||
i = std::make_unique<impl>(inst, s);
|
||||
instance = i;
|
||||
}
|
||||
|
||||
void xr::pico_face_tracker::get_weights(XrTime time, packet_type & out_expressions)
|
||||
{
|
||||
return i->get_weights(time, out_expressions);
|
||||
out_expressions.is_valid = true;
|
||||
out_expressions.is_eye_following_blendshapes_valid = true;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "wivrn_packets.h"
|
||||
#include "xr/pico_eye_types.h"
|
||||
#include "xr/pico_eye_types_reflection.h"
|
||||
#include <openxr/openxr.h>
|
||||
|
||||
namespace xr
|
||||
@@ -29,13 +31,22 @@ class session;
|
||||
|
||||
class pico_face_tracker
|
||||
{
|
||||
struct impl;
|
||||
std::shared_ptr<impl> i;
|
||||
PFN_xrStartEyeTrackingPICO xrStartEyeTrackingPICO{};
|
||||
PFN_xrStopEyeTrackingPICO xrStopEyeTrackingPICO{};
|
||||
PFN_xrSetTrackingModePICO xrSetTrackingModePICO{};
|
||||
PFN_xrGetFaceTrackingDataPICO xrGetFaceTrackingDataPICO{};
|
||||
|
||||
XrSession s;
|
||||
bool started{};
|
||||
|
||||
public:
|
||||
using packet_type = wivrn::from_headset::tracking::fb_face2;
|
||||
pico_face_tracker() = default;
|
||||
pico_face_tracker(instance & inst, session & s);
|
||||
~pico_face_tracker();
|
||||
|
||||
void start();
|
||||
void stop();
|
||||
void get_weights(XrTime time, packet_type & out_expressions);
|
||||
};
|
||||
} // namespace xr
|
||||
|
||||
@@ -19,19 +19,18 @@
|
||||
|
||||
#include "session.h"
|
||||
|
||||
#include "application.h"
|
||||
#include "details/enumerate.h"
|
||||
#include "openxr/openxr.h"
|
||||
#include "utils/contains.h"
|
||||
#include "xr/instance.h"
|
||||
#include "xr/system.h"
|
||||
#include "xr/to_string.h"
|
||||
#include <ranges>
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <openxr/openxr_platform.h>
|
||||
|
||||
xr::session::session(xr::instance & inst, xr::system & sys, vk::raii::Instance & vk_inst, vk::raii::PhysicalDevice & pdev, vk::raii::Device & dev, thread_safe<vk::raii::Queue> & queue, int queue_family_index) :
|
||||
inst(&inst),
|
||||
queue(&queue)
|
||||
xr::session::session(xr::instance & inst, xr::system & sys, vk::raii::Instance & vk_inst, vk::raii::PhysicalDevice & pdev, vk::raii::Device & dev, int queue_family_index) :
|
||||
inst(&inst)
|
||||
{
|
||||
XrGraphicsBindingVulkan2KHR vulkan_binding{
|
||||
.type = XR_TYPE_GRAPHICS_BINDING_VULKAN2_KHR,
|
||||
@@ -128,7 +127,7 @@ void xr::session::begin_frame()
|
||||
.type = XR_TYPE_FRAME_BEGIN_INFO,
|
||||
};
|
||||
|
||||
auto lock = queue->lock();
|
||||
auto lock = application::get_queue().lock();
|
||||
CHECK_XR(xrBeginFrame(id, &begin_info));
|
||||
}
|
||||
|
||||
@@ -142,7 +141,7 @@ void xr::session::end_frame(XrTime display_time, const std::vector<XrComposition
|
||||
.layers = layers.data(),
|
||||
};
|
||||
|
||||
auto lock = queue->lock();
|
||||
auto lock = application::get_queue().lock();
|
||||
CHECK_XR(xrEndFrame(id, &end_info));
|
||||
}
|
||||
|
||||
@@ -345,14 +344,14 @@ void xr::session::enable_passthrough(xr::system & system)
|
||||
if (not std::holds_alternative<std::monostate>(passthrough))
|
||||
return;
|
||||
|
||||
if (system.passthrough_supported() == xr::passthrough_type::none)
|
||||
if (system.passthrough_supported() == xr::system::passthrough_type::no_passthrough)
|
||||
return;
|
||||
|
||||
if (inst->has_extension(XR_FB_PASSTHROUGH_EXTENSION_NAME))
|
||||
if (utils::contains(application::get_xr_extensions(), XR_FB_PASSTHROUGH_EXTENSION_NAME))
|
||||
{
|
||||
passthrough.emplace<xr::passthrough_fb>(*inst, *this);
|
||||
}
|
||||
else if (inst->has_extension(XR_HTC_PASSTHROUGH_EXTENSION_NAME))
|
||||
else if (utils::contains(application::get_xr_extensions(), XR_HTC_PASSTHROUGH_EXTENSION_NAME))
|
||||
{
|
||||
passthrough.emplace<xr::passthrough_htc>(*inst, *this);
|
||||
}
|
||||
|
||||
+1
-3
@@ -20,7 +20,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "utils/handle.h"
|
||||
#include "utils/thread_safe.h"
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -40,11 +39,10 @@ class session : public utils::handle<XrSession, xrDestroySession>
|
||||
{
|
||||
instance * inst = nullptr;
|
||||
xr::passthrough passthrough;
|
||||
thread_safe<vk::raii::Queue> * queue = nullptr;
|
||||
|
||||
public:
|
||||
session() = default;
|
||||
session(instance &, system &, vk::raii::Instance &, vk::raii::PhysicalDevice &, vk::raii::Device &, thread_safe<vk::raii::Queue> & queue, int queue_family_index);
|
||||
session(instance &, system &, vk::raii::Instance &, vk::raii::PhysicalDevice &, vk::raii::Device &, int queue_family_index);
|
||||
|
||||
std::vector<XrReferenceSpaceType> get_reference_spaces() const;
|
||||
space create_reference_space(XrReferenceSpaceType ref, const XrPosef & pose = {{0, 0, 0, 1}, {0, 0, 0}});
|
||||
|
||||
+7
-28
@@ -19,14 +19,12 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
#include "body_tracker.h"
|
||||
#include "application.h"
|
||||
#include "details/enumerate.h"
|
||||
#include "face_tracker.h"
|
||||
#include "openxr/openxr.h"
|
||||
#include "utils/contains.h"
|
||||
#include "vk/check.h"
|
||||
#include "xr/check.h"
|
||||
#include "xr/instance.h"
|
||||
#include <cassert>
|
||||
#include <openxr/openxr_platform.h>
|
||||
|
||||
@@ -43,12 +41,6 @@ xr::system::system(xr::instance & inst, XrFormFactor formfactor)
|
||||
CHECK_XR(xrGetSystem(inst, &system_info, &id));
|
||||
|
||||
assert(id != XR_NULL_SYSTEM_ID);
|
||||
|
||||
if (inst.has_extension(XR_EXT_HAND_TRACKING_EXTENSION_NAME))
|
||||
hand_tracking_supported_ = hand_tracking_properties().supportsHandTracking;
|
||||
|
||||
body_tracker = xr::body_tracker_supported(inst, *this);
|
||||
face_tracker = xr::face_tracker_supported(inst, *this);
|
||||
}
|
||||
|
||||
XrGraphicsRequirementsVulkan2KHR xr::system::graphics_requirements() const
|
||||
@@ -203,15 +195,16 @@ XrSystemBodyTrackingPropertiesBD xr::system::bd_body_tracking_properties() const
|
||||
return body_tracking_prop;
|
||||
}
|
||||
|
||||
xr::passthrough_type xr::system::passthrough_supported() const
|
||||
xr::system::passthrough_type xr::system::passthrough_supported() const
|
||||
{
|
||||
if (utils::contains(environment_blend_modes(XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO), XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND))
|
||||
return passthrough_type::color;
|
||||
|
||||
if (inst->has_extension(XR_HTC_PASSTHROUGH_EXTENSION_NAME))
|
||||
const std::vector<std::string> & xr_extensions = application::get_xr_extensions();
|
||||
if (utils::contains(xr_extensions, XR_HTC_PASSTHROUGH_EXTENSION_NAME))
|
||||
return passthrough_type::color;
|
||||
|
||||
if (inst->has_extension(XR_FB_PASSTHROUGH_EXTENSION_NAME))
|
||||
if (utils::contains(xr_extensions, XR_FB_PASSTHROUGH_EXTENSION_NAME))
|
||||
{
|
||||
XrSystemPassthroughProperties2FB passthrough_prop2{
|
||||
.type = XR_TYPE_SYSTEM_PASSTHROUGH_PROPERTIES2_FB,
|
||||
@@ -231,7 +224,7 @@ xr::passthrough_type xr::system::passthrough_supported() const
|
||||
if (passthrough_prop.supportsPassthrough)
|
||||
{
|
||||
if (!(passthrough_prop2.capabilities & XR_PASSTHROUGH_CAPABILITY_BIT_FB))
|
||||
return passthrough_type::none;
|
||||
return passthrough_type::no_passthrough;
|
||||
|
||||
if (passthrough_prop2.capabilities & XR_PASSTHROUGH_CAPABILITY_COLOR_BIT_FB)
|
||||
return passthrough_type::color;
|
||||
@@ -240,21 +233,7 @@ xr::passthrough_type xr::system::passthrough_supported() const
|
||||
}
|
||||
}
|
||||
|
||||
return passthrough_type::none;
|
||||
}
|
||||
xr::face_tracker_type xr::system::face_tracker_supported() const
|
||||
{
|
||||
return face_tracker;
|
||||
}
|
||||
|
||||
xr::body_tracker_type xr::system::body_tracker_supported() const
|
||||
{
|
||||
return body_tracker;
|
||||
}
|
||||
|
||||
bool xr::system::hand_tracking_supported() const
|
||||
{
|
||||
return hand_tracking_supported_;
|
||||
return passthrough_type::no_passthrough;
|
||||
}
|
||||
|
||||
vk::raii::PhysicalDevice xr::system::physical_device(vk::raii::Instance & vulkan) const
|
||||
|
||||
+7
-31
@@ -32,39 +32,19 @@ namespace xr
|
||||
{
|
||||
class instance;
|
||||
|
||||
enum class passthrough_type
|
||||
{
|
||||
none,
|
||||
bw,
|
||||
color
|
||||
};
|
||||
|
||||
enum class body_tracker_type
|
||||
{
|
||||
none,
|
||||
fb,
|
||||
htc,
|
||||
pico,
|
||||
};
|
||||
|
||||
enum class face_tracker_type
|
||||
{
|
||||
none,
|
||||
fb,
|
||||
htc,
|
||||
pico,
|
||||
};
|
||||
|
||||
class system
|
||||
{
|
||||
instance * inst = nullptr;
|
||||
XrSystemId id = XR_NULL_SYSTEM_ID;
|
||||
bool hand_tracking_supported_ = false;
|
||||
passthrough_type passthrough;
|
||||
body_tracker_type body_tracker;
|
||||
face_tracker_type face_tracker;
|
||||
|
||||
public:
|
||||
enum class passthrough_type
|
||||
{
|
||||
no_passthrough,
|
||||
bw,
|
||||
color
|
||||
};
|
||||
|
||||
system() = default;
|
||||
system(const system &) = default;
|
||||
system & operator=(const system &) = default;
|
||||
@@ -87,11 +67,7 @@ public:
|
||||
XrSystemFacialTrackingPropertiesHTC htc_face_tracking_properties() const;
|
||||
XrSystemBodyTrackingPropertiesFB fb_body_tracking_properties() const;
|
||||
XrSystemBodyTrackingPropertiesBD bd_body_tracking_properties() const;
|
||||
|
||||
bool hand_tracking_supported() const;
|
||||
passthrough_type passthrough_supported() const;
|
||||
face_tracker_type face_tracker_supported() const;
|
||||
body_tracker_type body_tracker_supported() const;
|
||||
|
||||
XrGraphicsRequirementsVulkan2KHR graphics_requirements() const;
|
||||
vk::raii::PhysicalDevice physical_device(vk::raii::Instance & vulkan) const;
|
||||
|
||||
@@ -17,40 +17,13 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef VERT_SHADER
|
||||
#pragma once
|
||||
|
||||
#if VSR
|
||||
#extension GL_EXT_fragment_shading_rate: enable
|
||||
#endif
|
||||
|
||||
|
||||
layout (location = 0) in vec2 vPosition;
|
||||
layout (location = 1) in vec2 vUV;
|
||||
layout (location = 2) in int vShadingRate;
|
||||
|
||||
layout(location = 0) out vec2 outUV;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(vPosition, 0.0, 1.0);
|
||||
outUV = vUV;
|
||||
#if VSR
|
||||
gl_PrimitiveShadingRateEXT = vShadingRate;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FRAG_SHADER
|
||||
|
||||
layout(set = 0, binding = 0) uniform sampler2D texSampler;
|
||||
|
||||
layout(location = 0) in vec2 inUV;
|
||||
|
||||
layout(location = 0) out vec4 outColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
outColor = texture(texSampler, inUV).rgba;
|
||||
}
|
||||
|
||||
#endif
|
||||
#include "actionset.h"
|
||||
#include "error.h"
|
||||
#include "instance.h"
|
||||
#include "session.h"
|
||||
#include "swapchain.h"
|
||||
#include "system.h"
|
||||
#include "xr/check.h"
|
||||
#include "xr/to_string.h"
|
||||
@@ -0,0 +1,4 @@
|
||||
function(auto_option name description default)
|
||||
set(${name} ${default} CACHE STRING "${description}")
|
||||
set_property(CACHE ${name} PROPERTY STRINGS AUTO ON OFF)
|
||||
endfunction()
|
||||
@@ -13,7 +13,6 @@ execute_process(
|
||||
|
||||
if (GIT_DESC)
|
||||
string(STRIP ${GIT_DESC} GIT_DESC)
|
||||
string(REGEX REPLACE "^v([0-9])" "\\1" GIT_DESC ${GIT_DESC})
|
||||
message(STATUS "Setting version to ${GIT_DESC} from git")
|
||||
else()
|
||||
set(GIT_DESC v${CMAKE_PROJECT_VERSION})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if (WIVRN_USE_SYSTEM_BOOST)
|
||||
if (BOOST_FOUND)
|
||||
add_library(Boost::pfr ALIAS Boost::headers)
|
||||
elseif (WIVRN_BUILD_CLIENT)
|
||||
FetchContent_MakeAvailable(boost)
|
||||
@@ -7,7 +7,6 @@ else()
|
||||
endif()
|
||||
|
||||
if (GIT_DESC)
|
||||
string(REGEX REPLACE "^v([0-9])" "\\1" GIT_DESC ${GIT_DESC})
|
||||
configure_file(version.cpp.in version.cpp)
|
||||
else ()
|
||||
add_custom_target(wivrn-version ALL
|
||||
@@ -51,7 +50,7 @@ if (WIVRN_BUILD_DASHBOARD OR WIVRN_BUILD_SERVER)
|
||||
utils/ini.cpp
|
||||
application.cpp
|
||||
)
|
||||
target_link_libraries(wivrn-common-server PRIVATE nlohmann_json::nlohmann_json PNG::PNG PkgConfig::librsvg-2.0 LibArchive::LibArchive PUBLIC wivrn-common-base)
|
||||
target_link_libraries(wivrn-common-server PRIVATE nlohmann_json::nlohmann_json PNG::PNG PkgConfig::librsvg-2.0 PUBLIC wivrn-common-base)
|
||||
|
||||
if (WIVRN_BUILD_TEST)
|
||||
add_executable(list-apps
|
||||
|
||||
+40
-34
@@ -20,6 +20,7 @@
|
||||
#include "application.h"
|
||||
|
||||
#include "utils/flatpak.h"
|
||||
#include "utils/load_icon.h"
|
||||
#include "utils/steam_app_info.h"
|
||||
#include "utils/xdg_base_directory.h"
|
||||
#include "utils/xdg_icon_lookup.h"
|
||||
@@ -50,19 +51,20 @@ std::filesystem::path home()
|
||||
|
||||
std::pair<std::string, std::optional<std::filesystem::path>> find_steam()
|
||||
{
|
||||
auto h = home();
|
||||
// Flatpak Steam
|
||||
if (std::filesystem::exists(h / ".var/app/com.valvesoftware.Steam/.steam/steam"))
|
||||
return {"flatpak run com.valvesoftware.Steam", h / ".var/app/com.valvesoftware.Steam/.steam/steam"};
|
||||
|
||||
// system Steam
|
||||
if (std::filesystem::exists(xdg_data_home() / "Steam"))
|
||||
return {"steam", xdg_data_home() / "Steam"};
|
||||
|
||||
auto h = home();
|
||||
|
||||
// system Steam (accessed from flatpak)
|
||||
if (std::filesystem::exists(h / ".local/share/Steam"))
|
||||
return {"steam", h / ".local/share/Steam"};
|
||||
|
||||
// Flatpak Steam
|
||||
if (std::filesystem::exists(h / ".var/app/com.valvesoftware.Steam/.steam/steam"))
|
||||
return {"flatpak run com.valvesoftware.Steam", h / ".var/app/com.valvesoftware.Steam/.steam/steam"};
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -83,17 +85,17 @@ steam_app_info read_steam_app_info(const std::filesystem::path & root)
|
||||
return {};
|
||||
}
|
||||
|
||||
std::optional<std::filesystem::path> find_steam_icon(const std::filesystem::path & root, int app_id, const steam_app_info & info)
|
||||
std::vector<std::byte> load_steam_icon(const std::filesystem::path & root, int app_id, const steam_app_info & info)
|
||||
{
|
||||
const auto & app_info = info.get(app_id);
|
||||
|
||||
try
|
||||
{
|
||||
std::string icon{std::get<std::string_view>(app_info.at("common.clienticon"))};
|
||||
auto icon_path = root / "steam/games" / (icon + ".ico");
|
||||
|
||||
if (std::filesystem::exists(icon_path))
|
||||
return icon_path;
|
||||
auto image = load_icon(root / "steam/games" / (icon + ".ico"), 128);
|
||||
if (not image.empty())
|
||||
return image;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@@ -101,21 +103,20 @@ std::optional<std::filesystem::path> find_steam_icon(const std::filesystem::path
|
||||
|
||||
try
|
||||
{
|
||||
std::string icon{std::get<std::string_view>(app_info.at("common.linuxclienticon"))};
|
||||
std::string icon{std::get<std::string_view>(app_info.at("common.LinuxClientIcon"))};
|
||||
|
||||
auto icon_path = root / "steam/games" / (icon + ".zip");
|
||||
|
||||
if (std::filesystem::exists(icon_path))
|
||||
return icon_path;
|
||||
auto image = load_icon(root / "steam/games" / (icon + ".zip"), 128);
|
||||
if (not image.empty())
|
||||
return image;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
|
||||
return std::nullopt;
|
||||
return {};
|
||||
}
|
||||
|
||||
void read_steam_vr_apps(std::unordered_map<std::string, application> & res)
|
||||
void read_steam_vr_apps(std::unordered_map<std::string, application> & res, bool load_icons)
|
||||
{
|
||||
auto [command, root] = find_steam();
|
||||
if (not root)
|
||||
@@ -165,17 +166,20 @@ void read_steam_vr_apps(std::unordered_map<std::string, application> & res)
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
if (load_icons)
|
||||
{
|
||||
const char prefix[] = "steam.app.";
|
||||
if (app_key.starts_with(prefix))
|
||||
try
|
||||
{
|
||||
const char prefix[] = "steam.app.";
|
||||
if (app_key.starts_with(prefix))
|
||||
{
|
||||
uint32_t app_id = stoll(app_key.substr(strlen(prefix)));
|
||||
app.image = load_steam_icon(*root, app_id, info);
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
uint32_t app_id = stoll(app_key.substr(strlen(prefix)));
|
||||
app.icon_path = find_steam_icon(*root, app_id, info);
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
|
||||
if (not app.exec.empty())
|
||||
@@ -277,7 +281,7 @@ bool contains(std::string_view entries, std::string_view val, char sep = ';')
|
||||
return false;
|
||||
}
|
||||
|
||||
std::optional<application> do_desktop_entry(const std::filesystem::path & filename)
|
||||
std::optional<application> do_desktop_entry(const std::filesystem::path & filename, bool load_icons)
|
||||
{
|
||||
auto data = read_file(filename);
|
||||
std::optional<application> res;
|
||||
@@ -319,11 +323,12 @@ std::optional<application> do_desktop_entry(const std::filesystem::path & filena
|
||||
res->exec = unescape(item.value);
|
||||
if (item.key == "Path")
|
||||
res->path = unescape(item.value);
|
||||
if (item.key == "Icon")
|
||||
if (item.key == "Icon" and load_icons)
|
||||
{
|
||||
try
|
||||
{
|
||||
res->icon_path = xdg_icon_lookup(std::string{item.value}, 256);
|
||||
if (auto filename = xdg_icon_lookup(std::string{item.value}, 256))
|
||||
res->image = load_icon(*filename, 256);
|
||||
}
|
||||
catch (...)
|
||||
{}
|
||||
@@ -336,7 +341,7 @@ std::optional<application> do_desktop_entry(const std::filesystem::path & filena
|
||||
return res;
|
||||
}
|
||||
|
||||
void do_data_dir(std::filesystem::path dir, std::unordered_map<std::string, application> & res)
|
||||
void do_data_dir(std::filesystem::path dir, std::unordered_map<std::string, application> & res, bool load_icons)
|
||||
{
|
||||
dir = dir / "applications";
|
||||
if (not std::filesystem::is_directory(dir))
|
||||
@@ -359,28 +364,29 @@ void do_data_dir(std::filesystem::path dir, std::unordered_map<std::string, appl
|
||||
if (res.contains(file_id))
|
||||
continue;
|
||||
|
||||
auto app = do_desktop_entry(entry.path());
|
||||
auto app = do_desktop_entry(entry.path(), load_icons);
|
||||
if (app)
|
||||
res.emplace(std::move(file_id), std::move(*app));
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
std::unordered_map<std::string, application> list_applications()
|
||||
std::unordered_map<std::string, application> list_applications(bool include_steam, bool load_icons)
|
||||
{
|
||||
std::unordered_map<std::string, application> res;
|
||||
|
||||
read_steam_vr_apps(res);
|
||||
if (include_steam)
|
||||
read_steam_vr_apps(res, load_icons);
|
||||
|
||||
do_data_dir(xdg_data_home(), res);
|
||||
do_data_dir(xdg_data_home(), res, load_icons);
|
||||
|
||||
for (auto && dir: xdg_data_dirs())
|
||||
do_data_dir(std::move(dir), res);
|
||||
do_data_dir(std::move(dir), res, load_icons);
|
||||
|
||||
if (wivrn::is_flatpak())
|
||||
{
|
||||
// Try to guess host data dirs
|
||||
do_data_dir("/run/host/usr/share", res);
|
||||
do_data_dir("/run/host/usr/share", res, load_icons);
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
namespace wivrn
|
||||
{
|
||||
@@ -31,9 +31,9 @@ struct application
|
||||
// localised names, with empty locale for default
|
||||
std::unordered_map<std::string, std::string> name;
|
||||
std::string exec;
|
||||
std::optional<std::filesystem::path> icon_path;
|
||||
std::vector<std::byte> image; // In PNG
|
||||
std::optional<std::string> path;
|
||||
};
|
||||
|
||||
std::unordered_map<std::string, application> list_applications();
|
||||
std::unordered_map<std::string, application> list_applications(bool include_steam = true, bool load_icons = true);
|
||||
} // namespace wivrn
|
||||
|
||||
+192
-206
@@ -18,11 +18,10 @@
|
||||
|
||||
#include "load_icon.h"
|
||||
|
||||
#include <archive.h>
|
||||
#include <archive_entry.h>
|
||||
#include <cairo.h>
|
||||
#include <fstream>
|
||||
#include <librsvg/rsvg.h>
|
||||
#include <limits>
|
||||
#include <png.h>
|
||||
#include <span>
|
||||
#include <unordered_map>
|
||||
@@ -45,7 +44,7 @@ std::vector<std::byte> load_file(const std::filesystem::path & filename)
|
||||
|
||||
template <typename T>
|
||||
requires std::is_integral_v<T>
|
||||
T read(std::span<const std::byte> & buffer)
|
||||
T read(std::span<std::byte> & buffer)
|
||||
{
|
||||
if (sizeof(T) > buffer.size())
|
||||
throw std::runtime_error{"File truncated"};
|
||||
@@ -64,22 +63,27 @@ T read(std::span<const std::byte> & buffer)
|
||||
|
||||
template <typename T>
|
||||
requires std::is_integral_v<T>
|
||||
std::span<const T> read(std::span<const std::byte> & buffer, size_t count)
|
||||
std::span<T> read(std::span<std::byte> & buffer, size_t count)
|
||||
{
|
||||
if (count * sizeof(T) > buffer.size())
|
||||
throw std::runtime_error{"File truncated"};
|
||||
|
||||
std::span<const T> value{reinterpret_cast<const T *>(buffer.data()), count};
|
||||
std::span<T> value{reinterpret_cast<T *>(buffer.data()), count};
|
||||
buffer = buffer.subspan(count * sizeof(T));
|
||||
return value;
|
||||
}
|
||||
|
||||
std::vector<wivrn::icon> try_load_svg(const std::vector<std::byte> & data, int size)
|
||||
std::vector<std::byte> load_svg(const std::filesystem::path & filename, int size)
|
||||
{
|
||||
// TODO check if aspect ratio needs to be handled, dpi
|
||||
|
||||
struct deleter
|
||||
{
|
||||
void operator()(GFile * ptr)
|
||||
{
|
||||
g_object_unref(ptr);
|
||||
}
|
||||
|
||||
void operator()(RsvgHandle * ptr)
|
||||
{
|
||||
g_object_unref(ptr);
|
||||
@@ -96,15 +100,15 @@ std::vector<wivrn::icon> try_load_svg(const std::vector<std::byte> & data, int s
|
||||
}
|
||||
};
|
||||
|
||||
using GFile_ptr = std::unique_ptr<GFile, deleter>;
|
||||
using RsvgHandle_ptr = std::unique_ptr<RsvgHandle, deleter>;
|
||||
using cairo_surface_t_ptr = std::unique_ptr<cairo_surface_t, deleter>;
|
||||
using cairo_t_ptr = std::unique_ptr<cairo_t, deleter>;
|
||||
|
||||
GError * error{};
|
||||
GFile_ptr file{g_file_new_for_path(filename.c_str())};
|
||||
|
||||
RsvgHandle_ptr handle{rsvg_handle_new_from_data((guint8 *)data.data(), data.size(), &error)};
|
||||
if (!handle)
|
||||
throw std::runtime_error{std::string{"Could not open: "} + error->message};
|
||||
RsvgHandle_ptr handle{rsvg_handle_new_from_gfile_sync(file.get(), RSVG_HANDLE_FLAGS_NONE, nullptr, &error)};
|
||||
|
||||
// Create a Cairo image surface and a rendering context for it
|
||||
cairo_surface_t_ptr surface{cairo_image_surface_create(CAIRO_FORMAT_ARGB32, size, size)};
|
||||
@@ -122,7 +126,10 @@ std::vector<wivrn::icon> try_load_svg(const std::vector<std::byte> & data, int s
|
||||
};
|
||||
|
||||
if (!rsvg_handle_render_document(handle.get(), cr.get(), &viewport, &error))
|
||||
throw std::runtime_error{std::string{"Could not render: "} + error->message};
|
||||
{
|
||||
g_printerr("could not render: %s", error->message);
|
||||
return {};
|
||||
}
|
||||
|
||||
// Write a PNG file
|
||||
std::vector<std::byte> png;
|
||||
@@ -136,83 +143,154 @@ std::vector<wivrn::icon> try_load_svg(const std::vector<std::byte> & data, int s
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
};
|
||||
|
||||
if (auto status = cairo_surface_write_to_png_stream(surface.get(), cb, &png); status != CAIRO_STATUS_SUCCESS)
|
||||
throw std::runtime_error{std::string{"Could not write output: "} + cairo_status_to_string(status)};
|
||||
if (cairo_surface_write_to_png_stream(surface.get(), cb, &png) != CAIRO_STATUS_SUCCESS)
|
||||
{
|
||||
g_printerr("could not write output file");
|
||||
return {};
|
||||
}
|
||||
|
||||
return {{size, size, 32, std::move(png)}};
|
||||
return png;
|
||||
}
|
||||
|
||||
std::vector<wivrn::icon> try_load_ico(const std::vector<std::byte> & ico)
|
||||
// See https://gitlab.gnome.org/GNOME/gimp/-/tree/master/plug-ins/file-ico?ref_type=heads
|
||||
|
||||
struct ico_file_entry
|
||||
{
|
||||
int width; // Width of icon in pixels
|
||||
int height; // Height of icon in pixels
|
||||
int bpp; // 1, 4, 8, 16, 24 or 32 bits per pixel
|
||||
std::span<std::byte> data;
|
||||
};
|
||||
|
||||
constexpr int rowstride(int width, int bpp)
|
||||
{
|
||||
int words_per_line = (width * bpp + 31) / 32;
|
||||
return words_per_line * 4;
|
||||
}
|
||||
static_assert(rowstride(1, 1) == 4);
|
||||
static_assert(rowstride(8, 1) == 4);
|
||||
static_assert(rowstride(16, 1) == 4);
|
||||
static_assert(rowstride(32, 1) == 4);
|
||||
static_assert(rowstride(33, 1) == 8);
|
||||
|
||||
static_assert(rowstride(1, 4) == 4);
|
||||
static_assert(rowstride(8, 4) == 4);
|
||||
static_assert(rowstride(16, 4) == 8);
|
||||
static_assert(rowstride(32, 4) == 16);
|
||||
static_assert(rowstride(33, 4) == 20);
|
||||
|
||||
static_assert(rowstride(1, 8) == 4);
|
||||
static_assert(rowstride(8, 8) == 8);
|
||||
static_assert(rowstride(16, 8) == 16);
|
||||
static_assert(rowstride(32, 8) == 32);
|
||||
static_assert(rowstride(33, 8) == 36);
|
||||
|
||||
static_assert(rowstride(1, 24) == 4);
|
||||
static_assert(rowstride(8, 24) == 24);
|
||||
static_assert(rowstride(16, 24) == 48);
|
||||
static_assert(rowstride(32, 24) == 96);
|
||||
static_assert(rowstride(33, 24) == 100);
|
||||
|
||||
static_assert(rowstride(1, 32) == 4);
|
||||
static_assert(rowstride(8, 32) == 32);
|
||||
static_assert(rowstride(16, 32) == 64);
|
||||
static_assert(rowstride(32, 32) == 128);
|
||||
static_assert(rowstride(33, 32) == 132);
|
||||
|
||||
std::vector<std::byte> load_ico(const std::filesystem::path & filename, int size, int index = -1)
|
||||
{
|
||||
const uint32_t ICO_PNG_MAGIC = 0x474e5089;
|
||||
|
||||
// See https://gitlab.gnome.org/GNOME/gimp/-/tree/master/plug-ins/file-ico?ref_type=heads
|
||||
auto rowstride = [](int width, int bpp) {
|
||||
int words_per_line = (width * bpp + 31) / 32;
|
||||
return words_per_line * 4;
|
||||
};
|
||||
|
||||
static_assert(rowstride(1, 1) == 4);
|
||||
static_assert(rowstride(8, 1) == 4);
|
||||
static_assert(rowstride(16, 1) == 4);
|
||||
static_assert(rowstride(32, 1) == 4);
|
||||
static_assert(rowstride(33, 1) == 8);
|
||||
|
||||
static_assert(rowstride(1, 4) == 4);
|
||||
static_assert(rowstride(8, 4) == 4);
|
||||
static_assert(rowstride(16, 4) == 8);
|
||||
static_assert(rowstride(32, 4) == 16);
|
||||
static_assert(rowstride(33, 4) == 20);
|
||||
|
||||
static_assert(rowstride(1, 8) == 4);
|
||||
static_assert(rowstride(8, 8) == 8);
|
||||
static_assert(rowstride(16, 8) == 16);
|
||||
static_assert(rowstride(32, 8) == 32);
|
||||
static_assert(rowstride(33, 8) == 36);
|
||||
|
||||
static_assert(rowstride(1, 24) == 4);
|
||||
static_assert(rowstride(8, 24) == 24);
|
||||
static_assert(rowstride(16, 24) == 48);
|
||||
static_assert(rowstride(32, 24) == 96);
|
||||
static_assert(rowstride(33, 24) == 100);
|
||||
|
||||
static_assert(rowstride(1, 32) == 4);
|
||||
static_assert(rowstride(8, 32) == 32);
|
||||
static_assert(rowstride(16, 32) == 64);
|
||||
static_assert(rowstride(32, 32) == 128);
|
||||
static_assert(rowstride(33, 32) == 132);
|
||||
|
||||
std::span header{ico};
|
||||
|
||||
auto reserved = read<uint16_t>(header);
|
||||
auto resource_type = read<uint16_t>(header);
|
||||
auto icon_count = read<uint16_t>(header);
|
||||
|
||||
if (reserved != 0 or resource_type != 1)
|
||||
throw std::runtime_error{"Cannot read icon"};
|
||||
|
||||
std::vector<wivrn::icon> icons;
|
||||
|
||||
for (int i = 0; i < icon_count; i++)
|
||||
try
|
||||
{
|
||||
auto width = read<uint8_t>(header);
|
||||
auto height = read<uint8_t>(header);
|
||||
auto num_colors = read<uint8_t>(header);
|
||||
auto reserved = read<uint8_t>(header); // reserved
|
||||
auto planes = read<uint16_t>(header);
|
||||
auto bpp = read<uint16_t>(header);
|
||||
auto size = read<uint32_t>(header);
|
||||
auto offset = read<uint32_t>(header);
|
||||
auto ico = load_file(filename);
|
||||
|
||||
if (offset + size > ico.size())
|
||||
throw std::runtime_error{"Cannot read icon"};
|
||||
std::span header{ico};
|
||||
|
||||
auto data = std::span{ico}.subspan(offset, size);
|
||||
if (reserved != 0)
|
||||
throw std::runtime_error{"Cannot read icon"};
|
||||
if (planes != 0 and planes != 1)
|
||||
throw std::runtime_error{"Cannot read icon"};
|
||||
auto reserved = read<uint16_t>(header);
|
||||
auto resource_type = read<uint16_t>(header);
|
||||
auto icon_count = read<uint16_t>(header);
|
||||
|
||||
if (reserved != 0 or resource_type != 1)
|
||||
return {};
|
||||
|
||||
std::vector<ico_file_entry> entries;
|
||||
int max_bpp = 0;
|
||||
|
||||
for (int i = 0; i < icon_count; i++)
|
||||
{
|
||||
ico_file_entry entry;
|
||||
entry.width = read<uint8_t>(header);
|
||||
entry.height = read<uint8_t>(header);
|
||||
auto num_colors = read<uint8_t>(header);
|
||||
auto reserved = read<uint8_t>(header); // reserved
|
||||
auto planes = read<uint16_t>(header);
|
||||
entry.bpp = read<uint16_t>(header);
|
||||
auto size = read<uint32_t>(header);
|
||||
auto offset = read<uint32_t>(header);
|
||||
|
||||
if (offset + size > ico.size())
|
||||
return {};
|
||||
|
||||
entry.data = std::span{ico}.subspan(offset, size);
|
||||
if (entry.width == 0)
|
||||
entry.width = 256;
|
||||
if (entry.height == 0)
|
||||
entry.height = 256;
|
||||
if (reserved != 0)
|
||||
return {};
|
||||
if (planes != 0 and planes != 1)
|
||||
return {};
|
||||
|
||||
entries.push_back(entry);
|
||||
|
||||
max_bpp = std::max(max_bpp, entry.bpp);
|
||||
}
|
||||
|
||||
const ico_file_entry * best_entry = index >= 0 ? &entries.at(index) : [&]() {
|
||||
const ico_file_entry * best_entry = nullptr;
|
||||
|
||||
// Look for the smallest multiple of the requested size
|
||||
int criterion = std::numeric_limits<int>::max();
|
||||
|
||||
for (const auto & entry: entries)
|
||||
{
|
||||
if (entry.bpp != max_bpp)
|
||||
continue;
|
||||
|
||||
if (entry.width % size != 0 or entry.height % size != 0)
|
||||
continue;
|
||||
|
||||
if (std::min(entry.width, entry.height) / size < criterion)
|
||||
{
|
||||
criterion = std::min(entry.width, entry.height);
|
||||
best_entry = &entry;
|
||||
}
|
||||
}
|
||||
if (best_entry)
|
||||
return best_entry;
|
||||
|
||||
// No multiple found: pick the largest icon
|
||||
criterion = 0;
|
||||
|
||||
for (const auto & entry: entries)
|
||||
{
|
||||
if (entry.bpp != max_bpp)
|
||||
continue;
|
||||
|
||||
if (entry.width * entry.height > criterion)
|
||||
{
|
||||
criterion = entry.width * entry.height;
|
||||
best_entry = &entry;
|
||||
}
|
||||
}
|
||||
return best_entry;
|
||||
}();
|
||||
|
||||
if (not best_entry)
|
||||
return {};
|
||||
|
||||
auto data = best_entry->data;
|
||||
auto magic = read<uint32_t>(data);
|
||||
|
||||
if (magic == ICO_PNG_MAGIC)
|
||||
@@ -230,21 +308,18 @@ std::vector<wivrn::icon> try_load_ico(const std::vector<std::byte> & ico)
|
||||
.format = PNG_FORMAT_BGRA,
|
||||
};
|
||||
if (not png_image_begin_read_from_memory(&png_ref, png_data.data(), png_data.size()))
|
||||
continue;
|
||||
// throw std::runtime_error{"Cannot read icon: " + filename.native()};
|
||||
return {};
|
||||
|
||||
pixels.resize(PNG_IMAGE_SIZE(png_ref));
|
||||
|
||||
if (!png_image_finish_read(&png_ref, nullptr, pixels.data(), 0, nullptr))
|
||||
{
|
||||
png_image_free(&png_ref);
|
||||
continue;
|
||||
// throw std::runtime_error{"Cannot read icon: " + filename.native()};
|
||||
return {};
|
||||
}
|
||||
|
||||
// TODO: get bit depth from PNG instead of trusting the ico header
|
||||
icons.emplace_back(png_ref.width, png_ref.height, bpp, std::move(png_data));
|
||||
png_image_free(&png_ref);
|
||||
|
||||
return png_data;
|
||||
}
|
||||
else if (magic == 40)
|
||||
{
|
||||
@@ -273,7 +348,7 @@ std::vector<wivrn::icon> try_load_ico(const std::vector<std::byte> & ico)
|
||||
auto w = width;
|
||||
auto h = height / 2;
|
||||
|
||||
std::span<const uint8_t> palette; // BGRX
|
||||
std::span<uint8_t> palette; // BGRX
|
||||
|
||||
if (bpp <= 16)
|
||||
{
|
||||
@@ -288,8 +363,8 @@ std::vector<wivrn::icon> try_load_ico(const std::vector<std::byte> & ico)
|
||||
size_t and_stride = rowstride(w, 1);
|
||||
size_t dst_stride = 4 * w;
|
||||
|
||||
std::span xor_map = read<uint8_t>(data, xor_stride * h);
|
||||
std::span and_map = read<uint8_t>(data, and_stride * h);
|
||||
std::span<uint8_t> xor_map = read<uint8_t>(data, xor_stride * h);
|
||||
std::span<uint8_t> and_map = read<uint8_t>(data, and_stride * h);
|
||||
|
||||
std::vector<uint8_t> dest_buffer;
|
||||
dest_buffer.resize(h * dst_stride);
|
||||
@@ -299,8 +374,8 @@ std::vector<wivrn::icon> try_load_ico(const std::vector<std::byte> & ico)
|
||||
case 1:
|
||||
for (int y = 0; y < h; y++)
|
||||
{
|
||||
const uint8_t * src_xor_row = xor_map.data() + xor_stride * y;
|
||||
const uint8_t * src_and_row = and_map.data() + and_stride * y;
|
||||
uint8_t * src_xor_row = xor_map.data() + xor_stride * y;
|
||||
uint8_t * src_and_row = and_map.data() + and_stride * y;
|
||||
uint8_t * dst_row = dest_buffer.data() + dst_stride * (h - 1 - y);
|
||||
|
||||
for (int x = 0, i = 0; x < w; x++)
|
||||
@@ -327,8 +402,8 @@ std::vector<wivrn::icon> try_load_ico(const std::vector<std::byte> & ico)
|
||||
case 4:
|
||||
for (int y = 0; y < h; y++)
|
||||
{
|
||||
const uint8_t * src_xor_row = xor_map.data() + xor_stride * y;
|
||||
const uint8_t * src_and_row = and_map.data() + and_stride * y;
|
||||
uint8_t * src_xor_row = xor_map.data() + xor_stride * y;
|
||||
uint8_t * src_and_row = and_map.data() + and_stride * y;
|
||||
uint8_t * dst_row = dest_buffer.data() + dst_stride * (h - 1 - y);
|
||||
|
||||
for (int x = 0, i = 0; x < w; x++)
|
||||
@@ -355,8 +430,8 @@ std::vector<wivrn::icon> try_load_ico(const std::vector<std::byte> & ico)
|
||||
case 8:
|
||||
for (int y = 0; y < h; y++)
|
||||
{
|
||||
const uint8_t * src_xor_row = xor_map.data() + xor_stride * y;
|
||||
const uint8_t * src_and_row = and_map.data() + and_stride * y;
|
||||
uint8_t * src_xor_row = xor_map.data() + xor_stride * y;
|
||||
uint8_t * src_and_row = and_map.data() + and_stride * y;
|
||||
uint8_t * dst_row = dest_buffer.data() + dst_stride * (h - 1 - y);
|
||||
|
||||
for (int x = 0, i = 0; x < w; x++)
|
||||
@@ -383,8 +458,8 @@ std::vector<wivrn::icon> try_load_ico(const std::vector<std::byte> & ico)
|
||||
case 16:
|
||||
for (int y = 0; y < h; y++)
|
||||
{
|
||||
const uint8_t * src_xor_row = xor_map.data() + xor_stride * y;
|
||||
const uint8_t * src_and_row = and_map.data() + and_stride * y;
|
||||
uint8_t * src_xor_row = xor_map.data() + xor_stride * y;
|
||||
uint8_t * src_and_row = and_map.data() + and_stride * y;
|
||||
uint8_t * dst_row = dest_buffer.data() + dst_stride * (h - 1 - y);
|
||||
|
||||
for (int x = 0, i = 0; x < w; x++)
|
||||
@@ -413,8 +488,8 @@ std::vector<wivrn::icon> try_load_ico(const std::vector<std::byte> & ico)
|
||||
case 24:
|
||||
for (int y = 0; y < h; y++)
|
||||
{
|
||||
const uint8_t * src_xor_row = xor_map.data() + xor_stride * y;
|
||||
const uint8_t * src_and_row = and_map.data() + and_stride * y;
|
||||
uint8_t * src_xor_row = xor_map.data() + xor_stride * y;
|
||||
uint8_t * src_and_row = and_map.data() + and_stride * y;
|
||||
uint8_t * dst_row = dest_buffer.data() + dst_stride * (h - 1 - y);
|
||||
|
||||
for (int x = 0, i = 0; x < w; x++)
|
||||
@@ -437,7 +512,7 @@ std::vector<wivrn::icon> try_load_ico(const std::vector<std::byte> & ico)
|
||||
case 32:
|
||||
for (int y = 0; y < h; y++)
|
||||
{
|
||||
const uint8_t * src_xor_row = xor_map.data() + xor_stride * y;
|
||||
uint8_t * src_xor_row = (uint8_t *)xor_map.data() + xor_stride * y;
|
||||
uint8_t * dst_row = dest_buffer.data() + dst_stride * (h - 1 - y);
|
||||
|
||||
memcpy(dst_row, src_xor_row, dst_stride);
|
||||
@@ -464,136 +539,47 @@ std::vector<wivrn::icon> try_load_ico(const std::vector<std::byte> & ico)
|
||||
else
|
||||
png_data.resize(png_size);
|
||||
|
||||
icons.emplace_back(w, h, bpp, std::move(png_data));
|
||||
return png_data;
|
||||
}
|
||||
}
|
||||
|
||||
return icons;
|
||||
}
|
||||
|
||||
std::vector<wivrn::icon> try_load_zip(const std::vector<std::byte> & data)
|
||||
{
|
||||
std::unique_ptr<archive, decltype(&archive_read_free)> zip{archive_read_new(), &archive_read_free};
|
||||
|
||||
archive_read_support_filter_all(zip.get());
|
||||
archive_read_support_format_all(zip.get());
|
||||
|
||||
if (auto rc = archive_read_open_memory(zip.get(), data.data(), data.size()); rc != ARCHIVE_OK)
|
||||
throw std::runtime_error{std::string("Cannot open ZIP: ") + archive_error_string(zip.get())};
|
||||
|
||||
archive_entry * entry;
|
||||
std::vector<wivrn::icon> icons;
|
||||
|
||||
while (archive_read_next_header(zip.get(), &entry) == ARCHIVE_OK)
|
||||
catch (std::exception & e)
|
||||
{
|
||||
std::vector<std::byte> buffer;
|
||||
buffer.resize(archive_entry_size(entry));
|
||||
|
||||
if (auto status = archive_read_data(zip.get(), buffer.data(), buffer.size()); status < 0)
|
||||
continue;
|
||||
|
||||
// Try reading the PNG
|
||||
std::vector<uint8_t> pixels;
|
||||
png_image png_ref{
|
||||
.version = PNG_IMAGE_VERSION,
|
||||
.format = PNG_FORMAT_BGRA,
|
||||
};
|
||||
|
||||
if (not png_image_begin_read_from_memory(&png_ref, buffer.data(), buffer.size()))
|
||||
{
|
||||
png_image_free(&png_ref);
|
||||
continue;
|
||||
}
|
||||
|
||||
pixels.resize(PNG_IMAGE_SIZE(png_ref));
|
||||
|
||||
if (!png_image_finish_read(&png_ref, nullptr, pixels.data(), 0, nullptr))
|
||||
{
|
||||
png_image_free(&png_ref);
|
||||
continue;
|
||||
}
|
||||
|
||||
// PNG read successfully
|
||||
icons.emplace_back(png_ref.width, png_ref.height, 32, std::move(buffer)); // TODO: check how to get bit depth
|
||||
|
||||
png_image_free(&png_ref);
|
||||
}
|
||||
|
||||
return icons;
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<wivrn::icon> try_load_png(const std::vector<std::byte> & png_data)
|
||||
{
|
||||
std::vector<wivrn::icon> icons;
|
||||
|
||||
// Try reading the PNG
|
||||
std::vector<uint8_t> pixels;
|
||||
png_image png_ref{
|
||||
.version = PNG_IMAGE_VERSION,
|
||||
.format = PNG_FORMAT_BGRA,
|
||||
};
|
||||
|
||||
if (not png_image_begin_read_from_memory(&png_ref, png_data.data(), png_data.size()))
|
||||
{
|
||||
png_image_free(&png_ref);
|
||||
throw std::runtime_error("");
|
||||
}
|
||||
|
||||
pixels.resize(PNG_IMAGE_SIZE(png_ref));
|
||||
|
||||
if (!png_image_finish_read(&png_ref, nullptr, pixels.data(), 0, nullptr))
|
||||
{
|
||||
png_image_free(&png_ref);
|
||||
throw std::runtime_error("");
|
||||
}
|
||||
|
||||
// PNG read successfully
|
||||
icons.emplace_back(png_ref.width, png_ref.height, 32, std::move(png_data)); // TODO: check how to get bit depth
|
||||
|
||||
png_image_free(&png_ref);
|
||||
|
||||
return icons;
|
||||
}
|
||||
|
||||
std::unordered_map<std::filesystem::path, std::vector<wivrn::icon>> icon_cache;
|
||||
std::unordered_map<std::filesystem::path, std::vector<std::byte>> icon_cache;
|
||||
|
||||
} // namespace
|
||||
|
||||
const std::vector<wivrn::icon> & wivrn::load_icon(const std::filesystem::path & filename)
|
||||
const std::vector<std::byte> & wivrn::load_icon(const std::filesystem::path & filename, int size)
|
||||
{
|
||||
auto it = icon_cache.find(filename);
|
||||
if (it != icon_cache.end() and not it->second.empty())
|
||||
if (it != icon_cache.end())
|
||||
return it->second;
|
||||
|
||||
auto data = load_file(filename);
|
||||
std::vector<std::byte> icon;
|
||||
|
||||
try
|
||||
if (filename.extension() == ".svg")
|
||||
{
|
||||
return icon_cache.emplace(filename, try_load_svg(data, 256)).first->second;
|
||||
icon = load_svg(filename, size);
|
||||
}
|
||||
catch (...)
|
||||
{}
|
||||
|
||||
try
|
||||
else if (filename.extension() == ".ico")
|
||||
{
|
||||
return icon_cache.emplace(filename, try_load_ico(data)).first->second;
|
||||
// Steam icon (Windows)
|
||||
icon = load_ico(filename, size);
|
||||
}
|
||||
catch (...)
|
||||
{}
|
||||
|
||||
try
|
||||
else if (filename.extension() == ".zip")
|
||||
{
|
||||
return icon_cache.emplace(filename, try_load_zip(data)).first->second;
|
||||
// Steam icon (Linux)
|
||||
// TODO
|
||||
}
|
||||
catch (...)
|
||||
{}
|
||||
|
||||
try
|
||||
else
|
||||
{
|
||||
return icon_cache.emplace(filename, try_load_png(data)).first->second;
|
||||
// TODO read arbitrary format / rewrite as png
|
||||
icon = load_file(filename);
|
||||
}
|
||||
catch (...)
|
||||
{}
|
||||
|
||||
throw std::runtime_error{"Cannot load icon: " + filename.native()};
|
||||
return icon_cache.emplace(filename, std::move(icon)).first->second;
|
||||
}
|
||||
|
||||
@@ -23,13 +23,5 @@
|
||||
|
||||
namespace wivrn
|
||||
{
|
||||
struct icon
|
||||
{
|
||||
int width;
|
||||
int height;
|
||||
int bpp;
|
||||
std::vector<std::byte> png_data;
|
||||
};
|
||||
|
||||
const std::vector<icon> & load_icon(const std::filesystem::path & filename);
|
||||
} // namespace wivrn
|
||||
const std::vector<std::byte> & load_icon(const std::filesystem::path & filename, int size);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
#include "steam_app_info.h"
|
||||
#include <bit>
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
#include <span>
|
||||
@@ -90,8 +89,6 @@ void read_vdf(wivrn::steam_app_info::info & info, const std::string & prefix, st
|
||||
while (type != 8)
|
||||
{
|
||||
std::string name{string_table.at(read<uint32_t>(bindata))};
|
||||
for (char & c: name)
|
||||
c = std::tolower(c);
|
||||
|
||||
// https://github.com/ValveResourceFormat/ValveKeyValue/blob/master/ValveKeyValue/ValveKeyValue/KeyValues1/KV1BinaryNodeType.cs
|
||||
switch (type)
|
||||
|
||||
@@ -131,12 +131,6 @@ public:
|
||||
std::tie(resource, allocation) = traits::create(device, create_info, alloc_info);
|
||||
|
||||
vmaSetAllocationName(vk_allocator::instance(), allocation, name.c_str());
|
||||
if (vk_allocator::instance().has_debug_utils)
|
||||
device.setDebugUtilsObjectNameEXT(vk::DebugUtilsObjectNameInfoEXT{
|
||||
.objectType = T::objectType,
|
||||
.objectHandle = uint64_t(CType(*resource)),
|
||||
.pObjectName = name.c_str(),
|
||||
});
|
||||
}
|
||||
|
||||
basic_allocation(const basic_allocation &) = delete;
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
/*
|
||||
* WiVRn VR streaming
|
||||
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <tuple>
|
||||
#include <vulkan/vulkan.hpp>
|
||||
|
||||
template <typename... Args>
|
||||
class specialization_constants
|
||||
{
|
||||
std::tuple<Args...> values;
|
||||
std::array<vk::SpecializationMapEntry, sizeof...(Args)> entries;
|
||||
vk::SpecializationInfo info_;
|
||||
|
||||
specialization_constants(specialization_constants &&) = delete;
|
||||
specialization_constants(const specialization_constants &) = delete;
|
||||
specialization_constants & operator=(const specialization_constants &) = delete;
|
||||
specialization_constants & operator=(specialization_constants &&) = delete;
|
||||
|
||||
template <uint32_t i = sizeof...(Args) - 1>
|
||||
void fill_entries()
|
||||
{
|
||||
entries[i] = vk::SpecializationMapEntry{
|
||||
.constantID = i,
|
||||
.offset = uint32_t(uintptr_t(std::addressof(std::get<i>(values))) - uintptr_t(std::addressof(values))),
|
||||
.size = sizeof(std::get<i>(values)),
|
||||
};
|
||||
if constexpr (i > 0)
|
||||
fill_entries<i - 1>();
|
||||
}
|
||||
|
||||
public:
|
||||
specialization_constants(Args &&... args) :
|
||||
values(std::forward<Args>(args)...),
|
||||
info_{
|
||||
.mapEntryCount = uint32_t(entries.size()),
|
||||
.pMapEntries = entries.data(),
|
||||
.dataSize = sizeof(values),
|
||||
.pData = &values,
|
||||
}
|
||||
{
|
||||
fill_entries();
|
||||
}
|
||||
|
||||
operator vk::SpecializationInfo *()
|
||||
{
|
||||
return &info_;
|
||||
}
|
||||
|
||||
vk::SpecializationInfo * info()
|
||||
{
|
||||
return &info_;
|
||||
}
|
||||
|
||||
template <uint32_t i>
|
||||
auto & data()
|
||||
{
|
||||
return std::get<i>(values);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename... Args>
|
||||
specialization_constants<Args...> make_specialization_constants(Args &&... args)
|
||||
{
|
||||
return specialization_constants<Args...>(std::forward<Args>(args)...);
|
||||
}
|
||||
@@ -20,8 +20,7 @@
|
||||
#include "vk_allocator.h"
|
||||
#include "vk/check.h"
|
||||
|
||||
vk_allocator::vk_allocator(const VmaAllocatorCreateInfo & info, bool has_debug_utils) :
|
||||
has_debug_utils(has_debug_utils)
|
||||
vk_allocator::vk_allocator(const VmaAllocatorCreateInfo & info)
|
||||
{
|
||||
CHECK_VK(vmaCreateAllocator(&info, &handle));
|
||||
}
|
||||
|
||||
@@ -27,8 +27,7 @@ class vk_allocator : public singleton<vk_allocator>
|
||||
VmaAllocator handle = nullptr;
|
||||
|
||||
public:
|
||||
const bool has_debug_utils;
|
||||
vk_allocator(const VmaAllocatorCreateInfo &, bool has_debug_utils);
|
||||
vk_allocator(const VmaAllocatorCreateInfo &);
|
||||
~vk_allocator();
|
||||
|
||||
operator VmaAllocator()
|
||||
|
||||
+3
-14
@@ -41,7 +41,7 @@ namespace wivrn
|
||||
// Default port for server to listen, both TCP and UDP
|
||||
static const int default_port = 9757;
|
||||
|
||||
static constexpr int protocol_revision = 1;
|
||||
static constexpr int protocol_revision = 2;
|
||||
|
||||
enum class device_id : uint8_t
|
||||
{
|
||||
@@ -239,11 +239,6 @@ struct headset_info_packet
|
||||
uint32_t num_generic_trackers;
|
||||
std::vector<video_codec> supported_codecs; // from preferred to least preferred
|
||||
std::string system_name;
|
||||
|
||||
// Used for the application list
|
||||
std::string language;
|
||||
std::string country;
|
||||
std::string variant;
|
||||
};
|
||||
|
||||
struct handshake
|
||||
@@ -680,16 +675,11 @@ struct application_list
|
||||
{
|
||||
std::string id;
|
||||
std::string name;
|
||||
std::vector<std::byte> image; // In PNG
|
||||
};
|
||||
std::vector<application> applications;
|
||||
};
|
||||
|
||||
struct application_icon
|
||||
{
|
||||
std::string id;
|
||||
std::vector<std::byte> image; // In PNG
|
||||
};
|
||||
|
||||
using packets = std::variant<
|
||||
crypto_handshake,
|
||||
pin_check_2,
|
||||
@@ -703,7 +693,6 @@ using packets = std::variant<
|
||||
timesync_query,
|
||||
tracking_control,
|
||||
refresh_rate_change,
|
||||
application_list,
|
||||
application_icon>;
|
||||
application_list>;
|
||||
} // namespace to_headset
|
||||
} // namespace wivrn
|
||||
|
||||
@@ -69,9 +69,10 @@ wivrn::fd_base::~fd_base()
|
||||
wivrn::UDP::UDP()
|
||||
{
|
||||
fd = socket(AF_INET6, SOCK_DGRAM, 0);
|
||||
fcntl(fd, F_SETFD, FD_CLOEXEC);
|
||||
|
||||
if (fd < 0)
|
||||
throw std::system_error{errno, std::generic_category()};
|
||||
fcntl(fd, F_SETFD, FD_CLOEXEC);
|
||||
}
|
||||
|
||||
wivrn::UDP::UDP(int fd)
|
||||
@@ -176,9 +177,10 @@ wivrn::TCP::TCP(int fd)
|
||||
wivrn::TCP::TCP(in6_addr address, int port)
|
||||
{
|
||||
fd = socket(AF_INET6, SOCK_STREAM, 0);
|
||||
fcntl(fd, F_SETFD, FD_CLOEXEC);
|
||||
|
||||
if (fd < 0)
|
||||
throw std::system_error{errno, std::generic_category()};
|
||||
fcntl(fd, F_SETFD, FD_CLOEXEC);
|
||||
|
||||
sockaddr_in6 sa;
|
||||
sa.sin6_family = AF_INET6;
|
||||
@@ -197,9 +199,10 @@ wivrn::TCP::TCP(in6_addr address, int port)
|
||||
wivrn::TCP::TCP(in_addr address, int port)
|
||||
{
|
||||
fd = socket(AF_INET, SOCK_STREAM, 0);
|
||||
fcntl(fd, F_SETFD, FD_CLOEXEC);
|
||||
|
||||
if (fd < 0)
|
||||
throw std::system_error{errno, std::generic_category()};
|
||||
fcntl(fd, F_SETFD, FD_CLOEXEC);
|
||||
|
||||
sockaddr_in sa;
|
||||
sa.sin_family = AF_INET;
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
|
||||
Apps::Apps(QObject * parent)
|
||||
{
|
||||
auto apps = wivrn::list_applications();
|
||||
auto apps = wivrn::list_applications(true /* Include steam apps */, false /* Don't load icons */);
|
||||
|
||||
for (const auto & [id, app]: apps)
|
||||
{
|
||||
|
||||
@@ -69,20 +69,6 @@
|
||||
<content_rating type="oars-1.1" />
|
||||
|
||||
<releases>
|
||||
<release version="25.8" date="2025-08-10">
|
||||
<url type="details">https://github.com/WiVRn/WiVRn/releases/tag/v25.8</url>
|
||||
<description>
|
||||
<ul>
|
||||
<li>Add a screen to launch applications when the headset connects</li>
|
||||
<li>Add a screen with many options during stream, which can be summoned by pressing both thumbsticks</li>
|
||||
<li>Add XR_EXT_user_presence and XR_EXT_hand_interaction OpenXR extensions</li>
|
||||
<li>Fix vulkan video encode and performances issues with multiple nvenc encoders on NVIDIA GPUs</li>
|
||||
<li>Support 10-bit encoding on VAAPI for H.265 and AV1 codecs</li>
|
||||
<li>Xrizer is now the default OpenVR compatibility layer (may be overriden by distribution packages)</li>
|
||||
<li>Added Slovak and Turkish translations</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="25.6.1" date="2025-06-29">
|
||||
<url type="details">https://github.com/WiVRn/WiVRn/releases/tag/v25.6.1</url>
|
||||
<description>
|
||||
|
||||
@@ -59,12 +59,6 @@ Kirigami.ApplicationWindow {
|
||||
// Set the visible property here because dismissing the message removes the binding
|
||||
if (value == WivrnServer.FailedToStart)
|
||||
message_failed_to_start.visible = true;
|
||||
|
||||
if (root.first_run && started) {
|
||||
console.log("First run");
|
||||
root.pageStack.push(Qt.resolvedUrl("WizardPage.qml"));
|
||||
root.first_run = false;
|
||||
}
|
||||
}
|
||||
|
||||
function onPairingEnabledChanged(value) {
|
||||
@@ -90,6 +84,12 @@ Kirigami.ApplicationWindow {
|
||||
if (WivrnServer.serverStatus == WivrnServer.Stopped)
|
||||
WivrnServer.start_server();
|
||||
|
||||
if (root.first_run) {
|
||||
console.log("First run");
|
||||
root.pageStack.push(Qt.resolvedUrl("WizardPage.qml"));
|
||||
root.first_run = false;
|
||||
}
|
||||
|
||||
if (root.last_run_version != ApkInstaller.currentVersion) {
|
||||
root.last_run_version = ApkInstaller.currentVersion;
|
||||
}
|
||||
@@ -305,12 +305,11 @@ Kirigami.ApplicationWindow {
|
||||
level: 1
|
||||
wrapMode: Text.WordWrap
|
||||
text: i18n("Steam information")
|
||||
opacity: steam_info.opacity
|
||||
opacity: root.server_started
|
||||
Layout.maximumHeight: root.server_started ? -1 : 0
|
||||
}
|
||||
SteamLaunchOptions {
|
||||
id: steam_info
|
||||
opacity: root.server_started && WivrnServer.steamCommand != ""
|
||||
opacity: root.server_started
|
||||
Layout.maximumHeight: root.server_started ? -1 : 0
|
||||
}
|
||||
|
||||
|
||||
@@ -290,7 +290,6 @@ Kirigami.ScrollablePage {
|
||||
SelectGame {}
|
||||
|
||||
SteamLaunchOptions {
|
||||
visible: WivrnServer.steamCommand != ""
|
||||
Layout.topMargin: 2 * Kirigami.Units.largeSpacing
|
||||
}
|
||||
|
||||
|
||||
@@ -506,37 +506,29 @@ void wivrn_server::on_server_properties_changed(const QString & interface_name,
|
||||
|
||||
void wivrn_server::setJsonConfiguration(QString new_configuration)
|
||||
{
|
||||
if (server_interface)
|
||||
{
|
||||
server_interface->setJsonConfiguration(m_jsonConfiguration = new_configuration);
|
||||
jsonConfigurationChanged(new_configuration);
|
||||
}
|
||||
server_interface->setJsonConfiguration(m_jsonConfiguration = new_configuration);
|
||||
jsonConfigurationChanged(new_configuration);
|
||||
}
|
||||
|
||||
void wivrn_server::revoke_key(QString public_key)
|
||||
{
|
||||
if (server_interface)
|
||||
server_interface->RevokeKey(public_key);
|
||||
server_interface->RevokeKey(public_key);
|
||||
}
|
||||
|
||||
void wivrn_server::rename_key(QString public_key, QString name)
|
||||
{
|
||||
if (server_interface)
|
||||
server_interface->RenameKey(public_key, name);
|
||||
server_interface->RenameKey(public_key, name);
|
||||
}
|
||||
|
||||
QString wivrn_server::enable_pairing(int timeout_secs)
|
||||
{
|
||||
qDebug() << "Enabling pairing for" << timeout_secs << "seconds";
|
||||
if (server_interface)
|
||||
return server_interface->EnablePairing(timeout_secs).value();
|
||||
return "";
|
||||
return server_interface->EnablePairing(timeout_secs).value();
|
||||
}
|
||||
|
||||
void wivrn_server::disable_pairing()
|
||||
{
|
||||
if (server_interface)
|
||||
server_interface->DisablePairing();
|
||||
server_interface->DisablePairing();
|
||||
}
|
||||
|
||||
QString wivrn_server::hostname()
|
||||
|
||||
@@ -5,8 +5,6 @@ The headset application and the server dashboard are translated, contributions a
|
||||
# Required software
|
||||
You only need `gettext` and a text editor, you can optionally use a graphical editor such as [GNOME Translation Editor](https://wiki.gnome.org/Apps/Gtranslator/) or [Lokalize](https://apps.kde.org/lokalize/).
|
||||
|
||||
If using Lokalize, make sure to erase the "Default mailing list" in the settings, or it will write a KDE mailing list in the translation file and you will have to manually remove it.
|
||||
|
||||
# Adding a new language
|
||||
|
||||
* Run `tools/update_messages.sh LANG` where LANG is the 2 letter [ISO 639](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) language code, this will create files in the `locale` directory for the new language. Fill in the fields, `git add` the files, commit and file a pull request.
|
||||
|
||||
Vendored
-4
@@ -1,6 +1,2 @@
|
||||
add_library(wivrn-external INTERFACE)
|
||||
target_include_directories(wivrn-external SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_library(imspinner OBJECT EXCLUDE_FROM_ALL imspinner/cimspinner.cpp)
|
||||
target_include_directories(imspinner SYSTEM PUBLIC imspinner)
|
||||
target_link_libraries(imspinner wivrn-imgui)
|
||||
|
||||
Vendored
-1628
File diff suppressed because it is too large
Load Diff
Vendored
-415
@@ -1,415 +0,0 @@
|
||||
/*
|
||||
* This file has been auto generated by srcript, see genCimSpinner.rb
|
||||
*/
|
||||
#include "cimspinner_config.h"
|
||||
//#define SPINNER_RAINBOW
|
||||
//#define SPINNER_RAINBOWMIX
|
||||
//#define SPINNER_ROTATINGHEART
|
||||
//#define SPINNER_ANG
|
||||
//#define SPINNER_ANG8
|
||||
//#define SPINNER_ANGMIX
|
||||
//#define SPINNER_LOADINGRING
|
||||
//#define SPINNER_CLOCK
|
||||
//#define SPINNER_PULSAR
|
||||
//#define SPINNER_DOUBLEFADEPULSAR
|
||||
//#define SPINNER_TWINPULSAR
|
||||
//#define SPINNER_FADEPULSAR
|
||||
//#define SPINNER_FADEPULSARSQUARE
|
||||
//#define SPINNER_CIRCULARLINES
|
||||
//#define SPINNER_DOTS
|
||||
//#define SPINNER_VDOTS
|
||||
//#define SPINNER_BOUNCEDOTS
|
||||
//#define SPINNER_ZIPDOTS
|
||||
//#define SPINNER_DOTSTOPOINTS
|
||||
//#define SPINNER_DOTSTOBAR
|
||||
//#define SPINNER_WAVEDOTS
|
||||
//#define SPINNER_FADEDOTS
|
||||
//#define SPINNER_THREEDOTS
|
||||
//#define SPINNER_FIVEDOTS
|
||||
//#define SPINNER_4CALEIDOSPCOPE
|
||||
//#define SPINNER_MULTIFADEDOTS
|
||||
//#define SPINNER_THICKTOSIN
|
||||
//#define SPINNER_SCALEDOTS
|
||||
//#define SPINNER_SQUARESPINS
|
||||
//#define SPINNER_MOVINGDOTS
|
||||
//#define SPINNER_ROTATEDOTS
|
||||
//#define SPINNER_ORIONDOTS
|
||||
//#define SPINNER_GALAXYDOTS
|
||||
//#define SPINNER_TWINANG
|
||||
//#define SPINNER_FILLING
|
||||
//#define SPINNER_FILLINGMEM
|
||||
//#define SPINNER_TOPUP
|
||||
//#define SPINNER_TWINANG180
|
||||
//#define SPINNER_TWINANG360
|
||||
//#define SPINNER_INCDOTS
|
||||
//#define SPINNER_INCFULLDOTS
|
||||
//#define SPINNER_FADEBARS
|
||||
//#define SPINNER_FADETRIS
|
||||
//#define SPINNER_BARSROTATEFADE
|
||||
//#define SPINNER_BARSSCALEMIDDLE
|
||||
//#define SPINNER_ANGTWIN
|
||||
//#define SPINNER_ARCROTATION
|
||||
//#define SPINNER_ARCFADE
|
||||
//#define SPINNER_SIMPLEARCFADE
|
||||
//#define SPINNER_SQUARESTROKEFADE
|
||||
//#define SPINNER_ASCIISYMBOLPOINTS
|
||||
//#define SPINNER_TEXTFADING
|
||||
//#define SPINNER_SEVENSEGMENTS
|
||||
//#define SPINNER_SQUARESTROKEFILL
|
||||
//#define SPINNER_SQUARESTROKELOADING
|
||||
//#define SPINNER_SQUARELOADING
|
||||
//#define SPINNER_FILLEDARCFADE
|
||||
//#define SPINNER_POINTSROLLER
|
||||
//#define SPINNER_POINTSARCBOUNCE
|
||||
//#define SPINNER_FILLEDARCCOLOR
|
||||
//#define SPINNER_FILLEDARCRING
|
||||
//#define SPINNER_ARCWEDGES
|
||||
//#define SPINNER_TWINBALL
|
||||
//#define SPINNER_SOLARBALLS
|
||||
//#define SPINNER_SOLARSCALEBALLS
|
||||
//#define SPINNER_SOLARARCS
|
||||
//#define SPINNER_MOVINGARCS
|
||||
//#define SPINNER_RAINBOWCIRCLE
|
||||
//#define SPINNER_BOUNCEBALL
|
||||
//#define SPINNER_PULSARBALL
|
||||
//#define SPINNER_INCSCALEDOTS
|
||||
//#define SPINNER_SOMESCALEDOTS
|
||||
//#define SPINNER_ANGTRIPLE
|
||||
//#define SPINNER_ANGECLIPSE
|
||||
//#define SPINNER_INGYANG
|
||||
//#define SPINNER_GOOEYBALLS
|
||||
//#define SPINNER_DOTSLOADING
|
||||
//#define SPINNER_ROTATEGOOEYBALLS
|
||||
//#define SPINNER_HERBERTBALLS
|
||||
//#define SPINNER_HERBERTBALLS3D
|
||||
//#define SPINNER_ROTATETRIANGLES
|
||||
//#define SPINNER_ROTATESHAPES
|
||||
//#define SPINNER_SINSQUARES
|
||||
//#define SPINNER_MOONLINE
|
||||
//#define SPINNER_CIRCLEDROP
|
||||
//#define SPINNER_SURROUNDEDINDICATOR
|
||||
//#define SPINNER_WIFIINDICATOR
|
||||
//#define SPINNER_TRIANGLESSELECTOR
|
||||
//#define SPINNER_CAMERA
|
||||
//#define SPINNER_FLOWINGGRADIENT
|
||||
//#define SPINNER_ROTATESEGMENTS
|
||||
//#define SPINNER_LEMNISCATE
|
||||
//#define SPINNER_ROTATEGEAR
|
||||
//#define SPINNER_ROTATEWHEEL
|
||||
//#define SPINNER_ATOM
|
||||
//#define SPINNER_PATTERNRINGS
|
||||
//#define SPINNER_PATTERNECLIPSE
|
||||
//#define SPINNER_PATTERNSPHERE
|
||||
//#define SPINNER_RINGSYNCHRONOUS
|
||||
//#define SPINNER_RINGWATERMARKS
|
||||
//#define SPINNER_ROTATEDATOM
|
||||
//#define SPINNER_RAINBOWBALLS
|
||||
//#define SPINNER_RAINBOWSHOT
|
||||
//#define SPINNER_SPIRAL
|
||||
//#define SPINNER_SPIRALEYE
|
||||
//#define SPINNER_BARCHARTSINE
|
||||
//#define SPINNER_BARCHARTADVSINE
|
||||
//#define SPINNER_BARCHARTADVSINEFADE
|
||||
//#define SPINNER_BARCHARTRAINBOW
|
||||
//#define SPINNER_BLOCKS
|
||||
//#define SPINNER_TWINBLOCKS
|
||||
//#define SPINNER_SQUARERANDOMDOTS
|
||||
//#define SPINNER_SCALEBLOCKS
|
||||
//#define SPINNER_SCALESQUARES
|
||||
//#define SPINNER_SQUISHSQUARE
|
||||
//#define SPINNER_FLUID
|
||||
//#define SPINNER_FLUIDPOINTS
|
||||
//#define SPINNER_ARCPOLARFADE
|
||||
//#define SPINNER_ARCPOLARRADIUS
|
||||
//#define SPINNER_CALEIDOSCOPE
|
||||
//#define SPINNER_HBODOTS
|
||||
//#define SPINNER_MOONDOTS
|
||||
//#define SPINNER_TWINHBODOTS
|
||||
//#define SPINNER_THREEDOTSSTAR
|
||||
//#define SPINNER_SINEARCS
|
||||
//#define SPINNER_TRIANGLESSHIFT
|
||||
//#define SPINNER_POINTSSHIFT
|
||||
//#define SPINNER_SWINGDOTS
|
||||
//#define SPINNER_CIRCULARPOINTS
|
||||
//#define SPINNER_CURVEDCIRCLE
|
||||
//#define SPINNER_MODCIRCLE
|
||||
//#define SPINNER_DNADOTS
|
||||
//#define SPINNER_3SMUGGLEDOTS
|
||||
//#define SPINNER_ROTATESEGMENTSPULSAR
|
||||
//#define SPINNER_SPLINEANG
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef CIMSPINNER_API
|
||||
#define CIMSPINNER_API
|
||||
#endif
|
||||
|
||||
CIMSPINNER_API void SpinnerRainbow(const char *label, float radius, float thickness, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerRainbowEx(const char *label, float radius, float thickness, const ImColor color, float speed,float ang_min, float ang_max, int arcs, int mode);
|
||||
CIMSPINNER_API void SpinnerRainbowMix(const char *label, float radius, float thickness, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerRainbowMixEx(const char *label, float radius, float thickness, const ImColor color, float speed,float ang_min, float ang_max, int arcs, int mode);
|
||||
CIMSPINNER_API void SpinnerRotatingHeart(const char *label, float radius, float thickness, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerRotatingHeartEx(const char *label, float radius, float thickness, const ImColor color, float speed,float ang_min);
|
||||
CIMSPINNER_API void SpinnerAng(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerAngEx(const char *label, float radius, float thickness,const ImColor color, const ImColor bg, float speed, float angle, int mode);
|
||||
CIMSPINNER_API void SpinnerAng8(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerAng8Ex(const char *label, float radius, float thickness,const ImColor color, const ImColor bg, float speed, float angle, int mode, float rkoef);
|
||||
CIMSPINNER_API void SpinnerAngMix(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerAngMixEx(const char *label, float radius, float thickness,const ImColor color, float speed, float angle, int arcs, int mode);
|
||||
CIMSPINNER_API void SpinnerLoadingRing(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerLoadingRingEx(const char *label, float radius, float thickness,const ImColor color, const ImColor bg, float speed, int segments);
|
||||
CIMSPINNER_API void SpinnerClock(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerClockEx(const char *label, float radius, float thickness,const ImColor color, const ImColor bg, float speed);
|
||||
CIMSPINNER_API void SpinnerPulsar(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerPulsarEx(const char *label, float radius, float thickness,const ImColor bg, float speed, bool sequence, float angle, int mode);
|
||||
CIMSPINNER_API void SpinnerDoubleFadePulsar(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerDoubleFadePulsarEx(const char *label, float radius, float thickness,const ImColor bg, float speed);
|
||||
CIMSPINNER_API void SpinnerTwinPulsar(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerTwinPulsarEx(const char *label, float radius, float thickness,const ImColor color, float speed, int rings, int mode);
|
||||
CIMSPINNER_API void SpinnerFadePulsar(const char *label, float radius);
|
||||
CIMSPINNER_API void SpinnerFadePulsarEx(const char *label, float radius,const ImColor color, float speed, int rings, int mode);
|
||||
CIMSPINNER_API void SpinnerFadePulsarSquare(const char *label, float radius);
|
||||
CIMSPINNER_API void SpinnerFadePulsarSquareEx(const char *label, float radius,const ImColor color, float speed, int rings, int mode);
|
||||
CIMSPINNER_API void SpinnerCircularLines(const char *label, float radius);
|
||||
CIMSPINNER_API void SpinnerCircularLinesEx(const char *label, float radius,const ImColor color, float speed, int lines, int mode);
|
||||
CIMSPINNER_API void SpinnerDots(const char *label, float *nextdot, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerDotsEx(const char *label, float *nextdot, float radius, float thickness,const ImColor color, float speed, size_t dots, float minth, int mode);
|
||||
CIMSPINNER_API void SpinnerVDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerVDotsEx(const char *label, float radius, float thickness,const ImColor color, const ImColor bgcolor, float speed, size_t dots, size_t mdots, int mode);
|
||||
CIMSPINNER_API void SpinnerBounceDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerBounceDotsEx(const char *label, float radius, float thickness,const ImColor color, float speed, size_t dots, int mode);
|
||||
CIMSPINNER_API void SpinnerZipDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerZipDotsEx(const char *label, float radius, float thickness,const ImColor color, float speed, size_t dots);
|
||||
CIMSPINNER_API void SpinnerDotsToPoints(const char *label, float radius, float thickness, float offset_k);
|
||||
CIMSPINNER_API void SpinnerDotsToPointsEx(const char *label, float radius, float thickness, float offset_k,const ImColor color, float speed, size_t dots);
|
||||
CIMSPINNER_API void SpinnerDotsToBar(const char *label, float radius, float thickness, float offset_k);
|
||||
CIMSPINNER_API void SpinnerDotsToBarEx(const char *label, float radius, float thickness, float offset_k,const ImColor color, float speed, size_t dots);
|
||||
CIMSPINNER_API void SpinnerWaveDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerWaveDotsEx(const char *label, float radius, float thickness,const ImColor color, float speed, int lt);
|
||||
CIMSPINNER_API void SpinnerFadeDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerFadeDotsEx(const char *label, float radius, float thickness,const ImColor color, float speed, int lt, int mode);
|
||||
CIMSPINNER_API void SpinnerThreeDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerThreeDotsEx(const char *label, float radius, float thickness,const ImColor color, float speed, int lt);
|
||||
CIMSPINNER_API void SpinnerFiveDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerFiveDotsEx(const char *label, float radius, float thickness,const ImColor color, float speed, int lt);
|
||||
CIMSPINNER_API void Spinner4Caleidospcope(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void Spinner4CaleidospcopeEx(const char *label, float radius, float thickness,const ImColor color, float speed, int lt);
|
||||
CIMSPINNER_API void SpinnerMultiFadeDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerMultiFadeDotsEx(const char *label, float radius, float thickness,const ImColor color, float speed, int lt);
|
||||
CIMSPINNER_API void SpinnerThickToSin(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerThickToSinEx(const char *label, float radius, float thickness,const ImColor color, float speed, int nt, int lt, int mode);
|
||||
CIMSPINNER_API void SpinnerScaleDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerScaleDotsEx(const char *label, float radius, float thickness,const ImColor color, float speed, int lt);
|
||||
CIMSPINNER_API void SpinnerSquareSpins(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerSquareSpinsEx(const char *label, float radius, float thickness,const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerMovingDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerMovingDotsEx(const char *label, float radius, float thickness,const ImColor color, float speed, size_t dots);
|
||||
CIMSPINNER_API void SpinnerRotateDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerRotateDotsEx(const char *label, float radius, float thickness,const ImColor color, float speed, int dots, int mode);
|
||||
CIMSPINNER_API void SpinnerOrionDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerOrionDotsEx(const char *label, float radius, float thickness,const ImColor color, float speed, int arcs);
|
||||
CIMSPINNER_API void SpinnerGalaxyDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerGalaxyDotsEx(const char *label, float radius, float thickness,const ImColor color, float speed, int arcs);
|
||||
CIMSPINNER_API void SpinnerTwinAng(const char *label, float radius1, float radius2, float thickness);
|
||||
CIMSPINNER_API void SpinnerTwinAngEx(const char *label, float radius1, float radius2, float thickness,const ImColor color1, const ImColor color2, float speed, float angle, int mode);
|
||||
CIMSPINNER_API void SpinnerFilling(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerFillingEx(const char *label, float radius, float thickness,const ImColor color1, const ImColor color2, float speed);
|
||||
CIMSPINNER_API void SpinnerFillingMem(const char *label, float radius, float thickness, const ImColor color, ImColor colorbg, float speed);
|
||||
CIMSPINNER_API void SpinnerTopup(const char *label, float radius1, float radius2);
|
||||
CIMSPINNER_API void SpinnerTopupEx(const char *label, float radius1, float radius2,const ImColor color, const ImColor fg, const ImColor bg, float speed);
|
||||
CIMSPINNER_API void SpinnerTwinAng180(const char *label, float radius1, float radius2, float thickness);
|
||||
CIMSPINNER_API void SpinnerTwinAng180Ex(const char *label, float radius1, float radius2, float thickness,const ImColor color1, const ImColor color2, float speed, float angle, int mode);
|
||||
CIMSPINNER_API void SpinnerTwinAng360(const char *label, float radius1, float radius2, float thickness);
|
||||
CIMSPINNER_API void SpinnerTwinAng360Ex(const char *label, float radius1, float radius2, float thickness,const ImColor color1, const ImColor color2, float speed1, float speed2, int mode);
|
||||
CIMSPINNER_API void SpinnerIncDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerIncDotsEx(const char *label, float radius, float thickness,const ImColor color, float speed, size_t dots);
|
||||
CIMSPINNER_API void SpinnerIncFullDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerIncFullDotsEx(const char *label, float radius, float thickness,const ImColor color, float speed, size_t dots);
|
||||
CIMSPINNER_API void SpinnerFadeBars(const char *label, float w);
|
||||
CIMSPINNER_API void SpinnerFadeBarsEx(const char *label, float w,const ImColor color, float speed, size_t bars, bool scale);
|
||||
CIMSPINNER_API void SpinnerFadeTris(const char *label, float radius);
|
||||
CIMSPINNER_API void SpinnerFadeTrisEx(const char *label, float radius,const ImColor color, float speed, size_t dim, bool scale, int mode);
|
||||
CIMSPINNER_API void SpinnerBarsRotateFade(const char *label, float rmin, float rmax , float thickness);
|
||||
CIMSPINNER_API void SpinnerBarsRotateFadeEx(const char *label, float rmin, float rmax , float thickness,const ImColor color, float speed, size_t bars);
|
||||
CIMSPINNER_API void SpinnerBarsScaleMiddle(const char *label, float w);
|
||||
CIMSPINNER_API void SpinnerBarsScaleMiddleEx(const char *label, float w,const ImColor color, float speed, size_t bars);
|
||||
CIMSPINNER_API void SpinnerAngTwin(const char *label, float radius1, float radius2, float thickness);
|
||||
CIMSPINNER_API void SpinnerAngTwinEx(const char *label, float radius1, float radius2, float thickness,const ImColor color, const ImColor bg, float speed, float angle, size_t arcs, int mode);
|
||||
CIMSPINNER_API void SpinnerArcRotation(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerArcRotationEx(const char *label, float radius, float thickness,const ImColor color, float speed, size_t arcs, int mode);
|
||||
CIMSPINNER_API void SpinnerArcFade(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerArcFadeEx(const char *label, float radius, float thickness,const ImColor color, float speed, size_t arcs, int mode);
|
||||
CIMSPINNER_API void SpinnerSimpleArcFade(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerSimpleArcFadeEx(const char *label, float radius, float thickness,const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerSquareStrokeFade(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerSquareStrokeFadeEx(const char *label, float radius, float thickness,const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerAsciiSymbolPoints(const char *label, const char* text, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerAsciiSymbolPointsEx(const char *label, const char* text, float radius, float thickness,const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerTextFading(const char *label, const char* text, float radius, float fsize);
|
||||
CIMSPINNER_API void SpinnerTextFadingEx(const char *label, const char* text, float radius, float fsize,const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerSevenSegments(const char *label, const char* text, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerSevenSegmentsEx(const char *label, const char* text, float radius, float thickness,const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerSquareStrokeFill(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerSquareStrokeFillEx(const char *label, float radius, float thickness,const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerSquareStrokeLoading(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerSquareStrokeLoadingEx(const char *label, float radius, float thickness,const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerSquareLoading(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerSquareLoadingEx(const char *label, float radius, float thickness,const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerFilledArcFade(const char *label, float radius);
|
||||
CIMSPINNER_API void SpinnerFilledArcFadeEx(const char *label, float radius,const ImColor color, float speed, size_t arcs, int mode);
|
||||
CIMSPINNER_API void SpinnerPointsRoller(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerPointsRollerEx(const char *label, float radius, float thickness,const ImColor color, float speed, size_t points, int circles, float rspeed);
|
||||
CIMSPINNER_API void SpinnerPointsArcBounce(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerPointsArcBounceEx(const char *label, float radius, float thickness,const ImColor color, float speed, size_t points, int circles, float rspeed);
|
||||
CIMSPINNER_API void SpinnerFilledArcColor(const char *label, float radius);
|
||||
CIMSPINNER_API void SpinnerFilledArcColorEx(const char *label, float radius,const ImColor color, const ImColor bg, float speed, size_t arcs);
|
||||
CIMSPINNER_API void SpinnerFilledArcRing(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerFilledArcRingEx(const char *label, float radius, float thickness,const ImColor color, const ImColor bg, float speed, size_t arcs);
|
||||
CIMSPINNER_API void SpinnerArcWedges(const char *label, float radius);
|
||||
CIMSPINNER_API void SpinnerArcWedgesEx(const char *label, float radius,const ImColor color, float speed, size_t arcs, int mode);
|
||||
CIMSPINNER_API void SpinnerTwinBall(const char *label, float radius1, float radius2, float thickness, float b_thickness);
|
||||
CIMSPINNER_API void SpinnerTwinBallEx(const char *label, float radius1, float radius2, float thickness, float b_thickness,const ImColor ball, const ImColor bg, float speed, size_t balls, int mode);
|
||||
CIMSPINNER_API void SpinnerSolarBalls(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerSolarBallsEx(const char *label, float radius, float thickness,const ImColor ball, const ImColor bg, float speed, size_t balls);
|
||||
CIMSPINNER_API void SpinnerSolarScaleBalls(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerSolarScaleBallsEx(const char *label, float radius, float thickness,const ImColor ball, float speed, size_t balls);
|
||||
CIMSPINNER_API void SpinnerSolarArcs(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerSolarArcsEx(const char *label, float radius, float thickness,const ImColor ball, const ImColor bg, float speed, size_t balls);
|
||||
CIMSPINNER_API void SpinnerMovingArcs(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerMovingArcsEx(const char *label, float radius, float thickness,const ImColor color, float speed, size_t arcs);
|
||||
CIMSPINNER_API void SpinnerRainbowCircle(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerRainbowCircleEx(const char *label, float radius, float thickness,const ImColor color, float speed, size_t arcs, float mode);
|
||||
CIMSPINNER_API void SpinnerBounceBall(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerBounceBallEx(const char *label, float radius, float thickness,const ImColor color, float speed, int dots, bool shadow);
|
||||
CIMSPINNER_API void SpinnerPulsarBall(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerPulsarBallEx(const char *label, float radius, float thickness,const ImColor color, float speed, bool shadow, int mode);
|
||||
CIMSPINNER_API void SpinnerIncScaleDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerIncScaleDotsEx(const char *label, float radius, float thickness,const ImColor color, float speed, size_t dots, float angle, int mode);
|
||||
CIMSPINNER_API void SpinnerSomeScaleDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerSomeScaleDotsEx(const char *label, float radius, float thickness,const ImColor color, float speed, size_t dots, int mode);
|
||||
CIMSPINNER_API void SpinnerAngTriple(const char *label, float radius1, float radius2, float radius3, float thickness);
|
||||
CIMSPINNER_API void SpinnerAngTripleEx(const char *label, float radius1, float radius2, float radius3, float thickness,const ImColor c1, const ImColor c2, const ImColor c3, float speed, float angle);
|
||||
CIMSPINNER_API void SpinnerAngEclipse(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerAngEclipseEx(const char *label, float radius, float thickness,const ImColor color, float speed, float angle);
|
||||
CIMSPINNER_API void SpinnerIngYang(const char *label, float radius, float thickness, bool reverse, float yang_detlta_r);
|
||||
CIMSPINNER_API void SpinnerIngYangEx(const char *label, float radius, float thickness, bool reverse, float yang_detlta_r,const ImColor colorI, const ImColor colorY, float speed, float angle, int mode);
|
||||
CIMSPINNER_API void SpinnerGooeyBalls(const char *label, float radius, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerGooeyBallsEx(const char *label, float radius, const ImColor color, float speed,int mode);
|
||||
CIMSPINNER_API void SpinnerDotsLoading(const char *label, float radius, float thickness, const ImColor color, const ImColor bg, float speed);
|
||||
CIMSPINNER_API void SpinnerRotateGooeyBalls(const char *label, float radius, float thickness, const ImColor color, float speed, int balls);
|
||||
CIMSPINNER_API void SpinnerRotateGooeyBallsEx(const char *label, float radius, float thickness, const ImColor color, float speed, int balls,int mode);
|
||||
CIMSPINNER_API void SpinnerHerbertBalls(const char *label, float radius, float thickness, const ImColor color, float speed, int balls);
|
||||
CIMSPINNER_API void SpinnerHerbertBalls3D(const char *label, float radius, float thickness, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerRotateTriangles(const char *label, float radius, float thickness, const ImColor color, float speed, int tris);
|
||||
CIMSPINNER_API void SpinnerRotateTrianglesEx(const char *label, float radius, float thickness, const ImColor color, float speed, int tris,int mode);
|
||||
CIMSPINNER_API void SpinnerRotateShapes(const char *label, float radius, float thickness, const ImColor color, float speed, int shapes, int pnt);
|
||||
CIMSPINNER_API void SpinnerSinSquares(const char *label, float radius, float thickness, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerSinSquaresEx(const char *label, float radius, float thickness, const ImColor color, float speed,int mode);
|
||||
CIMSPINNER_API void SpinnerMoonLine(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerMoonLineEx(const char *label, float radius, float thickness,const ImColor color, const ImColor bg, float speed, float angle);
|
||||
CIMSPINNER_API void SpinnerCircleDrop(const char *label, float radius, float thickness, float thickness_drop);
|
||||
CIMSPINNER_API void SpinnerCircleDropEx(const char *label, float radius, float thickness, float thickness_drop,const ImColor color, const ImColor bg, float speed, float angle);
|
||||
CIMSPINNER_API void SpinnerSurroundedIndicator(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerSurroundedIndicatorEx(const char *label, float radius, float thickness,const ImColor color, const ImColor bg, float speed);
|
||||
CIMSPINNER_API void SpinnerWifiIndicator(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerWifiIndicatorEx(const char *label, float radius, float thickness,const ImColor color, const ImColor bg, float speed, float cangle, int dots);
|
||||
CIMSPINNER_API void SpinnerTrianglesSelector(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerTrianglesSelectorEx(const char *label, float radius, float thickness,const ImColor color, const ImColor bg, float speed, size_t bars);
|
||||
typedef ImColor LeafColor(int);
|
||||
CIMSPINNER_API void SpinnerCamera(const char *label, float radius, float thickness, LeafColor *leaf_color);
|
||||
CIMSPINNER_API void SpinnerCameraEx(const char *label, float radius, float thickness, LeafColor *leaf_color,float speed, size_t bars, int mode);
|
||||
CIMSPINNER_API void SpinnerFlowingGradient(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerFlowingGradientEx(const char *label, float radius, float thickness,const ImColor color, const ImColor bg, float speed, float angle);
|
||||
CIMSPINNER_API void SpinnerRotateSegments(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerRotateSegmentsEx(const char *label, float radius, float thickness,const ImColor color, float speed, size_t arcs, size_t layers, int mode);
|
||||
CIMSPINNER_API void SpinnerLemniscate(const char* label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerLemniscateEx(const char* label, float radius, float thickness,const ImColor color, float speed, float angle);
|
||||
CIMSPINNER_API void SpinnerRotateGear(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerRotateGearEx(const char *label, float radius, float thickness,const ImColor color, float speed, size_t pins);
|
||||
CIMSPINNER_API void SpinnerRotateWheel(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerRotateWheelEx(const char *label, float radius, float thickness,const ImColor bg_color, const ImColor color, float speed, size_t pins);
|
||||
CIMSPINNER_API void SpinnerAtom(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerAtomEx(const char *label, float radius, float thickness,const ImColor color, float speed, int elipses);
|
||||
CIMSPINNER_API void SpinnerPatternRings(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerPatternRingsEx(const char *label, float radius, float thickness,const ImColor color, float speed, int elipses);
|
||||
CIMSPINNER_API void SpinnerPatternEclipse(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerPatternEclipseEx(const char *label, float radius, float thickness,const ImColor color, float speed, int elipses, float delta_a, float delta_y);
|
||||
CIMSPINNER_API void SpinnerPatternSphere(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerPatternSphereEx(const char *label, float radius, float thickness,const ImColor color, float speed, int elipses);
|
||||
CIMSPINNER_API void SpinnerRingSynchronous(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerRingSynchronousEx(const char *label, float radius, float thickness,const ImColor color, float speed, int elipses);
|
||||
CIMSPINNER_API void SpinnerRingWatermarks(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerRingWatermarksEx(const char *label, float radius, float thickness,const ImColor color, float speed, int elipses);
|
||||
CIMSPINNER_API void SpinnerRotatedAtom(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerRotatedAtomEx(const char *label, float radius, float thickness,const ImColor color, float speed, int elipses, int mode);
|
||||
CIMSPINNER_API void SpinnerRainbowBalls(const char *label, float radius, float thickness, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerRainbowBallsEx(const char *label, float radius, float thickness, const ImColor color, float speed,int balls, int mode, int rings, int mx);
|
||||
CIMSPINNER_API void SpinnerRainbowShot(const char *label, float radius, float thickness, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerRainbowShotEx(const char *label, float radius, float thickness, const ImColor color, float speed,int balls, int mode);
|
||||
CIMSPINNER_API void SpinnerSpiral(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerSpiralEx(const char *label, float radius, float thickness,const ImColor color, float speed, size_t arcs);
|
||||
CIMSPINNER_API void SpinnerSpiralEye(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerSpiralEyeEx(const char *label, float radius, float thickness,const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerBarChartSine(const char *label, float radius, float thickness, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerBarChartSineEx(const char *label, float radius, float thickness, const ImColor color, float speed,int bars, int mode);
|
||||
CIMSPINNER_API void SpinnerBarChartAdvSine(const char *label, float radius, float thickness, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerBarChartAdvSineEx(const char *label, float radius, float thickness, const ImColor color, float speed,int mode);
|
||||
CIMSPINNER_API void SpinnerBarChartAdvSineFade(const char *label, float radius, float thickness, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerBarChartAdvSineFadeEx(const char *label, float radius, float thickness, const ImColor color, float speed,int mode);
|
||||
CIMSPINNER_API void SpinnerBarChartRainbow(const char *label, float radius, float thickness, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerBarChartRainbowEx(const char *label, float radius, float thickness, const ImColor color, float speed,int bars, int mode);
|
||||
CIMSPINNER_API void SpinnerBlocks(const char *label, float radius, float thickness, const ImColor bg, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerTwinBlocks(const char *label, float radius, float thickness, const ImColor bg, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerSquareRandomDots(const char *label, float radius, float thickness, const ImColor bg, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerScaleBlocks(const char *label, float radius, float thickness, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerScaleBlocksEx(const char *label, float radius, float thickness, const ImColor color, float speed,int mode);
|
||||
CIMSPINNER_API void SpinnerScaleSquares(const char *label, float radius, float thikness, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerSquishSquare(const char *label, float radius, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerFluid(const char *label, float radius, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerFluidEx(const char *label, float radius, const ImColor color, float speed,int bars);
|
||||
CIMSPINNER_API void SpinnerFluidPoints(const char *label, float radius, float thickness, const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerFluidPointsEx(const char *label, float radius, float thickness, const ImColor color, float speed,size_t dots, float delta);
|
||||
CIMSPINNER_API void SpinnerArcPolarFade(const char *label, float radius);
|
||||
CIMSPINNER_API void SpinnerArcPolarFadeEx(const char *label, float radius,const ImColor color, float speed, size_t arcs, int mode);
|
||||
CIMSPINNER_API void SpinnerArcPolarRadius(const char *label, float radius);
|
||||
CIMSPINNER_API void SpinnerArcPolarRadiusEx(const char *label, float radius,const ImColor color, float speed, size_t arcs, int mode);
|
||||
CIMSPINNER_API void SpinnerCaleidoscope(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerCaleidoscopeEx(const char *label, float radius, float thickness,const ImColor color, float speed, size_t arcs, int mode);
|
||||
CIMSPINNER_API void SpinnerHboDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerHboDotsEx(const char *label, float radius, float thickness,const ImColor color, float minfade, float ryk, float speed, size_t dots, int mode);
|
||||
CIMSPINNER_API void SpinnerMoonDots(const char *label, float radius, float thickness, const ImColor first, const ImColor second);
|
||||
CIMSPINNER_API void SpinnerMoonDotsEx(const char *label, float radius, float thickness, const ImColor first, const ImColor second,float speed);
|
||||
CIMSPINNER_API void SpinnerTwinHboDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerTwinHboDotsEx(const char *label, float radius, float thickness,const ImColor color, float minfade, float ryk, float speed, size_t dots, float delta);
|
||||
CIMSPINNER_API void SpinnerThreeDotsStar(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerThreeDotsStarEx(const char *label, float radius, float thickness,const ImColor color, float minfade, float ryk, float speed, float delta);
|
||||
CIMSPINNER_API void SpinnerSineArcs(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerSineArcsEx(const char *label, float radius, float thickness,const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerTrianglesShift(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerTrianglesShiftEx(const char *label, float radius, float thickness,const ImColor color, const ImColor bg, float speed, size_t bars);
|
||||
CIMSPINNER_API void SpinnerPointsShift(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerPointsShiftEx(const char *label, float radius, float thickness,const ImColor color, const ImColor bg, float speed, size_t bars);
|
||||
CIMSPINNER_API void SpinnerSwingDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerSwingDotsEx(const char *label, float radius, float thickness,const ImColor color, float speed);
|
||||
CIMSPINNER_API void SpinnerCircularPoints(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerCircularPointsEx(const char *label, float radius, float thickness,const ImColor color, float speed, int lines);
|
||||
CIMSPINNER_API void SpinnerCurvedCircle(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerCurvedCircleEx(const char *label, float radius, float thickness,const ImColor color, float speed, size_t circles);
|
||||
CIMSPINNER_API void SpinnerModCircle(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerModCircleEx(const char *label, float radius, float thickness,const ImColor color, float ang_min, float ang_max, float speed);
|
||||
CIMSPINNER_API void SpinnerDnaDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerDnaDotsEx(const char *label, float radius, float thickness,const ImColor color, float speed, int lt, float delta, bool mode);
|
||||
CIMSPINNER_API void Spinner3SmuggleDots(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void Spinner3SmuggleDotsEx(const char *label, float radius, float thickness,const ImColor color, float speed, int lt, float delta, bool mode);
|
||||
CIMSPINNER_API void SpinnerRotateSegmentsPulsar(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerRotateSegmentsPulsarEx(const char *label, float radius, float thickness,const ImColor color, float speed, size_t arcs, size_t layers);
|
||||
CIMSPINNER_API void SpinnerSplineAng(const char *label, float radius, float thickness);
|
||||
CIMSPINNER_API void SpinnerSplineAngEx(const char *label, float radius, float thickness,const ImColor color, const ImColor bg, float speed, float angle, int mode);
|
||||
|
||||
CIMSPINNER_API void demoSpinners();
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#define SPINNER_RAINBOWMIX
|
||||
#define SPINNER_DNADOTS
|
||||
#define SPINNER_ANG8
|
||||
#define SPINNER_CLOCK
|
||||
#define SPINNER_PULSAR
|
||||
#define SPINNER_DOTSTOBAR
|
||||
#define SPINNER_ATOM
|
||||
#define SPINNER_BARCHARTRAINBOW
|
||||
#define SPINNER_SWINGDOTS
|
||||
Vendored
-4950
File diff suppressed because it is too large
Load Diff
@@ -19,7 +19,6 @@
|
||||
|
||||
pkgs.librsvg
|
||||
pkgs.libpng
|
||||
pkgs.libarchive
|
||||
];
|
||||
|
||||
package = pkgs.enableDebugging (pkgs.wivrn.overrideAttrs (finalAttrs: oldAttrs: {
|
||||
|
||||
@@ -25,8 +25,7 @@ finish-args:
|
||||
- --system-talk-name=org.freedesktop.hostname1
|
||||
# List applications from $XDG_DATA_DIRS
|
||||
- --filesystem=host-os:ro
|
||||
- --filesystem=xdg-data/applications:ro
|
||||
- --filesystem=xdg-data/Steam:ro
|
||||
- --filesystem=xdg-data:ro
|
||||
# List flatpak Steam games
|
||||
- --filesystem=~/.var/app/com.valvesoftware.Steam:ro
|
||||
# Pipewire
|
||||
@@ -34,6 +33,9 @@ finish-args:
|
||||
# Set the active OpenXR / OpenVR runtime
|
||||
- --filesystem=xdg-config/openxr:create
|
||||
- --filesystem=xdg-config/openvr:create
|
||||
# SlimeVR
|
||||
- --filesystem=xdg-run/SlimeVRInput
|
||||
- --filesystem=xdg-run/SlimeVRRpc
|
||||
# Let outside application access the WiVRn socket
|
||||
- --filesystem=xdg-run/wivrn:create
|
||||
- --own-name=io.github.wivrn.Server
|
||||
@@ -352,6 +354,10 @@ modules:
|
||||
- WIVRN_SRC1
|
||||
WIVRN_SRC2
|
||||
WIVRN_SRC3
|
||||
- type: archive
|
||||
url: BOOSTPFR_URL
|
||||
dest: deps/boostpfr-src
|
||||
sha256: BOOSTPFR_SHA256
|
||||
- type: git
|
||||
url: https://gitlab.freedesktop.org/monado/monado
|
||||
tag: MONADO_COMMIT
|
||||
@@ -359,6 +365,7 @@ modules:
|
||||
- type: shell
|
||||
commands:
|
||||
- cd deps/monado-src && ../../patches/apply.sh ../../patches/monado/*
|
||||
- cd deps/boostpfr-src && ../../patches/apply.sh ../../flatpak/boostpfr-gcc-12-internal-compiler-error.patch
|
||||
|
||||
- name: wivrn
|
||||
buildsystem: cmake-ninja
|
||||
@@ -373,8 +380,7 @@ modules:
|
||||
- -DWIVRN_USE_NVENC=ON
|
||||
- -DWIVRN_USE_VULKAN_ENCODE=ON
|
||||
- -DWIVRN_USE_PULSEAUDIO=OFF
|
||||
- -DWIVRN_USE_PIPEWIRE=ON
|
||||
- -DWIVRN_USE_SYSTEM_BOOST=OFF
|
||||
- -DWIVRN_FEATURE_SOLARXR=ON
|
||||
- -DWIVRN_WERROR=ON
|
||||
- -DWIVRN_CHECK_CAPSYSNICE=OFF # Capabilities don't work inside flatpak
|
||||
- -DFETCHCONTENT_FULLY_DISCONNECTED=ON
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 158 KiB |
+3
-3
@@ -6,7 +6,7 @@ msgstr ""
|
||||
"Project-Id-Version: WiVRn 0.15\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-08-04 15:49+0200\n"
|
||||
"PO-Revision-Date: 2025-08-10 17:11+0200\n"
|
||||
"PO-Revision-Date: 2025-08-02 00:41+0200\n"
|
||||
"Last-Translator: Álvaro De Quinta <blackcherry@danwin1210.de>\n"
|
||||
"Language-Team: Spanish\n"
|
||||
"Language: es\n"
|
||||
@@ -470,7 +470,7 @@ msgid ""
|
||||
"Press the grip button or put your palm up\n"
|
||||
"to move the main window"
|
||||
msgstr ""
|
||||
"Pulsa el botón de agarre o pon tu palma hacia arriba\n"
|
||||
"Pulsa el botón de agarre o pon tu palma apuntando hacia arriba\n"
|
||||
"para mover la ventana principal"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:2005
|
||||
@@ -591,7 +591,7 @@ msgstr "Estadísticas"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:802
|
||||
msgid "Statistics overlay"
|
||||
msgstr "Superponer estadísticas"
|
||||
msgstr "Superposición de las estadísticas"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:805
|
||||
msgid "Compact view"
|
||||
|
||||
+107
-117
@@ -5,15 +5,15 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WiVRn 0.15\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-08-12 13:35+0200\n"
|
||||
"PO-Revision-Date: 2025-08-12 13:37+0200\n"
|
||||
"POT-Creation-Date: 2025-07-30 09:41+0200\n"
|
||||
"PO-Revision-Date: 2025-07-30 14:47+0200\n"
|
||||
"Last-Translator: Guillaume Meunier <guillaume.meunier@centraliens.net>\n"
|
||||
"Language-Team: French <>\n"
|
||||
"Language: French\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Gtranslator 48.0\n"
|
||||
"X-Generator: Gtranslator 47.1\n"
|
||||
|
||||
#: client/scene.cpp:74
|
||||
msgid "No supported swapchain format"
|
||||
@@ -43,99 +43,99 @@ msgstr "Impossible de se connecter à {} ({}): {}"
|
||||
msgid "Waiting for connection"
|
||||
msgstr "Attente de connexion"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:230
|
||||
#: client/scenes/lobby_gui.cpp:156
|
||||
msgctxt "openxr_post_processing"
|
||||
msgid "Normal"
|
||||
msgstr "Normal"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:233
|
||||
#: client/scenes/lobby_gui.cpp:159
|
||||
msgctxt "openxr_post_processing"
|
||||
msgid "Quality"
|
||||
msgstr "Qualité"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:235
|
||||
#: client/scenes/lobby_gui.cpp:161
|
||||
msgctxt "openxr_post_processing"
|
||||
msgid "Disabled"
|
||||
msgstr "Désactivé"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:243 client/scenes/lobby_gui.cpp:400
|
||||
#: client/scenes/stream_gui.cpp:814
|
||||
#: client/scenes/lobby_gui.cpp:169 client/scenes/lobby_gui.cpp:320
|
||||
#: client/scenes/stream_gui.cpp:812
|
||||
msgid "Disconnect"
|
||||
msgstr "Déconnecter"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:264 client/scenes/stream_gui.cpp:810
|
||||
#: client/scenes/lobby_gui.cpp:189 client/scenes/stream_gui.cpp:808
|
||||
msgid "Close"
|
||||
msgstr "Fermer"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:270
|
||||
#: client/scenes/lobby_gui.cpp:195
|
||||
msgid "Connection"
|
||||
msgstr "Connexion en cours"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:272
|
||||
#: client/scenes/lobby_gui.cpp:197
|
||||
#, c++-format
|
||||
msgid "Connection to {}"
|
||||
msgstr "Connexion à {}"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:302
|
||||
#: client/scenes/lobby_gui.cpp:227
|
||||
msgid "PIN"
|
||||
msgstr "Code PIN"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:324
|
||||
#: client/scenes/lobby_gui.cpp:249
|
||||
msgid "Input the PIN displayed on the dashboard"
|
||||
msgstr "Entrez le code PIN affiché sur le tableau de bord"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:395
|
||||
#: client/scenes/lobby_gui.cpp:315
|
||||
msgid "Connected to WiVRn server"
|
||||
msgstr "Connecté au serveur WiVRn"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:397
|
||||
#: client/scenes/lobby_gui.cpp:317
|
||||
#, c++-format
|
||||
msgid "Connected to {}"
|
||||
msgstr "Connecté à {}"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:407
|
||||
#: client/scenes/lobby_gui.cpp:327
|
||||
msgid "Start an application on the server to start streaming."
|
||||
msgstr ""
|
||||
"Démarrez une application sur le serveur pour commencer la transmission."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:419
|
||||
#: client/scenes/lobby_gui.cpp:333
|
||||
msgid "Start an application on your computer or select one to start streaming."
|
||||
msgstr ""
|
||||
"Démarrez une application sur le serveur ou depuis la liste pour commencer la "
|
||||
"transmission."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:421
|
||||
#: client/scenes/lobby_gui.cpp:335
|
||||
#, c++-format
|
||||
msgid "Start an application on {} or select one to start streaming."
|
||||
msgstr ""
|
||||
"Démarrez une application sur {} ou depuis la liste pour commencer la "
|
||||
"transmission."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:544
|
||||
#: client/scenes/lobby_gui.cpp:383
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:555
|
||||
#: client/scenes/lobby_gui.cpp:394
|
||||
msgid "Address"
|
||||
msgstr "Adresse"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:564
|
||||
#: client/scenes/lobby_gui.cpp:403
|
||||
msgid "Port"
|
||||
msgstr "Port"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:572
|
||||
#: client/scenes/lobby_gui.cpp:411
|
||||
msgid "TCP only"
|
||||
msgstr "TCP seulement"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:579
|
||||
#: client/scenes/lobby_gui.cpp:418
|
||||
msgid "Cancel"
|
||||
msgstr "Annuler"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:593
|
||||
#: client/scenes/lobby_gui.cpp:432
|
||||
msgid "Save"
|
||||
msgstr "Enregistrer"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:646
|
||||
#: client/scenes/lobby_gui.cpp:485
|
||||
msgid ""
|
||||
"Start a WiVRn server on your\n"
|
||||
"local network"
|
||||
@@ -143,32 +143,32 @@ msgstr ""
|
||||
"Démarrez un serveur WiVRn sur\n"
|
||||
"le réseau local"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:678
|
||||
#: client/scenes/lobby_gui.cpp:517
|
||||
msgid "Autoconnect"
|
||||
msgstr "Autoconnexion"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:704
|
||||
#: client/scenes/lobby_gui.cpp:543
|
||||
msgid "Connect"
|
||||
msgstr "Connexion"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:714 client/wivrn_client.cpp:186
|
||||
#: client/scenes/lobby_gui.cpp:553 client/wivrn_client.cpp:186
|
||||
msgid "Incompatible server version"
|
||||
msgstr "Version du serveur incompatible"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:716
|
||||
#: client/scenes/lobby_gui.cpp:555
|
||||
msgid "Server not available"
|
||||
msgstr "Serveur non disponible"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:802
|
||||
#: client/scenes/lobby_gui.cpp:641
|
||||
msgid "Refresh rate"
|
||||
msgstr "Taux de rafraichissement"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:802 client/scenes/lobby_gui.cpp:804
|
||||
#: client/scenes/lobby_gui.cpp:641 client/scenes/lobby_gui.cpp:643
|
||||
msgctxt "automatic refresh rate"
|
||||
msgid "Automatic"
|
||||
msgstr "Automatique"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:811
|
||||
#: client/scenes/lobby_gui.cpp:650
|
||||
msgid ""
|
||||
"Select refresh rate based on measured application performance.\n"
|
||||
"May cause flicker when a change happens."
|
||||
@@ -177,59 +177,59 @@ msgstr ""
|
||||
"des performances mesurées.\n"
|
||||
"Peut causer des clignotements lors du changement de fréquence."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:828
|
||||
#: client/scenes/lobby_gui.cpp:667
|
||||
msgid "Minimum refresh rate"
|
||||
msgstr "Taux minimal"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:851
|
||||
#: client/scenes/lobby_gui.cpp:690
|
||||
msgid "Resolution scale"
|
||||
msgstr "Échelle"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:855 client/scenes/lobby_gui.cpp:1101
|
||||
#: client/scenes/lobby_gui.cpp:694 client/scenes/lobby_gui.cpp:933
|
||||
#, c-format, c++-format
|
||||
msgid "%d%% - {}x{} per eye"
|
||||
msgstr "%d%% - {}x{} par œil"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:866 client/scenes/lobby_gui.cpp:1112
|
||||
#: client/scenes/lobby_gui.cpp:705 client/scenes/lobby_gui.cpp:944
|
||||
#, c++-format
|
||||
msgid "Resolution larger than {}x{} may not be supported by the headset"
|
||||
msgstr "Les résolutions plus grandes que {}x{} pourraient ne pas fonctionner"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:872
|
||||
#: client/scenes/lobby_gui.cpp:711
|
||||
msgid "Enable microphone"
|
||||
msgstr "Activer le micro"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:881
|
||||
#: client/scenes/lobby_gui.cpp:720
|
||||
msgid "Unprocessed Microphone Audio"
|
||||
msgstr "Utiliser les données brutes du micro"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:887
|
||||
#: client/scenes/lobby_gui.cpp:726
|
||||
msgid "Force disable audio filters, such as noise cancellation"
|
||||
msgstr "Désactive les traitements tels que la suppression du bruit"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:894
|
||||
#: client/scenes/lobby_gui.cpp:733
|
||||
msgid "Enable hand tracking"
|
||||
msgstr "Activer le suivi des mains"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:900 client/scenes/lobby_gui.cpp:912
|
||||
#: client/scenes/lobby_gui.cpp:924 client/scenes/lobby_gui.cpp:940
|
||||
#: client/scenes/lobby_gui.cpp:990
|
||||
#: client/scenes/lobby_gui.cpp:739 client/scenes/lobby_gui.cpp:751
|
||||
#: client/scenes/lobby_gui.cpp:763 client/scenes/lobby_gui.cpp:779
|
||||
#: client/scenes/lobby_gui.cpp:829
|
||||
msgid "This feature is not supported by your headset"
|
||||
msgstr "Cette fonctionnalité n'est pas supportée par le casque"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:906
|
||||
#: client/scenes/lobby_gui.cpp:745
|
||||
msgid "Enable eye tracking"
|
||||
msgstr "Activer le suivi des yeux"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:918
|
||||
#: client/scenes/lobby_gui.cpp:757
|
||||
msgid "Enable face tracking"
|
||||
msgstr "Activer le suivi du visage"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:931
|
||||
#: client/scenes/lobby_gui.cpp:770
|
||||
msgid "Enable body tracking"
|
||||
msgstr "Activer le suivi du corps"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:947
|
||||
#: client/scenes/lobby_gui.cpp:786
|
||||
msgid ""
|
||||
"Requires 'Hand and body tracking' to be enabled in the Quest movement "
|
||||
"tracking settings,\n"
|
||||
@@ -240,11 +240,11 @@ msgstr ""
|
||||
"suivi des mouvements du casque.\n"
|
||||
"Sinon les positions seront déduites de celles des manettes et casque."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:960
|
||||
#: client/scenes/lobby_gui.cpp:799
|
||||
msgid "Enable lower body tracking"
|
||||
msgstr "Activer le suivi du bas du corps"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:966
|
||||
#: client/scenes/lobby_gui.cpp:805
|
||||
msgid ""
|
||||
"Estimate lower body joint positions using Generative Legs\n"
|
||||
"Requires 'Hand and body tracking' to be enabled in the Quest movement "
|
||||
@@ -255,11 +255,11 @@ msgstr ""
|
||||
"paramètres\n"
|
||||
"de suivi de mouvements du casque."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:969
|
||||
#: client/scenes/lobby_gui.cpp:808
|
||||
msgid "Enable hip tracking"
|
||||
msgstr "Activer le suivi des hanches"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:975
|
||||
#: client/scenes/lobby_gui.cpp:814
|
||||
msgid ""
|
||||
"Only takes affect with lower body tracking enabled\n"
|
||||
"May be desired when using another source of hip tracking"
|
||||
@@ -267,33 +267,19 @@ msgstr ""
|
||||
"N'a d'effet que si le suivi du bas du corps est activé.\n"
|
||||
"Peut être utile si les hanches sont suivies via un autre moyen."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:983
|
||||
#: client/scenes/lobby_gui.cpp:822
|
||||
msgid "Enable video passthrough in lobby"
|
||||
msgstr "Activer la vue réelle dans l'accueil"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:994
|
||||
msgid "Enable in-stream window"
|
||||
msgstr "Activer la fenêtre WiVRn lors de la transmission"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:997
|
||||
msgid ""
|
||||
"Enables the configuration window to be shown while the game is streaming.\n"
|
||||
"If enabled, the window is activated by pressing both thumbsticks."
|
||||
msgstr ""
|
||||
"Permet à la fenêtre de configuration d'être affichée pendant la transmission "
|
||||
"du jeu.\n"
|
||||
"Lorsque activé, la fenêtre peut être affichée en appuyant sur les deux "
|
||||
"sticks."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1011 client/scenes/stream_gui.cpp:434
|
||||
#: client/scenes/lobby_gui.cpp:843 client/scenes/stream_gui.cpp:434
|
||||
msgid "OpenXR post-processing"
|
||||
msgstr "Post-traitement OpenXR"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1015 client/scenes/stream_gui.cpp:438
|
||||
#: client/scenes/lobby_gui.cpp:847 client/scenes/stream_gui.cpp:438
|
||||
msgid "Supersampling"
|
||||
msgstr "Suréchantillonnage"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1035 client/scenes/stream_gui.cpp:459
|
||||
#: client/scenes/lobby_gui.cpp:867 client/scenes/stream_gui.cpp:459
|
||||
msgid ""
|
||||
"Reduce flicker for high contrast edges.\n"
|
||||
"Useful when the input resolution is high compared to the headset display"
|
||||
@@ -301,11 +287,11 @@ msgstr ""
|
||||
"Réduit le scintillement des contours à haut contraste.\n"
|
||||
"Utile quand la résolution d’entrée est haute comparée à l’écran du casque"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1040 client/scenes/stream_gui.cpp:464
|
||||
#: client/scenes/lobby_gui.cpp:872 client/scenes/stream_gui.cpp:464
|
||||
msgid "Sharpening"
|
||||
msgstr "Affinage de netteté"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1060 client/scenes/stream_gui.cpp:485
|
||||
#: client/scenes/lobby_gui.cpp:892 client/scenes/stream_gui.cpp:485
|
||||
msgid ""
|
||||
"Improve clarity of high contrast edges and counteract blur.\n"
|
||||
"Useful when the input resolution is low compared to the headset display"
|
||||
@@ -313,11 +299,11 @@ msgstr ""
|
||||
"Améliore la clarté des contours à haut contraste et réduit le flou.\n"
|
||||
"Utile quand la résolution d’entrée est basse comparée à l’écran du casque"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1069
|
||||
#: client/scenes/lobby_gui.cpp:901
|
||||
msgid "Enable Snapdragon Game Super Resolution"
|
||||
msgstr "Activer Snapdragon Game Super Resolution"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1077
|
||||
#: client/scenes/lobby_gui.cpp:909
|
||||
msgid ""
|
||||
"On this headset, this setting has been fully superseded by the native "
|
||||
"Sharpening setting above.\n"
|
||||
@@ -327,157 +313,157 @@ msgstr ""
|
||||
"de netteté ci-dessus.\n"
|
||||
"N’activer que si vous savez ce que vous faites."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1079
|
||||
#: client/scenes/lobby_gui.cpp:911
|
||||
msgid ""
|
||||
"Client-side upscaling and sharpening, adds a performance cost on the headset"
|
||||
msgstr ""
|
||||
"Mise à l’échelle et affinage de netteté, ajoute un coût en performances pour "
|
||||
"le casque"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1097
|
||||
#: client/scenes/lobby_gui.cpp:929
|
||||
msgid "Upscaling factor"
|
||||
msgstr "Échelle"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1116
|
||||
#: client/scenes/lobby_gui.cpp:948
|
||||
msgid "Use edge direction"
|
||||
msgstr "Utiliser la direction de contours"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1122
|
||||
#: client/scenes/lobby_gui.cpp:954
|
||||
msgid "Adds an additional performance cost"
|
||||
msgstr "Ajoute un coût additionnel en performances"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1127
|
||||
#: client/scenes/lobby_gui.cpp:959
|
||||
msgid "Edge threshold"
|
||||
msgstr "Seuil de contour"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1134 client/scenes/lobby_gui.cpp:1143
|
||||
#: client/scenes/lobby_gui.cpp:966 client/scenes/lobby_gui.cpp:975
|
||||
#, c++-format
|
||||
msgid "Recommended: {:.1f}"
|
||||
msgstr "Recommandé : {:.1f}"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1137
|
||||
#: client/scenes/lobby_gui.cpp:969
|
||||
msgid "Edge sharpness"
|
||||
msgstr "Netteté de contour"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1239 client/scenes/lobby_gui.cpp:1247
|
||||
#: client/scenes/lobby_gui.cpp:1071 client/scenes/lobby_gui.cpp:1079
|
||||
#: client/scenes/stream_gui.cpp:222 client/scenes/stream_gui.cpp:418
|
||||
msgid "CPU time"
|
||||
msgstr "Temps CPU"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1243
|
||||
#: client/scenes/lobby_gui.cpp:1075
|
||||
msgid "CPU time [ms]"
|
||||
msgstr "Temps CPU [ms]"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1253 client/scenes/lobby_gui.cpp:1261
|
||||
#: client/scenes/lobby_gui.cpp:1085 client/scenes/lobby_gui.cpp:1093
|
||||
#: client/scenes/stream_gui.cpp:224 client/scenes/stream_gui.cpp:419
|
||||
msgid "GPU time"
|
||||
msgstr "Temps GPU"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1257
|
||||
#: client/scenes/lobby_gui.cpp:1089
|
||||
msgid "GPU time [ms]"
|
||||
msgstr "Temps GPU [ms]"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1300
|
||||
#: client/scenes/lobby_gui.cpp:1132
|
||||
msgid "Enable the microphone?"
|
||||
msgstr "Activer le micro ?"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1305
|
||||
#: client/scenes/lobby_gui.cpp:1137
|
||||
msgid "Enable eye tracking?"
|
||||
msgstr "Activer le suivi des yeux ?"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1310
|
||||
#: client/scenes/lobby_gui.cpp:1142
|
||||
msgid "Enable face tracking?"
|
||||
msgstr "Activer le suivi du visage ?"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1315
|
||||
#: client/scenes/lobby_gui.cpp:1147
|
||||
msgid "Enable body tracking?"
|
||||
msgstr "Activer le suivi du corps ?"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1323
|
||||
#: client/scenes/lobby_gui.cpp:1155
|
||||
msgid "Welcome to WiVRn"
|
||||
msgstr "Bienvenue sur WiVRn"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1347
|
||||
#: client/scenes/lobby_gui.cpp:1179
|
||||
msgid "Yes"
|
||||
msgstr "Oui"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1354
|
||||
#: client/scenes/lobby_gui.cpp:1186
|
||||
msgid "No"
|
||||
msgstr "Non"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1373 client/scenes/lobby_gui.cpp:2012
|
||||
#: client/scenes/lobby_gui.cpp:1205 client/scenes/lobby_gui.cpp:1844
|
||||
msgid "Licenses"
|
||||
msgstr "Licences"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1687
|
||||
#: client/scenes/lobby_gui.cpp:1519
|
||||
msgid "Microphone is enabled"
|
||||
msgstr "Le micro est activé"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1688
|
||||
#: client/scenes/lobby_gui.cpp:1520
|
||||
msgid "Microphone is disabled"
|
||||
msgstr "Le micro est désactivé"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1697
|
||||
#: client/scenes/lobby_gui.cpp:1529
|
||||
msgid "Hand tracking is enabled"
|
||||
msgstr "Le suivi des mains est activé"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1698
|
||||
#: client/scenes/lobby_gui.cpp:1530
|
||||
msgid "Hand tracking is disabled"
|
||||
msgstr "Le suivi des mains est désactivé"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1707
|
||||
#: client/scenes/lobby_gui.cpp:1539
|
||||
msgid "Eye tracking is enabled"
|
||||
msgstr "Le suivi des yeux est activé"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1708
|
||||
#: client/scenes/lobby_gui.cpp:1540
|
||||
msgid "Eye tracking is disabled"
|
||||
msgstr "Le suivi des yeux est désactivé"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1721
|
||||
#: client/scenes/lobby_gui.cpp:1553
|
||||
msgid "Face tracking is enabled"
|
||||
msgstr "Le suivi du visage est activé"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1722
|
||||
#: client/scenes/lobby_gui.cpp:1554
|
||||
msgid "Face tracking is disabled"
|
||||
msgstr "Le suivi du visage est désactivé"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1732
|
||||
#: client/scenes/lobby_gui.cpp:1564
|
||||
msgid "Body tracking is enabled"
|
||||
msgstr "Le suivi du corps est activé"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1733
|
||||
#: client/scenes/lobby_gui.cpp:1565
|
||||
msgid "Body tracking is disabled"
|
||||
msgstr "Le suivi du corps est désactivé"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1749
|
||||
#: client/scenes/lobby_gui.cpp:1581
|
||||
msgid "Add server"
|
||||
msgstr "Ajouter un serveur"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1994
|
||||
#: client/scenes/lobby_gui.cpp:1826
|
||||
msgid "Server list"
|
||||
msgstr "Serveurs"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1997 client/scenes/stream_gui.cpp:798
|
||||
#: client/scenes/lobby_gui.cpp:1829 client/scenes/stream_gui.cpp:796
|
||||
msgid "Settings"
|
||||
msgstr "Paramètres"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:2000
|
||||
#: client/scenes/lobby_gui.cpp:1832
|
||||
msgid "Post-processing"
|
||||
msgstr "Post-traitement"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:2004
|
||||
#: client/scenes/lobby_gui.cpp:1836
|
||||
msgid "Debug"
|
||||
msgstr "Debug"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:2009
|
||||
#: client/scenes/lobby_gui.cpp:1841
|
||||
msgid "About"
|
||||
msgstr "À propos"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:2015
|
||||
#: client/scenes/lobby_gui.cpp:1847
|
||||
msgid "Exit"
|
||||
msgstr "Quitter"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:2032
|
||||
#: client/scenes/lobby_gui.cpp:1864
|
||||
msgid ""
|
||||
"Press the grip button or put your palm up\n"
|
||||
"to move the main window"
|
||||
@@ -485,9 +471,11 @@ msgstr ""
|
||||
"Serrez la gâchette latérale ou pointez la paume\n"
|
||||
"vers le haut pour bouger la fenêtre principale"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:2034
|
||||
#: client/scenes/lobby_gui.cpp:1866
|
||||
msgid "Press the grip button to move the main window"
|
||||
msgstr "Serrez la gâchette latérale pour bouger la fenêtre principale"
|
||||
msgstr ""
|
||||
"Serrez la gâchette latérale pour bouger la\n"
|
||||
"fenêtre principale"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:224
|
||||
msgid "Reproject"
|
||||
@@ -553,9 +541,11 @@ msgstr "Latence mouvement à photons estimée: {}ms"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:396
|
||||
msgid "Press the grip button to move the window"
|
||||
msgstr "Serrez la gâchette latérale pour bouger la fenêtre"
|
||||
msgstr ""
|
||||
"Serrez la gâchette latérale pour bouger\n"
|
||||
"la fenêtre"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:398 client/scenes/stream_gui.cpp:752
|
||||
#: client/scenes/stream_gui.cpp:398 client/scenes/stream_gui.cpp:750
|
||||
msgid "Press both thumbsticks to display the WiVRn window"
|
||||
msgstr "Appuyez sur les deux sticks pour afficher la fenêtre de WiVRn"
|
||||
|
||||
@@ -597,15 +587,15 @@ msgstr "Utiliser le stick pour bouger le centre de fovéation"
|
||||
msgid "Press A to save or B to cancel"
|
||||
msgstr "A pour sauvegarder, B pour annuler"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:795
|
||||
#: client/scenes/stream_gui.cpp:793
|
||||
msgid "Stats"
|
||||
msgstr "Statistiques"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:804
|
||||
#: client/scenes/stream_gui.cpp:802
|
||||
msgid "Statistics overlay"
|
||||
msgstr "Statistiques seules"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:807
|
||||
#: client/scenes/stream_gui.cpp:805
|
||||
msgid "Compact view"
|
||||
msgstr "Vue compacte"
|
||||
|
||||
|
||||
+104
-114
@@ -5,15 +5,15 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WiVRn 0.15\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-08-12 13:35+0200\n"
|
||||
"PO-Revision-Date: 2025-08-12 13:41+0200\n"
|
||||
"POT-Creation-Date: 2025-07-30 09:41+0200\n"
|
||||
"PO-Revision-Date: 2025-07-30 09:59+0200\n"
|
||||
"Last-Translator: Albano Battistella <albanobattistella@gmail.com>\n"
|
||||
"Language-Team: Italian <>\n"
|
||||
"Language: Italian\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Gtranslator 48.0\n"
|
||||
"X-Generator: Gtranslator 47.1\n"
|
||||
|
||||
#: client/scene.cpp:74
|
||||
msgid "No supported swapchain format"
|
||||
@@ -42,98 +42,98 @@ msgstr "Impossibile connettersi a {} ({}): {}"
|
||||
msgid "Waiting for connection"
|
||||
msgstr "In attesa di connessione"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:230
|
||||
#: client/scenes/lobby_gui.cpp:156
|
||||
msgctxt "openxr_post_processing"
|
||||
msgid "Normal"
|
||||
msgstr "Normale"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:233
|
||||
#: client/scenes/lobby_gui.cpp:159
|
||||
msgctxt "openxr_post_processing"
|
||||
msgid "Quality"
|
||||
msgstr "Alta qualità"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:235
|
||||
#: client/scenes/lobby_gui.cpp:161
|
||||
msgctxt "openxr_post_processing"
|
||||
msgid "Disabled"
|
||||
msgstr "Disattivato"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:243 client/scenes/lobby_gui.cpp:400
|
||||
#: client/scenes/stream_gui.cpp:814
|
||||
#: client/scenes/lobby_gui.cpp:169 client/scenes/lobby_gui.cpp:320
|
||||
#: client/scenes/stream_gui.cpp:812
|
||||
msgid "Disconnect"
|
||||
msgstr "Sconnetti"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:264 client/scenes/stream_gui.cpp:810
|
||||
#: client/scenes/lobby_gui.cpp:189 client/scenes/stream_gui.cpp:808
|
||||
msgid "Close"
|
||||
msgstr "Chiudi"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:270
|
||||
#: client/scenes/lobby_gui.cpp:195
|
||||
msgid "Connection"
|
||||
msgstr "Connessione"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:272
|
||||
#: client/scenes/lobby_gui.cpp:197
|
||||
#, c++-format
|
||||
msgid "Connection to {}"
|
||||
msgstr "Connessione a {}"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:302
|
||||
#: client/scenes/lobby_gui.cpp:227
|
||||
msgid "PIN"
|
||||
msgstr "PIN"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:324
|
||||
#: client/scenes/lobby_gui.cpp:249
|
||||
msgid "Input the PIN displayed on the dashboard"
|
||||
msgstr "Digitare il PIN visibile sul server"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:395
|
||||
#: client/scenes/lobby_gui.cpp:315
|
||||
msgid "Connected to WiVRn server"
|
||||
msgstr "Connesso al server WiVRn"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:397
|
||||
#: client/scenes/lobby_gui.cpp:317
|
||||
#, c++-format
|
||||
msgid "Connected to {}"
|
||||
msgstr "Connesso a {}"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:407
|
||||
#: client/scenes/lobby_gui.cpp:327
|
||||
msgid "Start an application on the server to start streaming."
|
||||
msgstr "Avvia un applicazione sul server per incominciare a trasmettere."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:419
|
||||
#: client/scenes/lobby_gui.cpp:333
|
||||
msgid "Start an application on your computer or select one to start streaming."
|
||||
msgstr ""
|
||||
"Avvia un applicazione sul computer o scegli dalla lista per incominciare a "
|
||||
"trasmettere."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:421
|
||||
#: client/scenes/lobby_gui.cpp:335
|
||||
#, c++-format
|
||||
msgid "Start an application on {} or select one to start streaming."
|
||||
msgstr ""
|
||||
"Avvia un applicazione su {} o scegli dalla lista per incominciare a "
|
||||
"trasmettere."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:544
|
||||
#: client/scenes/lobby_gui.cpp:383
|
||||
msgid "Name"
|
||||
msgstr "Nome"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:555
|
||||
#: client/scenes/lobby_gui.cpp:394
|
||||
msgid "Address"
|
||||
msgstr "Indirizzo"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:564
|
||||
#: client/scenes/lobby_gui.cpp:403
|
||||
msgid "Port"
|
||||
msgstr "Porta"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:572
|
||||
#: client/scenes/lobby_gui.cpp:411
|
||||
msgid "TCP only"
|
||||
msgstr "Solo TCP"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:579
|
||||
#: client/scenes/lobby_gui.cpp:418
|
||||
msgid "Cancel"
|
||||
msgstr "Annulla"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:593
|
||||
#: client/scenes/lobby_gui.cpp:432
|
||||
msgid "Save"
|
||||
msgstr "Salva"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:646
|
||||
#: client/scenes/lobby_gui.cpp:485
|
||||
msgid ""
|
||||
"Start a WiVRn server on your\n"
|
||||
"local network"
|
||||
@@ -141,32 +141,32 @@ msgstr ""
|
||||
"Avvia un server WiVRn sulla\n"
|
||||
"rete locale"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:678
|
||||
#: client/scenes/lobby_gui.cpp:517
|
||||
msgid "Autoconnect"
|
||||
msgstr "Connessione automatica"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:704
|
||||
#: client/scenes/lobby_gui.cpp:543
|
||||
msgid "Connect"
|
||||
msgstr "Connetti"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:714 client/wivrn_client.cpp:186
|
||||
#: client/scenes/lobby_gui.cpp:553 client/wivrn_client.cpp:186
|
||||
msgid "Incompatible server version"
|
||||
msgstr "Versione del server incompatibile"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:716
|
||||
#: client/scenes/lobby_gui.cpp:555
|
||||
msgid "Server not available"
|
||||
msgstr "Server non disponibile"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:802
|
||||
#: client/scenes/lobby_gui.cpp:641
|
||||
msgid "Refresh rate"
|
||||
msgstr "Frequenza di aggiornamento"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:802 client/scenes/lobby_gui.cpp:804
|
||||
#: client/scenes/lobby_gui.cpp:641 client/scenes/lobby_gui.cpp:643
|
||||
msgctxt "automatic refresh rate"
|
||||
msgid "Automatic"
|
||||
msgstr "Automatica"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:811
|
||||
#: client/scenes/lobby_gui.cpp:650
|
||||
msgid ""
|
||||
"Select refresh rate based on measured application performance.\n"
|
||||
"May cause flicker when a change happens."
|
||||
@@ -175,60 +175,60 @@ msgstr ""
|
||||
"misurate dell'applicazione.\n"
|
||||
"Può causare un flash quando avviene il cambiamento."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:828
|
||||
#: client/scenes/lobby_gui.cpp:667
|
||||
msgid "Minimum refresh rate"
|
||||
msgstr "Frequenza minima"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:851
|
||||
#: client/scenes/lobby_gui.cpp:690
|
||||
msgid "Resolution scale"
|
||||
msgstr "Scala di risoluzione"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:855 client/scenes/lobby_gui.cpp:1101
|
||||
#: client/scenes/lobby_gui.cpp:694 client/scenes/lobby_gui.cpp:933
|
||||
#, c-format, c++-format
|
||||
msgid "%d%% - {}x{} per eye"
|
||||
msgstr "%d%% - {}x{} per occhio"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:866 client/scenes/lobby_gui.cpp:1112
|
||||
#: client/scenes/lobby_gui.cpp:705 client/scenes/lobby_gui.cpp:944
|
||||
#, c++-format
|
||||
msgid "Resolution larger than {}x{} may not be supported by the headset"
|
||||
msgstr ""
|
||||
"Le risoluzioni superiori a {}x{} potrebbero non essere supportate dal visore"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:872
|
||||
#: client/scenes/lobby_gui.cpp:711
|
||||
msgid "Enable microphone"
|
||||
msgstr "Attiva il microfono"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:881
|
||||
#: client/scenes/lobby_gui.cpp:720
|
||||
msgid "Unprocessed Microphone Audio"
|
||||
msgstr "Usare dati grezzi del microfono"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:887
|
||||
#: client/scenes/lobby_gui.cpp:726
|
||||
msgid "Force disable audio filters, such as noise cancellation"
|
||||
msgstr "Disattiva gli effetti come la cancellazione del rumore"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:894
|
||||
#: client/scenes/lobby_gui.cpp:733
|
||||
msgid "Enable hand tracking"
|
||||
msgstr "Abilita il tracciamento delle mani"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:900 client/scenes/lobby_gui.cpp:912
|
||||
#: client/scenes/lobby_gui.cpp:924 client/scenes/lobby_gui.cpp:940
|
||||
#: client/scenes/lobby_gui.cpp:990
|
||||
#: client/scenes/lobby_gui.cpp:739 client/scenes/lobby_gui.cpp:751
|
||||
#: client/scenes/lobby_gui.cpp:763 client/scenes/lobby_gui.cpp:779
|
||||
#: client/scenes/lobby_gui.cpp:829
|
||||
msgid "This feature is not supported by your headset"
|
||||
msgstr "Questa funzionalità non è supportata dal visore"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:906
|
||||
#: client/scenes/lobby_gui.cpp:745
|
||||
msgid "Enable eye tracking"
|
||||
msgstr "Abilita il tracciamento oculare"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:918
|
||||
#: client/scenes/lobby_gui.cpp:757
|
||||
msgid "Enable face tracking"
|
||||
msgstr "Abilita il tracciamento facciale"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:931
|
||||
#: client/scenes/lobby_gui.cpp:770
|
||||
msgid "Enable body tracking"
|
||||
msgstr "Abilita il tracciamento del corpo"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:947
|
||||
#: client/scenes/lobby_gui.cpp:786
|
||||
msgid ""
|
||||
"Requires 'Hand and body tracking' to be enabled in the Quest movement "
|
||||
"tracking settings,\n"
|
||||
@@ -241,11 +241,11 @@ msgstr ""
|
||||
"controller e\n"
|
||||
"del visore."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:960
|
||||
#: client/scenes/lobby_gui.cpp:799
|
||||
msgid "Enable lower body tracking"
|
||||
msgstr "Abilita il tracciamento del basso del corpo"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:966
|
||||
#: client/scenes/lobby_gui.cpp:805
|
||||
msgid ""
|
||||
"Estimate lower body joint positions using Generative Legs\n"
|
||||
"Requires 'Hand and body tracking' to be enabled in the Quest movement "
|
||||
@@ -256,11 +256,11 @@ msgstr ""
|
||||
"impostazioni,\n"
|
||||
"sezione \"Tracking dei movimenti\"."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:969
|
||||
#: client/scenes/lobby_gui.cpp:808
|
||||
msgid "Enable hip tracking"
|
||||
msgstr "Abilitia il tracciamento delle anche"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:975
|
||||
#: client/scenes/lobby_gui.cpp:814
|
||||
msgid ""
|
||||
"Only takes affect with lower body tracking enabled\n"
|
||||
"May be desired when using another source of hip tracking"
|
||||
@@ -269,31 +269,19 @@ msgstr ""
|
||||
"Può essere utile se un altro metodo viene usato per il tracciamento\n"
|
||||
"delle anche."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:983
|
||||
#: client/scenes/lobby_gui.cpp:822
|
||||
msgid "Enable video passthrough in lobby"
|
||||
msgstr "Abilita la visualizzazione reale in ingresso"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:994
|
||||
msgid "Enable in-stream window"
|
||||
msgstr "Attiva la finestra di WiVRn durante la trasmissione"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:997
|
||||
msgid ""
|
||||
"Enables the configuration window to be shown while the game is streaming.\n"
|
||||
"If enabled, the window is activated by pressing both thumbsticks."
|
||||
msgstr ""
|
||||
"Abilita la finestra di configurazione quando il gioco viene trasmesso.\n"
|
||||
"Se selezionato, la finestra può essere attivata premendo entrambi gli stick."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1011 client/scenes/stream_gui.cpp:434
|
||||
#: client/scenes/lobby_gui.cpp:843 client/scenes/stream_gui.cpp:434
|
||||
msgid "OpenXR post-processing"
|
||||
msgstr "Post-trattamento OpenXR"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1015 client/scenes/stream_gui.cpp:438
|
||||
#: client/scenes/lobby_gui.cpp:847 client/scenes/stream_gui.cpp:438
|
||||
msgid "Supersampling"
|
||||
msgstr "Supersamping"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1035 client/scenes/stream_gui.cpp:459
|
||||
#: client/scenes/lobby_gui.cpp:867 client/scenes/stream_gui.cpp:459
|
||||
msgid ""
|
||||
"Reduce flicker for high contrast edges.\n"
|
||||
"Useful when the input resolution is high compared to the headset display"
|
||||
@@ -301,11 +289,11 @@ msgstr ""
|
||||
"Riduce i lampeggiamenti sui bordi ad alto contrasto.\n"
|
||||
"Utile quando la risoluzine d'entrata è alta in confronto a quella del visore"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1040 client/scenes/stream_gui.cpp:464
|
||||
#: client/scenes/lobby_gui.cpp:872 client/scenes/stream_gui.cpp:464
|
||||
msgid "Sharpening"
|
||||
msgstr "Miglioramento della nitidezza"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1060 client/scenes/stream_gui.cpp:485
|
||||
#: client/scenes/lobby_gui.cpp:892 client/scenes/stream_gui.cpp:485
|
||||
msgid ""
|
||||
"Improve clarity of high contrast edges and counteract blur.\n"
|
||||
"Useful when the input resolution is low compared to the headset display"
|
||||
@@ -314,168 +302,168 @@ msgstr ""
|
||||
"Utile quando la risoluzione d'entrate è bassa in contronto a quella del "
|
||||
"visore"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1069
|
||||
#: client/scenes/lobby_gui.cpp:901
|
||||
msgid "Enable Snapdragon Game Super Resolution"
|
||||
msgstr "Attivare Snapdragon Game Super Resolution"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1077
|
||||
#: client/scenes/lobby_gui.cpp:909
|
||||
msgid ""
|
||||
"On this headset, this setting has been fully superseded by the native "
|
||||
"Sharpening setting above.\n"
|
||||
"Only enable if you know what you're doing."
|
||||
msgstr "Su questo visore è consigliato usare il post-trattamento OpenXR."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1079
|
||||
#: client/scenes/lobby_gui.cpp:911
|
||||
msgid ""
|
||||
"Client-side upscaling and sharpening, adds a performance cost on the headset"
|
||||
msgstr ""
|
||||
"Aumento della risoluzione e nitidezza sul visore, diminuisce le prestazioni "
|
||||
"sul visore"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1097
|
||||
#: client/scenes/lobby_gui.cpp:929
|
||||
msgid "Upscaling factor"
|
||||
msgstr "Aumento di risoluzione"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1116
|
||||
#: client/scenes/lobby_gui.cpp:948
|
||||
msgid "Use edge direction"
|
||||
msgstr "Usare la direzione dei bordi"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1122
|
||||
#: client/scenes/lobby_gui.cpp:954
|
||||
msgid "Adds an additional performance cost"
|
||||
msgstr "Riduce le prestazioni"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1127
|
||||
#: client/scenes/lobby_gui.cpp:959
|
||||
msgid "Edge threshold"
|
||||
msgstr "Soglia dei bordi"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1134 client/scenes/lobby_gui.cpp:1143
|
||||
#: client/scenes/lobby_gui.cpp:966 client/scenes/lobby_gui.cpp:975
|
||||
#, c++-format
|
||||
msgid "Recommended: {:.1f}"
|
||||
msgstr "Valore consigliato: {:.1f}"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1137
|
||||
#: client/scenes/lobby_gui.cpp:969
|
||||
msgid "Edge sharpness"
|
||||
msgstr "Nitidezza dei bordi"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1239 client/scenes/lobby_gui.cpp:1247
|
||||
#: client/scenes/lobby_gui.cpp:1071 client/scenes/lobby_gui.cpp:1079
|
||||
#: client/scenes/stream_gui.cpp:222 client/scenes/stream_gui.cpp:418
|
||||
msgid "CPU time"
|
||||
msgstr "Tempo CPU"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1243
|
||||
#: client/scenes/lobby_gui.cpp:1075
|
||||
msgid "CPU time [ms]"
|
||||
msgstr "Tempo CPU [ms]"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1253 client/scenes/lobby_gui.cpp:1261
|
||||
#: client/scenes/lobby_gui.cpp:1085 client/scenes/lobby_gui.cpp:1093
|
||||
#: client/scenes/stream_gui.cpp:224 client/scenes/stream_gui.cpp:419
|
||||
msgid "GPU time"
|
||||
msgstr "Tempo GPU"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1257
|
||||
#: client/scenes/lobby_gui.cpp:1089
|
||||
msgid "GPU time [ms]"
|
||||
msgstr "Tempo GPU [ms]"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1300
|
||||
#: client/scenes/lobby_gui.cpp:1132
|
||||
msgid "Enable the microphone?"
|
||||
msgstr "Attivare il microfono?"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1305
|
||||
#: client/scenes/lobby_gui.cpp:1137
|
||||
msgid "Enable eye tracking?"
|
||||
msgstr "Attivare il tracciamento oculare?"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1310
|
||||
#: client/scenes/lobby_gui.cpp:1142
|
||||
msgid "Enable face tracking?"
|
||||
msgstr "Attivare il tracciamento facciale?"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1315
|
||||
#: client/scenes/lobby_gui.cpp:1147
|
||||
msgid "Enable body tracking?"
|
||||
msgstr "Attivare il tracciamento del corpo?"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1323
|
||||
#: client/scenes/lobby_gui.cpp:1155
|
||||
msgid "Welcome to WiVRn"
|
||||
msgstr "Benvenuto su WiVRn"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1347
|
||||
#: client/scenes/lobby_gui.cpp:1179
|
||||
msgid "Yes"
|
||||
msgstr "Sì"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1354
|
||||
#: client/scenes/lobby_gui.cpp:1186
|
||||
msgid "No"
|
||||
msgstr "No"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1373 client/scenes/lobby_gui.cpp:2012
|
||||
#: client/scenes/lobby_gui.cpp:1205 client/scenes/lobby_gui.cpp:1844
|
||||
msgid "Licenses"
|
||||
msgstr "Licenze"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1687
|
||||
#: client/scenes/lobby_gui.cpp:1519
|
||||
msgid "Microphone is enabled"
|
||||
msgstr "Microfono attivo"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1688
|
||||
#: client/scenes/lobby_gui.cpp:1520
|
||||
msgid "Microphone is disabled"
|
||||
msgstr "Microfono disattivato"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1697
|
||||
#: client/scenes/lobby_gui.cpp:1529
|
||||
msgid "Hand tracking is enabled"
|
||||
msgstr "Tracciamento delle mani attivo"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1698
|
||||
#: client/scenes/lobby_gui.cpp:1530
|
||||
msgid "Hand tracking is disabled"
|
||||
msgstr "Tracciamento delle mani disattivato"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1707
|
||||
#: client/scenes/lobby_gui.cpp:1539
|
||||
msgid "Eye tracking is enabled"
|
||||
msgstr "Tracciamento oculare attivo"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1708
|
||||
#: client/scenes/lobby_gui.cpp:1540
|
||||
msgid "Eye tracking is disabled"
|
||||
msgstr "Tracciamento oculare disattivato"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1721
|
||||
#: client/scenes/lobby_gui.cpp:1553
|
||||
msgid "Face tracking is enabled"
|
||||
msgstr "Tracciamento facciale attivato"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1722
|
||||
#: client/scenes/lobby_gui.cpp:1554
|
||||
msgid "Face tracking is disabled"
|
||||
msgstr "Tracciamento facciale disattivato"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1732
|
||||
#: client/scenes/lobby_gui.cpp:1564
|
||||
msgid "Body tracking is enabled"
|
||||
msgstr "Tracciamento del corpo attivato"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1733
|
||||
#: client/scenes/lobby_gui.cpp:1565
|
||||
msgid "Body tracking is disabled"
|
||||
msgstr "Tracciamento del corpo disattivato"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1749
|
||||
#: client/scenes/lobby_gui.cpp:1581
|
||||
msgid "Add server"
|
||||
msgstr "Aggiungi server"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1994
|
||||
#: client/scenes/lobby_gui.cpp:1826
|
||||
msgid "Server list"
|
||||
msgstr "Elenco dei server"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1997 client/scenes/stream_gui.cpp:798
|
||||
#: client/scenes/lobby_gui.cpp:1829 client/scenes/stream_gui.cpp:796
|
||||
msgid "Settings"
|
||||
msgstr "Impostazioni"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:2000
|
||||
#: client/scenes/lobby_gui.cpp:1832
|
||||
msgid "Post-processing"
|
||||
msgstr "Post-trattamento"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:2004
|
||||
#: client/scenes/lobby_gui.cpp:1836
|
||||
msgid "Debug"
|
||||
msgstr "Debug"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:2009
|
||||
#: client/scenes/lobby_gui.cpp:1841
|
||||
msgid "About"
|
||||
msgstr "Informazioni"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:2015
|
||||
#: client/scenes/lobby_gui.cpp:1847
|
||||
msgid "Exit"
|
||||
msgstr "Esci"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:2032
|
||||
#: client/scenes/lobby_gui.cpp:1864
|
||||
msgid ""
|
||||
"Press the grip button or put your palm up\n"
|
||||
"to move the main window"
|
||||
@@ -483,9 +471,11 @@ msgstr ""
|
||||
"Premi il pulsante laterale o punta il palmo della\n"
|
||||
"mano verso l'alto per spostare la finestra principale"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:2034
|
||||
#: client/scenes/lobby_gui.cpp:1866
|
||||
msgid "Press the grip button to move the main window"
|
||||
msgstr "Premi il pulsante laterale per spostare la finestra principale"
|
||||
msgstr ""
|
||||
"Premi il pulsante laterale per\n"
|
||||
"spostare la finestra principale"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:224
|
||||
msgid "Reproject"
|
||||
@@ -553,7 +543,7 @@ msgstr "Latenza stimata da movimento a fotoni: {}ms"
|
||||
msgid "Press the grip button to move the window"
|
||||
msgstr "Premi il pulsante laterale per spostare la finestra"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:398 client/scenes/stream_gui.cpp:752
|
||||
#: client/scenes/stream_gui.cpp:398 client/scenes/stream_gui.cpp:750
|
||||
msgid "Press both thumbsticks to display the WiVRn window"
|
||||
msgstr "Premi entrabli gli stick per mostrare la finestra di WiVRn"
|
||||
|
||||
@@ -595,15 +585,15 @@ msgstr "Usa gli stick per spostare il centro di foveazione"
|
||||
msgid "Press A to save or B to cancel"
|
||||
msgstr "A per salvare, B per annullare"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:795
|
||||
#: client/scenes/stream_gui.cpp:793
|
||||
msgid "Stats"
|
||||
msgstr "Statistiche"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:804
|
||||
#: client/scenes/stream_gui.cpp:802
|
||||
msgid "Statistics overlay"
|
||||
msgstr "Solo statistiche"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:807
|
||||
#: client/scenes/stream_gui.cpp:805
|
||||
msgid "Compact view"
|
||||
msgstr "Modalità compatta"
|
||||
|
||||
|
||||
@@ -4,21 +4,20 @@
|
||||
# SPDX-FileCopyrightText: 2025 Claudio Sampaio (Patola)
|
||||
# LuckShiba <LuckShiba@protonmail.com>, 2025.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2025 myghi63 <myghi63@disroot.org>
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WiVRn-dashboard\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-08-09 22:47+0200\n"
|
||||
"PO-Revision-Date: 2025-08-08 11:56-0300\n"
|
||||
"Last-Translator: myghi63 <myghi63@disroot.org>\n"
|
||||
"POT-Creation-Date: 2025-06-20 19:23-0300\n"
|
||||
"PO-Revision-Date: 2025-06-21 21:55-0300\n"
|
||||
"Last-Translator: LuckShiba <LuckShiba@protonmail.com>\n"
|
||||
"Language-Team: Brazilian Portuguese\n"
|
||||
"Language: pt_BR\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Lokalize 25.04.3\n"
|
||||
"X-Generator: Gtranslator 48.0\n"
|
||||
|
||||
#: dashboard/apk_installer.cpp:167
|
||||
#, kde-format
|
||||
@@ -86,8 +85,8 @@ msgstr "Verificando a última versão..."
|
||||
msgid "No precompiled APK is available for this version."
|
||||
msgstr "Nenhum APK pré-compilado está disponível para esta versão."
|
||||
|
||||
#: dashboard/qml/ApkInstallPage.qml:45 dashboard/qml/Main.qml:259
|
||||
#: dashboard/qml/Main.qml:342
|
||||
#: dashboard/qml/ApkInstallPage.qml:45 dashboard/qml/Main.qml:247
|
||||
#: dashboard/qml/Main.qml:329
|
||||
#, kde-format
|
||||
msgid "ADB is not installed."
|
||||
msgstr "ADB não está instalado."
|
||||
@@ -136,7 +135,7 @@ msgstr "Reinstalar WiVRn"
|
||||
msgid "Install WiVRn"
|
||||
msgstr "Instalar WiVRn"
|
||||
|
||||
#: dashboard/qml/HeadsetsPage.qml:12 dashboard/qml/Main.qml:355
|
||||
#: dashboard/qml/HeadsetsPage.qml:12 dashboard/qml/Main.qml:342
|
||||
#, kde-format
|
||||
msgid "Headsets"
|
||||
msgstr "Headsets"
|
||||
@@ -181,7 +180,7 @@ msgstr "Renomear"
|
||||
|
||||
#: dashboard/qml/HeadsetsPage.qml:55 dashboard/qml/WizardPage.qml:38
|
||||
#: dashboard/qml/WizardPage.qml:88 dashboard/qml/WizardPage.qml:263
|
||||
#: dashboard/qml/WizardPage.qml:327 dashboard/qml/WizardPage.qml:411
|
||||
#: dashboard/qml/WizardPage.qml:326 dashboard/qml/WizardPage.qml:410
|
||||
#, kde-format
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
@@ -232,40 +231,40 @@ msgstr "Parear um novo headset"
|
||||
msgid "Headset statistics"
|
||||
msgstr "Estatísticas do headset"
|
||||
|
||||
#: dashboard/qml/Main.qml:107
|
||||
#: dashboard/qml/Main.qml:103
|
||||
#, kde-format
|
||||
msgid "The server does not have CAP_SYS_NICE capabilities."
|
||||
msgstr "O servidor não tem capabilities CAP_SYS_NICE."
|
||||
|
||||
#: dashboard/qml/Main.qml:114
|
||||
#: dashboard/qml/Main.qml:110
|
||||
#, kde-format
|
||||
msgid "Fix it"
|
||||
msgstr "Conserte"
|
||||
|
||||
#: dashboard/qml/Main.qml:123
|
||||
#: dashboard/qml/Main.qml:119
|
||||
#, kde-format
|
||||
msgid "The CAP_SYS_NICE capability will be used when the server is restarted."
|
||||
msgstr "A capability CAP_SYS_NICE será usada quando o servidor for reiniciado."
|
||||
|
||||
#: dashboard/qml/Main.qml:129
|
||||
#: dashboard/qml/Main.qml:125
|
||||
#, kde-format
|
||||
msgctxt "restart the server"
|
||||
msgid "Restart now"
|
||||
msgstr "Reiniciar agora"
|
||||
|
||||
#: dashboard/qml/Main.qml:140
|
||||
#: dashboard/qml/Main.qml:136
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"NVIDIA GPUs require at least driver version 565.77, current version is %1"
|
||||
msgstr ""
|
||||
"GPUs NVIDIA requerem pelo menos o driver versão 565.77, a versão atual é %1"
|
||||
|
||||
#: dashboard/qml/Main.qml:146
|
||||
#: dashboard/qml/Main.qml:142
|
||||
#, kde-format
|
||||
msgid "More info"
|
||||
msgstr "Mais informações"
|
||||
|
||||
#: dashboard/qml/Main.qml:154
|
||||
#: dashboard/qml/Main.qml:150
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Use the Mesa (radv) driver for AMD GPUs\n"
|
||||
@@ -274,86 +273,76 @@ msgstr ""
|
||||
"Use o driver Mesa (radv) para GPUs AMD\n"
|
||||
"Codificação de hardware com a vaapi não funciona com AMDVLK e AMDGPU-PRO"
|
||||
|
||||
#: dashboard/qml/Main.qml:162
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"No OpenVR compatibility detected, Steam games won't be able to load VR.\n"
|
||||
"Install xrizer or OpenComposite."
|
||||
msgstr ""
|
||||
"Nenhuma compatibilidade com OpenVR foi detectada. Os jogos do Steam não "
|
||||
"conseguirão carregar em VR.\n"
|
||||
"Instale o xrizer ou o OpenComposite."
|
||||
|
||||
#: dashboard/qml/Main.qml:171
|
||||
#: dashboard/qml/Main.qml:159
|
||||
#, kde-format
|
||||
msgid "Server failed to start"
|
||||
msgstr "Servidor falhou em iniciar"
|
||||
|
||||
#: dashboard/qml/Main.qml:177 dashboard/qml/TroubleshootPage.qml:77
|
||||
#: dashboard/qml/Main.qml:165 dashboard/qml/TroubleshootPage.qml:77
|
||||
#, kde-format
|
||||
msgid "Open server logs"
|
||||
msgstr "Abrir logs do servidor"
|
||||
|
||||
#: dashboard/qml/Main.qml:214
|
||||
#: dashboard/qml/Main.qml:202
|
||||
#, kde-format
|
||||
msgctxt "whether the server is running, displayed in front of a checkbox"
|
||||
msgid "Running"
|
||||
msgstr "Rodando"
|
||||
|
||||
#: dashboard/qml/Main.qml:229
|
||||
#: dashboard/qml/Main.qml:217
|
||||
#, kde-format
|
||||
msgctxt "whether pairing is enabled, displayed in front of a checkbox"
|
||||
msgid "Pairing"
|
||||
msgstr "Pareando"
|
||||
|
||||
#: dashboard/qml/Main.qml:242
|
||||
#: dashboard/qml/Main.qml:230
|
||||
#, kde-format
|
||||
msgid "PIN: %1"
|
||||
msgstr "PIN: %1"
|
||||
|
||||
#: dashboard/qml/Main.qml:250 dashboard/qml/WizardPage.qml:374
|
||||
#: dashboard/qml/Main.qml:238 dashboard/qml/WizardPage.qml:373
|
||||
#, kde-format
|
||||
msgid "Connect by USB"
|
||||
msgstr "Conectar pela USB"
|
||||
|
||||
#: dashboard/qml/Main.qml:261
|
||||
#: dashboard/qml/Main.qml:249
|
||||
#, kde-format
|
||||
msgid "No headset is connected or your headset is not in developer mode."
|
||||
msgstr ""
|
||||
"Nenhum headset está conectado ou seu headset não está em modo desenvolvedor."
|
||||
|
||||
#: dashboard/qml/Main.qml:269
|
||||
#: dashboard/qml/Main.qml:257
|
||||
#, kde-format
|
||||
msgid "Disconnect"
|
||||
msgstr "Desconectar"
|
||||
|
||||
#: dashboard/qml/Main.qml:286
|
||||
#: dashboard/qml/Main.qml:274
|
||||
#, kde-format
|
||||
msgctxt "automatically started application"
|
||||
msgid "Application"
|
||||
msgstr "Aplicativo"
|
||||
|
||||
#: dashboard/qml/Main.qml:307
|
||||
#: dashboard/qml/Main.qml:295
|
||||
#, kde-format
|
||||
msgid "Steam information"
|
||||
msgstr "Informações da Steam"
|
||||
|
||||
#: dashboard/qml/Main.qml:326
|
||||
#: dashboard/qml/Main.qml:313
|
||||
#, kde-format
|
||||
msgid "Wizard"
|
||||
msgstr "Assistente"
|
||||
|
||||
#: dashboard/qml/Main.qml:333
|
||||
#: dashboard/qml/Main.qml:320
|
||||
#, kde-format
|
||||
msgid "Install the app"
|
||||
msgstr "Instalar o aplicativo"
|
||||
|
||||
#: dashboard/qml/Main.qml:362 dashboard/qml/SettingsPage.qml:14
|
||||
#: dashboard/qml/Main.qml:349 dashboard/qml/SettingsPage.qml:14
|
||||
#, kde-format
|
||||
msgid "Settings"
|
||||
msgstr "Ajustes"
|
||||
|
||||
#: dashboard/qml/Main.qml:369 dashboard/qml/TroubleshootPage.qml:10
|
||||
#: dashboard/qml/Main.qml:356 dashboard/qml/TroubleshootPage.qml:10
|
||||
#, kde-format
|
||||
msgid "Troubleshoot"
|
||||
msgstr "Resolver problemas"
|
||||
@@ -364,13 +353,13 @@ msgctxt "don't start an application automatically"
|
||||
msgid "None"
|
||||
msgstr "Nenhum"
|
||||
|
||||
#: dashboard/qml/SelectGame.qml:20
|
||||
#: dashboard/qml/SelectGame.qml:21
|
||||
#, kde-format
|
||||
msgctxt "choose a custom application to start"
|
||||
msgid "Custom"
|
||||
msgstr "Personalizado"
|
||||
|
||||
#: dashboard/qml/SelectGame.qml:76
|
||||
#: dashboard/qml/SelectGame.qml:79
|
||||
#, kde-format
|
||||
msgctxt "browse a file to choose the application to start"
|
||||
msgid "Browse"
|
||||
@@ -645,7 +634,7 @@ msgstr "Comando de lançamento da Steam copiado"
|
||||
msgid "I cannot find the WiVRn app on my headset"
|
||||
msgstr "Não consigo encontrar o aplicativo do WiVRn no meu headset"
|
||||
|
||||
#: dashboard/qml/TroubleshootPage.qml:21 dashboard/qml/WizardPage.qml:388
|
||||
#: dashboard/qml/TroubleshootPage.qml:21 dashboard/qml/WizardPage.qml:387
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"If you installed WiVRn over USB on a Meta headset, the app is in the "
|
||||
@@ -659,7 +648,7 @@ msgstr ""
|
||||
msgid "I cannot see my computer in the WiVRn app"
|
||||
msgstr "Não consigo ver meu computador no aplicativo do WiVRn"
|
||||
|
||||
#: dashboard/qml/TroubleshootPage.qml:25 dashboard/qml/WizardPage.qml:393
|
||||
#: dashboard/qml/TroubleshootPage.qml:25 dashboard/qml/WizardPage.qml:392
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"If the server is not visible or the connection fails, check that port 5353 "
|
||||
@@ -713,7 +702,7 @@ msgstr "Pareamento está atualmente desativado."
|
||||
msgid "I have no sound on my headset"
|
||||
msgstr "Eu não tenho som no meu headset"
|
||||
|
||||
#: dashboard/qml/TroubleshootPage.qml:50 dashboard/qml/WizardPage.qml:441
|
||||
#: dashboard/qml/TroubleshootPage.qml:50 dashboard/qml/WizardPage.qml:440
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"When the headset is connected, select \"WiVRn\" as the default audio output "
|
||||
@@ -738,9 +727,9 @@ msgid "Getting started"
|
||||
msgstr "Começando"
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:29 dashboard/qml/WizardPage.qml:78
|
||||
#: dashboard/qml/WizardPage.qml:253 dashboard/qml/WizardPage.qml:317
|
||||
#: dashboard/qml/WizardPage.qml:401 dashboard/qml/WizardPage.qml:448
|
||||
#: dashboard/qml/WizardPage.qml:485
|
||||
#: dashboard/qml/WizardPage.qml:253 dashboard/qml/WizardPage.qml:316
|
||||
#: dashboard/qml/WizardPage.qml:400 dashboard/qml/WizardPage.qml:447
|
||||
#: dashboard/qml/WizardPage.qml:484
|
||||
#, kde-format
|
||||
msgid "Back"
|
||||
msgstr "Voltar"
|
||||
@@ -760,8 +749,8 @@ msgstr ""
|
||||
"ao seu computador."
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:83 dashboard/qml/WizardPage.qml:258
|
||||
#: dashboard/qml/WizardPage.qml:322 dashboard/qml/WizardPage.qml:453
|
||||
#: dashboard/qml/WizardPage.qml:490
|
||||
#: dashboard/qml/WizardPage.qml:321 dashboard/qml/WizardPage.qml:452
|
||||
#: dashboard/qml/WizardPage.qml:489
|
||||
#, kde-format
|
||||
msgid "Next"
|
||||
msgstr "Próximo"
|
||||
@@ -860,12 +849,12 @@ msgstr ""
|
||||
"O aplicativo que você escolher será iniciado automaticamente quando você "
|
||||
"conectar seu headset."
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:301
|
||||
#: dashboard/qml/WizardPage.qml:300
|
||||
#, kde-format
|
||||
msgid "Important information"
|
||||
msgstr "Informação importante"
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:308
|
||||
#: dashboard/qml/WizardPage.qml:307
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"WiVRn entirely replaces SteamVR, you should not start SteamVR while WiVRn is "
|
||||
@@ -874,12 +863,12 @@ msgstr ""
|
||||
"O WiVRn substitui o SteamVR completamente, você não deve iniciar o SteamVR "
|
||||
"enquanto o WiVRn estiver rodando."
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:359
|
||||
#: dashboard/qml/WizardPage.qml:358
|
||||
#, kde-format
|
||||
msgid "Start the WiVRn app on your headset"
|
||||
msgstr "Iniciar o aplicativo do WiVRn no seu headset"
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:364
|
||||
#: dashboard/qml/WizardPage.qml:363
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"To connect over WiFi, start the WiVRn app on your headset, connect to \"%1\" "
|
||||
@@ -888,32 +877,32 @@ msgstr ""
|
||||
"Para conectar pelo WiFi, inicie o aplicativo do WiVRn no seu headset, "
|
||||
"conecte a \"%1\" e entre o PIN \"%2\"."
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:371
|
||||
#: dashboard/qml/WizardPage.qml:370
|
||||
#, kde-format
|
||||
msgid "To connect over USB, click on \"Connect by USB\"."
|
||||
msgstr "Para conectar pela USB, clique em \"Conectar pela USB\"."
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:384
|
||||
#: dashboard/qml/WizardPage.qml:383
|
||||
#, kde-format
|
||||
msgid "Troubleshooting"
|
||||
msgstr "Resolver problemas"
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:406
|
||||
#: dashboard/qml/WizardPage.qml:405
|
||||
#, kde-format
|
||||
msgid "Skip"
|
||||
msgstr "Pular"
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:426
|
||||
#: dashboard/qml/WizardPage.qml:425
|
||||
#, kde-format
|
||||
msgid "Connection established"
|
||||
msgstr "Conexão estabelecida"
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:431
|
||||
#: dashboard/qml/WizardPage.qml:430
|
||||
#, kde-format
|
||||
msgid "Your headset is now connected."
|
||||
msgstr "Seu headset está conectado agora."
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:436 dashboard/qml/WizardPage.qml:478
|
||||
#: dashboard/qml/WizardPage.qml:435 dashboard/qml/WizardPage.qml:477
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"To connect another headset, make sure pairing is enabled in the dashboard "
|
||||
@@ -922,22 +911,22 @@ msgstr ""
|
||||
"Para conectar outro headset, se assegure que o pareamento esteja habilitado "
|
||||
"no painel antes de conectar."
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:458 dashboard/qml/WizardPage.qml:495
|
||||
#: dashboard/qml/WizardPage.qml:457 dashboard/qml/WizardPage.qml:494
|
||||
#, kde-format
|
||||
msgid "Finish"
|
||||
msgstr "Terminar"
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:473
|
||||
#: dashboard/qml/WizardPage.qml:472
|
||||
#, kde-format
|
||||
msgid "Finished"
|
||||
msgstr "Terminado"
|
||||
|
||||
#: dashboard/wivrn_server.cpp:592
|
||||
#: dashboard/wivrn_server.cpp:584
|
||||
#, kde-format
|
||||
msgid "xrizer"
|
||||
msgstr "xrizer"
|
||||
|
||||
#: dashboard/wivrn_server.cpp:593
|
||||
#: dashboard/wivrn_server.cpp:585
|
||||
#, kde-format
|
||||
msgid "Open Composite"
|
||||
msgstr "Open Composite"
|
||||
|
||||
+152
-284
@@ -4,141 +4,134 @@
|
||||
# SPDX-FileCopyrightText: 2025 Claudio Sampaio (Patola)
|
||||
# LuckShiba <LuckShiba@protonmail.com>, 2025.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2025 myghi63 <myghi63@disroot.org>
|
||||
# Claudio Sampaio <patola@gmail.com>, 2025.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WiVRn\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-08-16 14:15+0200\n"
|
||||
"PO-Revision-Date: 2025-08-17 20:58+0200\n"
|
||||
"Last-Translator: Claudio Sampaio <patola@gmail.com>\n"
|
||||
"POT-Creation-Date: 2025-06-20 19:23-0300\n"
|
||||
"PO-Revision-Date: 2025-06-23 05:42-0300\n"
|
||||
"Last-Translator: LuckShiba <LuckShiba@protonmail.com>\n"
|
||||
"Language-Team: Brazilian Portuguese\n"
|
||||
"Language: pt_BR\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Gtranslator 48.0\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
"Language-Team: Brazilian Portuguese\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: client/scene.cpp:74
|
||||
#: client/scenes/lobby.cpp:148
|
||||
msgid "No supported swapchain format"
|
||||
msgstr "Sem formato de cadeia de troca suportado"
|
||||
|
||||
#: client/scenes/lobby.cpp:185
|
||||
#: client/scenes/lobby.cpp:228
|
||||
msgid "Incompatible WiVRn server: no protocol field in TXT"
|
||||
msgstr "Servidor WiVRn incompatível: sem campo protocolo no TXT"
|
||||
|
||||
#: client/scenes/lobby.cpp:188
|
||||
#: client/scenes/lobby.cpp:231
|
||||
#, c++-format
|
||||
msgid "Incompatible WiVRn server protocol (client: {}, server: {})"
|
||||
msgstr "Protocolo incompatível de servidor WiVRn (cliente: {}, servidor: {})"
|
||||
|
||||
#: client/scenes/lobby.cpp:203
|
||||
#: client/scenes/lobby.cpp:246
|
||||
#, c++-format
|
||||
msgid "Cannot resolve hostname: {}"
|
||||
msgstr "Incapaz de resolver hostname: {}"
|
||||
|
||||
#: client/scenes/lobby.cpp:290 client/scenes/lobby.cpp:296
|
||||
#: client/scenes/lobby.cpp:333 client/scenes/lobby.cpp:339
|
||||
#, c++-format
|
||||
msgid "Cannot connect to {} ({}): {}"
|
||||
msgstr "Incapaz de conectar a {} ({}): {}"
|
||||
|
||||
#: client/scenes/lobby.cpp:379
|
||||
#: client/scenes/lobby.cpp:453
|
||||
msgid "Waiting for connection"
|
||||
msgstr "Aguardando conexão"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:230
|
||||
#: client/scenes/lobby_gui.cpp:132
|
||||
msgctxt "openxr_post_processing"
|
||||
msgid "Normal"
|
||||
msgstr "Normal"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:233
|
||||
#: client/scenes/lobby_gui.cpp:135
|
||||
msgctxt "openxr_post_processing"
|
||||
msgid "Quality"
|
||||
msgstr "Qualidade"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:235
|
||||
#: client/scenes/lobby_gui.cpp:137
|
||||
msgctxt "openxr_post_processing"
|
||||
msgid "Disabled"
|
||||
msgstr "Desabilitado"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:243 client/scenes/lobby_gui.cpp:400
|
||||
#: client/scenes/stream_gui.cpp:825
|
||||
#: client/scenes/lobby_gui.cpp:198
|
||||
msgid "Disconnect"
|
||||
msgstr "Desconectar"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:264 client/scenes/stream_gui.cpp:821
|
||||
#: client/scenes/lobby_gui.cpp:204
|
||||
msgid "Video stream interrupted"
|
||||
msgstr "Fluxo de vídeo interrompido"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:206
|
||||
msgid ""
|
||||
"Connection ready\n"
|
||||
"Start a VR application on your computer"
|
||||
msgstr ""
|
||||
"Conexão pronta\n"
|
||||
"Inicie um aplicativo VR no seu computador"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:208
|
||||
#, c++-format
|
||||
msgid ""
|
||||
"Connection ready\n"
|
||||
"Start a VR application on {}"
|
||||
msgstr ""
|
||||
"Conexão pronta\n"
|
||||
"Inicie um aplicativo VR em {}"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:221
|
||||
msgid "Close"
|
||||
msgstr "Fechar"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:270
|
||||
#: client/scenes/lobby_gui.cpp:227
|
||||
msgid "Connection"
|
||||
msgstr "Conexão"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:272
|
||||
#: client/scenes/lobby_gui.cpp:229
|
||||
#, c++-format
|
||||
msgid "Connection to {}"
|
||||
msgstr "Conexão a {}"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:302
|
||||
#: client/scenes/lobby_gui.cpp:259
|
||||
msgid "PIN"
|
||||
msgstr "PIN"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:324
|
||||
#: client/scenes/lobby_gui.cpp:281
|
||||
msgid "Input the PIN displayed on the dashboard"
|
||||
msgstr "Entre o PIN mostrado no painel"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:395
|
||||
msgid "Connected to WiVRn server"
|
||||
msgstr "Conectado ao servidor WiVRn"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:397
|
||||
#, c++-format
|
||||
msgid "Connected to {}"
|
||||
msgstr "Conectado a {}"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:407
|
||||
msgid "Start an application on the server to start streaming."
|
||||
msgstr "Abra um aplicativo no servidor para iniciar o streaming."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:419
|
||||
msgid "Start an application on your computer or select one to start streaming."
|
||||
msgstr ""
|
||||
"Abra um aplicativo no seu computador ou selecione um para iniciar o "
|
||||
"streaming."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:421
|
||||
#, c++-format
|
||||
msgid "Start an application on {} or select one to start streaming."
|
||||
msgstr "Abra um aplicativo em {} ou selecione um para iniciar o streaming."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:544
|
||||
#: client/scenes/lobby_gui.cpp:356
|
||||
msgid "Name"
|
||||
msgstr "Nome"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:555
|
||||
#: client/scenes/lobby_gui.cpp:367
|
||||
msgid "Address"
|
||||
msgstr "Endereço"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:564
|
||||
#: client/scenes/lobby_gui.cpp:376
|
||||
msgid "Port"
|
||||
msgstr "Porta"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:572
|
||||
#: client/scenes/lobby_gui.cpp:384
|
||||
msgid "TCP only"
|
||||
msgstr "TCP somente"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:579
|
||||
#: client/scenes/lobby_gui.cpp:391
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:593
|
||||
#: client/scenes/lobby_gui.cpp:405
|
||||
msgid "Save"
|
||||
msgstr "Salvar"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:646
|
||||
#: client/scenes/lobby_gui.cpp:458
|
||||
msgid ""
|
||||
"Start a WiVRn server on your\n"
|
||||
"local network"
|
||||
@@ -146,32 +139,32 @@ msgstr ""
|
||||
"Inicie um servidor WiVRn em sua\n"
|
||||
"rede local"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:678
|
||||
#: client/scenes/lobby_gui.cpp:490
|
||||
msgid "Autoconnect"
|
||||
msgstr "Autoconectar"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:704
|
||||
#: client/scenes/lobby_gui.cpp:516
|
||||
msgid "Connect"
|
||||
msgstr "Conectar"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:714 client/wivrn_client.cpp:186
|
||||
#: client/scenes/lobby_gui.cpp:526 client/wivrn_client.cpp:186
|
||||
msgid "Incompatible server version"
|
||||
msgstr "Versão de servidor incompatível"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:716
|
||||
#: client/scenes/lobby_gui.cpp:528
|
||||
msgid "Server not available"
|
||||
msgstr "Servidor não disponível"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:802
|
||||
#: client/scenes/lobby_gui.cpp:614
|
||||
msgid "Refresh rate"
|
||||
msgstr "Taxa de atualização"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:802 client/scenes/lobby_gui.cpp:804
|
||||
#: client/scenes/lobby_gui.cpp:614 client/scenes/lobby_gui.cpp:616
|
||||
msgctxt "automatic refresh rate"
|
||||
msgid "Automatic"
|
||||
msgstr "Automático"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:811
|
||||
#: client/scenes/lobby_gui.cpp:623
|
||||
msgid ""
|
||||
"Select refresh rate based on measured application performance.\n"
|
||||
"May cause flicker when a change happens."
|
||||
@@ -179,60 +172,60 @@ msgstr ""
|
||||
"Seleciona a taxa de atualização baseada no desempenho medido do aplicativo.\n"
|
||||
"Pode causar oscilações quando uma alteração ocorrer."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:828
|
||||
#: client/scenes/lobby_gui.cpp:640
|
||||
msgid "Minimum refresh rate"
|
||||
msgstr "Taxa de atualização mínima"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:851
|
||||
#: client/scenes/lobby_gui.cpp:663
|
||||
msgid "Resolution scale"
|
||||
msgstr "Escala de resolução"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:855 client/scenes/lobby_gui.cpp:1101
|
||||
#: client/scenes/lobby_gui.cpp:667 client/scenes/lobby_gui.cpp:971
|
||||
#, c-format, c++-format
|
||||
msgid "%d%% - {}x{} per eye"
|
||||
msgstr "%d%% - {}x{} por olho"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:866 client/scenes/lobby_gui.cpp:1112
|
||||
#: client/scenes/lobby_gui.cpp:678 client/scenes/lobby_gui.cpp:982
|
||||
#, c++-format
|
||||
msgid "Resolution larger than {}x{} may not be supported by the headset"
|
||||
msgstr "Resolução maior que {}x{} pode não ser suportada pelo headset"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:872
|
||||
#: client/scenes/lobby_gui.cpp:684
|
||||
msgid "Enable microphone"
|
||||
msgstr "Ativar microfone"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:881
|
||||
#: client/scenes/lobby_gui.cpp:694
|
||||
msgid "Unprocessed Microphone Audio"
|
||||
msgstr "Áudio Não-processado de Microfone"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:887
|
||||
#: client/scenes/lobby_gui.cpp:700
|
||||
msgid "Force disable audio filters, such as noise cancellation"
|
||||
msgstr ""
|
||||
"Força a desativação de filtros de áudio tais como cancelamento de ruído"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:894
|
||||
#: client/scenes/lobby_gui.cpp:707
|
||||
msgid "Enable hand tracking"
|
||||
msgstr "Ativar rastreamento de mãos"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:900 client/scenes/lobby_gui.cpp:912
|
||||
#: client/scenes/lobby_gui.cpp:924 client/scenes/lobby_gui.cpp:940
|
||||
#: client/scenes/lobby_gui.cpp:990
|
||||
#: client/scenes/lobby_gui.cpp:714 client/scenes/lobby_gui.cpp:727
|
||||
#: client/scenes/lobby_gui.cpp:740 client/scenes/lobby_gui.cpp:757
|
||||
#: client/scenes/lobby_gui.cpp:807
|
||||
msgid "This feature is not supported by your headset"
|
||||
msgstr "Este recurso não é suportado pelo seu headset"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:906
|
||||
#: client/scenes/lobby_gui.cpp:720
|
||||
msgid "Enable eye tracking"
|
||||
msgstr "Ativar rastreamento ocular"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:918
|
||||
#: client/scenes/lobby_gui.cpp:733
|
||||
msgid "Enable face tracking"
|
||||
msgstr "Ativar rastreamento facial"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:931
|
||||
#: client/scenes/lobby_gui.cpp:747
|
||||
msgid "Enable body tracking"
|
||||
msgstr "Ativar rastreamento corporal"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:947
|
||||
#: client/scenes/lobby_gui.cpp:764
|
||||
msgid ""
|
||||
"Requires 'Hand and body tracking' to be enabled in the Quest movement "
|
||||
"tracking settings,\n"
|
||||
@@ -244,11 +237,11 @@ msgstr ""
|
||||
"estimados\n"
|
||||
"com base nas posições do controle e do headset."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:960
|
||||
#: client/scenes/lobby_gui.cpp:777
|
||||
msgid "Enable lower body tracking"
|
||||
msgstr "Ativar rastreamento corporal inferior"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:966
|
||||
#: client/scenes/lobby_gui.cpp:783
|
||||
msgid ""
|
||||
"Estimate lower body joint positions using Generative Legs\n"
|
||||
"Requires 'Hand and body tracking' to be enabled in the Quest movement "
|
||||
@@ -259,11 +252,11 @@ msgstr ""
|
||||
"Requer que 'Rastreamento corporal e das mãos' esteja ativado nas\n"
|
||||
"configurações de Rastreamento de Movimento do Quest"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:969
|
||||
#: client/scenes/lobby_gui.cpp:786
|
||||
msgid "Enable hip tracking"
|
||||
msgstr "Ativar rastreamento de quadril"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:975
|
||||
#: client/scenes/lobby_gui.cpp:792
|
||||
msgid ""
|
||||
"Only takes affect with lower body tracking enabled\n"
|
||||
"May be desired when using another source of hip tracking"
|
||||
@@ -271,32 +264,45 @@ msgstr ""
|
||||
"Só tem efeito com o rastreamento corporal inferior ativado\n"
|
||||
"Pode ser desejado ao usar outra fonte de rastreamento de quadril"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:983
|
||||
#: client/scenes/lobby_gui.cpp:800
|
||||
msgid "Enable video passthrough in lobby"
|
||||
msgstr "Habilitar repassagem de vídeo no lobby"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:994
|
||||
msgid "Enable in-stream window"
|
||||
msgstr "Habilitar janela na stream"
|
||||
#: client/scenes/lobby_gui.cpp:810
|
||||
msgid "Show performance metrics"
|
||||
msgstr "Mostrar métricas de desempenho"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:997
|
||||
msgid ""
|
||||
"Enables the configuration window to be shown while the game is streaming.\n"
|
||||
"If enabled, the window is activated by pressing both thumbsticks."
|
||||
msgstr ""
|
||||
"Habilita que a janela de configuração seja vista enquanto o jogo está sendo "
|
||||
"streamado.\n"
|
||||
"Se habilitado, a janela é ativada clicando os dois joysticks simultaneamente."
|
||||
#: client/scenes/lobby_gui.cpp:814
|
||||
msgid "Overlay can be toggled by pressing both thumbsticks"
|
||||
msgstr "A sobreposição pode ser alternada pressionando ambos os joysticks"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1011 client/scenes/stream_gui.cpp:445
|
||||
#: client/scenes/lobby_gui.cpp:844 client/scenes/lobby_gui.cpp:852
|
||||
#: client/scenes/stream_stats.cpp:159
|
||||
msgid "CPU time"
|
||||
msgstr "Tempo de CPU"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:848
|
||||
msgid "CPU time [ms]"
|
||||
msgstr "Tempo de CPU [ms]"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:858 client/scenes/lobby_gui.cpp:866
|
||||
#: client/scenes/stream_stats.cpp:161
|
||||
msgid "GPU time"
|
||||
msgstr "Tempo de GPU"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:862
|
||||
msgid "GPU time [ms]"
|
||||
msgstr "Tempo de GPU [ms]"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:881
|
||||
msgid "OpenXR post-processing"
|
||||
msgstr "Pós-processamento OpenXR"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1015 client/scenes/stream_gui.cpp:449
|
||||
#: client/scenes/lobby_gui.cpp:885
|
||||
msgid "Supersampling"
|
||||
msgstr "Supersampling"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1035 client/scenes/stream_gui.cpp:470
|
||||
#: client/scenes/lobby_gui.cpp:905
|
||||
msgid ""
|
||||
"Reduce flicker for high contrast edges.\n"
|
||||
"Useful when the input resolution is high compared to the headset display"
|
||||
@@ -304,11 +310,11 @@ msgstr ""
|
||||
"Reduz flicker para arestas de alto contraste.\n"
|
||||
"Útil quando a resolução de entrada é alta comparada ao display do headset"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1040 client/scenes/stream_gui.cpp:475
|
||||
#: client/scenes/lobby_gui.cpp:910
|
||||
msgid "Sharpening"
|
||||
msgstr "Aumento de nitidez"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1060 client/scenes/stream_gui.cpp:496
|
||||
#: client/scenes/lobby_gui.cpp:930
|
||||
msgid ""
|
||||
"Improve clarity of high contrast edges and counteract blur.\n"
|
||||
"Useful when the input resolution is low compared to the headset display"
|
||||
@@ -316,11 +322,11 @@ msgstr ""
|
||||
"Melhora a clareza de arestas de alto contraste e minimiza o desfoque.\n"
|
||||
"Útil quando a resolução de entrada é baixa comparada ao display do headset"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1069
|
||||
#: client/scenes/lobby_gui.cpp:939
|
||||
msgid "Enable Snapdragon Game Super Resolution"
|
||||
msgstr "Habilitar Snapdragon Game Super Resolution"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1077
|
||||
#: client/scenes/lobby_gui.cpp:947
|
||||
msgid ""
|
||||
"On this headset, this setting has been fully superseded by the native "
|
||||
"Sharpening setting above.\n"
|
||||
@@ -330,288 +336,184 @@ msgstr ""
|
||||
"aumento de nitidez acima.\n"
|
||||
"Somente habilite se souber o que está fazendo."
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1079
|
||||
#: client/scenes/lobby_gui.cpp:949
|
||||
msgid ""
|
||||
"Client-side upscaling and sharpening, adds a performance cost on the headset"
|
||||
msgstr ""
|
||||
"Upscaling e aumento de nitidez do lado do cliente, acrescenta um custo de "
|
||||
"desempenho no headset"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1097
|
||||
#: client/scenes/lobby_gui.cpp:967
|
||||
msgid "Upscaling factor"
|
||||
msgstr "Fator de upscaling"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1116
|
||||
#: client/scenes/lobby_gui.cpp:986
|
||||
msgid "Use edge direction"
|
||||
msgstr "Usar direção da aresta"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1122
|
||||
#: client/scenes/lobby_gui.cpp:992
|
||||
msgid "Adds an additional performance cost"
|
||||
msgstr "Acrescenta um custo de desempenho"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1127
|
||||
#: client/scenes/lobby_gui.cpp:997
|
||||
msgid "Edge threshold"
|
||||
msgstr "Limite da aresta"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1134 client/scenes/lobby_gui.cpp:1143
|
||||
#: client/scenes/lobby_gui.cpp:1004 client/scenes/lobby_gui.cpp:1013
|
||||
#, c++-format
|
||||
msgid "Recommended: {:.1f}"
|
||||
msgstr "Recomenadado: {:.1f}"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1137
|
||||
#: client/scenes/lobby_gui.cpp:1007
|
||||
msgid "Edge sharpness"
|
||||
msgstr "Nitidez da aresta"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1239 client/scenes/lobby_gui.cpp:1247
|
||||
#: client/scenes/stream_gui.cpp:222 client/scenes/stream_gui.cpp:424
|
||||
msgid "CPU time"
|
||||
msgstr "Tempo de CPU"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1243
|
||||
msgid "CPU time [ms]"
|
||||
msgstr "Tempo de CPU [ms]"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1253 client/scenes/lobby_gui.cpp:1261
|
||||
#: client/scenes/stream_gui.cpp:224 client/scenes/stream_gui.cpp:425
|
||||
msgid "GPU time"
|
||||
msgstr "Tempo de GPU"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1257
|
||||
msgid "GPU time [ms]"
|
||||
msgstr "Tempo de GPU [ms]"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1300
|
||||
msgid "Enable the microphone?"
|
||||
msgstr "Habilitar o microfone?"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1305
|
||||
msgid "Enable eye tracking?"
|
||||
msgstr "Habilitar o rastreamento ocular?"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1310
|
||||
msgid "Enable face tracking?"
|
||||
msgstr "Habilitar o rastreamento facial?"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1315
|
||||
msgid "Enable body tracking?"
|
||||
msgstr "Habilitar o rastreamento corporal?"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1323
|
||||
msgid "Welcome to WiVRn"
|
||||
msgstr "Bem vindo(a) ao WiVRn"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1347
|
||||
msgid "Yes"
|
||||
msgstr "Sim"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1354
|
||||
msgid "No"
|
||||
msgstr "Não"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1373 client/scenes/lobby_gui.cpp:2012
|
||||
#: client/scenes/lobby_gui.cpp:1101 client/scenes/lobby_gui.cpp:1757
|
||||
msgid "Licenses"
|
||||
msgstr "Licenças"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1687
|
||||
#: client/scenes/lobby_gui.cpp:1440
|
||||
msgid "Microphone is enabled"
|
||||
msgstr "O microfone está ativado"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1688
|
||||
#: client/scenes/lobby_gui.cpp:1441
|
||||
msgid "Microphone is disabled"
|
||||
msgstr "O microfone está desativado"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1697
|
||||
#: client/scenes/lobby_gui.cpp:1450
|
||||
msgid "Hand tracking is enabled"
|
||||
msgstr "O rastreamento de mãos está ativado"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1698
|
||||
#: client/scenes/lobby_gui.cpp:1451
|
||||
msgid "Hand tracking is disabled"
|
||||
msgstr "O rastreamento de mãos está desativado"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1707
|
||||
#: client/scenes/lobby_gui.cpp:1460
|
||||
msgid "Eye tracking is enabled"
|
||||
msgstr "O rastreamento ocular está ativado"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1708
|
||||
#: client/scenes/lobby_gui.cpp:1461
|
||||
msgid "Eye tracking is disabled"
|
||||
msgstr "O rastreamento ocular está desativado"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1721
|
||||
#: client/scenes/lobby_gui.cpp:1471 client/scenes/lobby_gui.cpp:1482
|
||||
msgid "Face tracking is enabled"
|
||||
msgstr "O rastreamento facial está ativado"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1722
|
||||
#: client/scenes/lobby_gui.cpp:1472 client/scenes/lobby_gui.cpp:1483
|
||||
msgid "Face tracking is disabled"
|
||||
msgstr "O rastreamento facial está desativado"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1732
|
||||
#: client/scenes/lobby_gui.cpp:1493
|
||||
msgid "Body tracking is enabled"
|
||||
msgstr "O rastreamento corporal está ativado"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1733
|
||||
#: client/scenes/lobby_gui.cpp:1494
|
||||
msgid "Body tracking is disabled"
|
||||
msgstr "O rastreamento corporal está desativado"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1749
|
||||
#: client/scenes/lobby_gui.cpp:1510
|
||||
msgid "Add server"
|
||||
msgstr "Adicionar servidor"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1994
|
||||
#: client/scenes/lobby_gui.cpp:1739
|
||||
msgid "Server list"
|
||||
msgstr "Lista de servidores"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1997 client/scenes/stream_gui.cpp:809
|
||||
#: client/scenes/lobby_gui.cpp:1742
|
||||
msgid "Settings"
|
||||
msgstr "Ajustes"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:2000
|
||||
#: client/scenes/lobby_gui.cpp:1745
|
||||
msgid "Post-processing"
|
||||
msgstr "Pós-processamento"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:2004
|
||||
#: client/scenes/lobby_gui.cpp:1749
|
||||
msgid "Debug"
|
||||
msgstr "Depurar"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:2009
|
||||
#: client/scenes/lobby_gui.cpp:1754
|
||||
msgid "About"
|
||||
msgstr "Sobre"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:2015
|
||||
#: client/scenes/lobby_gui.cpp:1760
|
||||
msgid "Exit"
|
||||
msgstr "Sair"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:2032
|
||||
#: client/scenes/lobby_gui.cpp:1774
|
||||
msgid ""
|
||||
"Press the grip button or put your palm up\n"
|
||||
"Press A or X or put your palm up\n"
|
||||
"to move the main window"
|
||||
msgstr ""
|
||||
"Pressione o botão de aderência ou coloque a palma da mão para cima\n"
|
||||
"Pressione A ou X ou coloque a palma da mão pra cima\n"
|
||||
"para mover a janela principal"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:2034
|
||||
msgid "Press the grip button to move the main window"
|
||||
msgstr "Pressione o botão de aderência para mover a janela principal"
|
||||
#: client/scenes/lobby_gui.cpp:1776
|
||||
msgid "Press A or X to move the main window"
|
||||
msgstr "Pressione A ou X para mover a janela principal"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:224
|
||||
#: client/scenes/stream_stats.cpp:161
|
||||
msgid "Reproject"
|
||||
msgstr "Reprojetar"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:225
|
||||
#: client/scenes/stream_stats.cpp:162
|
||||
msgid "Blit"
|
||||
msgstr "Blit"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:227
|
||||
#: client/scenes/stream_stats.cpp:164
|
||||
msgid "Network"
|
||||
msgstr "Rede"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:227 client/scenes/stream_gui.cpp:422
|
||||
#: client/scenes/stream_stats.cpp:164
|
||||
msgid "Download"
|
||||
msgstr "Baixar"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:228 client/scenes/stream_gui.cpp:423
|
||||
#: client/scenes/stream_stats.cpp:165
|
||||
msgid "Upload"
|
||||
msgstr "Enviar"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:297
|
||||
#: client/scenes/stream_stats.cpp:234
|
||||
#, c++-format
|
||||
msgid "Decoder {}"
|
||||
msgstr "Decodificador {}"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:309
|
||||
#: client/scenes/stream_stats.cpp:246
|
||||
msgid "Timings [ms]"
|
||||
msgstr "Tempos [ms]"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:369
|
||||
#: client/scenes/stream_stats.cpp:306
|
||||
msgid "Encode"
|
||||
msgstr "Codificar"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:370
|
||||
#: client/scenes/stream_stats.cpp:307
|
||||
msgid "Send"
|
||||
msgstr "Enviar"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:371
|
||||
#: client/scenes/stream_stats.cpp:308
|
||||
msgid "Receive"
|
||||
msgstr "Receber"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:372
|
||||
#: client/scenes/stream_stats.cpp:309
|
||||
msgid "Decode"
|
||||
msgstr "Decodificar"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:373
|
||||
#: client/scenes/stream_stats.cpp:310
|
||||
msgid "Blitted"
|
||||
msgstr "Blitado"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:374
|
||||
#: client/scenes/stream_stats.cpp:311
|
||||
msgid "Displayed"
|
||||
msgstr "Mostrado"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:375
|
||||
#: client/scenes/stream_stats.cpp:312
|
||||
msgid "Predicted"
|
||||
msgstr "Previsto"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:395
|
||||
#: client/scenes/stream_stats.cpp:330
|
||||
#, c++-format
|
||||
msgid "Estimated motion to photons latency: {}ms"
|
||||
msgstr "Movimento estimado para a latência de fótons: {}ms"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:402
|
||||
msgid "Press the grip button to move the window"
|
||||
msgstr "Pressione o botão de aderência para mover a janela"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:404 client/scenes/stream_gui.cpp:763
|
||||
msgid "Press both thumbsticks to display the WiVRn window"
|
||||
msgstr "Pressione ambos os thumbsticks para mostrar a janela do WiVRn"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:426
|
||||
msgid "Motion to photon latency"
|
||||
msgstr "Latência (de movimento para fótons)"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:503
|
||||
msgid "Foveation center override"
|
||||
msgstr "Ajuste do centro de foveação"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:506
|
||||
msgid "Enable"
|
||||
msgstr "Habilitar"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:514 client/scenes/stream_gui.cpp:561
|
||||
#, c++-format
|
||||
msgid "Height {:.1f} deg"
|
||||
msgstr "Altura {:.1f} graus"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:515 client/scenes/stream_gui.cpp:562
|
||||
#, c++-format
|
||||
msgid "Distance {:.2f} m"
|
||||
msgstr "Distância {:.2f} m"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:516
|
||||
msgid "Default"
|
||||
msgstr "Padrão"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:527
|
||||
msgid "Change"
|
||||
msgstr "Modificar"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:559
|
||||
msgid "Use the thumbsticks to move the foveation center"
|
||||
msgstr "Use os thumbsticks para mover o centro da foveação"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:560
|
||||
msgid "Press A to save or B to cancel"
|
||||
msgstr "Pressione A para salvar ou B para cancelar"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:806
|
||||
msgid "Stats"
|
||||
msgstr "Estatísticas"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:815
|
||||
msgid "Statistics overlay"
|
||||
msgstr "Overlay de estatísticas"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:818
|
||||
msgid "Compact view"
|
||||
msgstr "Visualização compacta"
|
||||
|
||||
#: client/wivrn_client.cpp:98 client/wivrn_client.cpp:202
|
||||
msgid "Timeout"
|
||||
msgstr "Tempo esgotado"
|
||||
@@ -627,37 +529,3 @@ msgstr "Incapaz de verificar PIN"
|
||||
#: client/wivrn_client.cpp:182
|
||||
msgid "Pairing is disabled on server"
|
||||
msgstr "Pareamento está desabilitado no servidor"
|
||||
|
||||
#~ msgid "Video stream interrupted"
|
||||
#~ msgstr "Fluxo de vídeo interrompido"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Connection ready\n"
|
||||
#~ "Start a VR application on your computer"
|
||||
#~ msgstr ""
|
||||
#~ "Conexão pronta\n"
|
||||
#~ "Inicie um aplicativo VR no seu computador"
|
||||
|
||||
#, c++-format
|
||||
#~ msgid ""
|
||||
#~ "Connection ready\n"
|
||||
#~ "Start a VR application on {}"
|
||||
#~ msgstr ""
|
||||
#~ "Conexão pronta\n"
|
||||
#~ "Inicie um aplicativo VR em {}"
|
||||
|
||||
#~ msgid "Show performance metrics"
|
||||
#~ msgstr "Mostrar métricas de desempenho"
|
||||
|
||||
#~ msgid "Overlay can be toggled by pressing both thumbsticks"
|
||||
#~ msgstr "A sobreposição pode ser alternada pressionando ambos os joysticks"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Press A or X or put your palm up\n"
|
||||
#~ "to move the main window"
|
||||
#~ msgstr ""
|
||||
#~ "Pressione A ou X ou coloque a palma da mão pra cima\n"
|
||||
#~ "para mover a janela principal"
|
||||
|
||||
#~ msgid "Press A or X to move the main window"
|
||||
#~ msgstr "Pressione A ou X para mover a janela principal"
|
||||
|
||||
+99
-113
@@ -2,14 +2,13 @@
|
||||
# This file is distributed under the same license as the WiVRn-dashboard package.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2025 not <github.superglue094@slmail.me>
|
||||
# SPDX-FileCopyrightText: 2025 eps <eps@bwsal.org>
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WiVRn-dashboard\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-08-08 20:41+0200\n"
|
||||
"PO-Revision-Date: 2025-08-08 22:35+0200\n"
|
||||
"Last-Translator: eps <eps@bwsal.org>\n"
|
||||
"POT-Creation-Date: 2025-07-25 22:10+0200\n"
|
||||
"PO-Revision-Date: 2025-08-02 18:48+0200\n"
|
||||
"Last-Translator: not <github.superglue094@slmail.me>\n"
|
||||
"Language-Team: Slovak <>\n"
|
||||
"Language: sk\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -21,12 +20,12 @@ msgstr ""
|
||||
#: dashboard/apk_installer.cpp:167
|
||||
#, kde-format
|
||||
msgid "Downloading APK: %1 MB / %2 MB"
|
||||
msgstr "Sťahuje sa APK: %1 MB / %2 MB"
|
||||
msgstr "Sťahujem APK: %1 MB / %2 MB"
|
||||
|
||||
#: dashboard/apk_installer.cpp:169
|
||||
#, kde-format
|
||||
msgid "Downloading APK: %1 MB"
|
||||
msgstr "Sťahuje sa APK: %1 MB"
|
||||
msgstr "Sťahujem APK: %1 MB"
|
||||
|
||||
#: dashboard/apk_installer.cpp:178
|
||||
#, kde-format
|
||||
@@ -36,12 +35,12 @@ msgstr "Sťahovanie zrušené"
|
||||
#: dashboard/apk_installer.cpp:194
|
||||
#, kde-format
|
||||
msgid "Cannot download APK: %1"
|
||||
msgstr "APK sa nedá stiahnúť: %1"
|
||||
msgstr "APK sa nedá stiahnuť: %1"
|
||||
|
||||
#: dashboard/apk_installer.cpp:217
|
||||
#, kde-format
|
||||
msgid "Installing APK"
|
||||
msgstr "Inštaluje sa APK"
|
||||
msgstr "Inštalujem APK"
|
||||
|
||||
#: dashboard/apk_installer.cpp:221
|
||||
#, kde-format
|
||||
@@ -51,7 +50,7 @@ msgstr "Nepodarilo sa spustiť adb: %1"
|
||||
#: dashboard/apk_installer.cpp:231
|
||||
#, kde-format
|
||||
msgid "adb exited abnormally: %1"
|
||||
msgstr "adb sa neočakávane ukončilo: %1"
|
||||
msgstr "adb sa neočakávane ukončil: %1"
|
||||
|
||||
#: dashboard/apk_installer.cpp:239
|
||||
#, kde-format
|
||||
@@ -77,15 +76,15 @@ msgstr "Nainštaluj si aplikáciu WiVRn do headsetu"
|
||||
#: dashboard/qml/WizardPage.qml:192
|
||||
#, kde-format
|
||||
msgid "Checking latest release..."
|
||||
msgstr "Kontroluje sa najnovšia verzia…"
|
||||
msgstr "Kontrolujem najnovšiu verziu…"
|
||||
|
||||
#: dashboard/qml/ApkInstallPage.qml:43 dashboard/qml/WizardPage.qml:198
|
||||
#, kde-format
|
||||
msgid "No precompiled APK is available for this version."
|
||||
msgstr "Pre túto verziu nie je dostupné predkompilované APK."
|
||||
|
||||
#: dashboard/qml/ApkInstallPage.qml:45 dashboard/qml/Main.qml:259
|
||||
#: dashboard/qml/Main.qml:341
|
||||
#: dashboard/qml/ApkInstallPage.qml:45 dashboard/qml/Main.qml:247
|
||||
#: dashboard/qml/Main.qml:329
|
||||
#, kde-format
|
||||
msgid "ADB is not installed."
|
||||
msgstr "ADB nie je nainštalované."
|
||||
@@ -93,7 +92,7 @@ msgstr "ADB nie je nainštalované."
|
||||
#: dashboard/qml/ApkInstallPage.qml:47
|
||||
#, kde-format
|
||||
msgid "Connect a headset and make sure developer mode is enabled."
|
||||
msgstr "Pripojte headset a uistite sa, že je zapnutý vývojársky režim."
|
||||
msgstr "Pripoj headset a uisti sa, že je zapnutý vývojársky režim."
|
||||
|
||||
#: dashboard/qml/ApkInstallPage.qml:51 dashboard/qml/WizardPage.qml:204
|
||||
#, kde-format
|
||||
@@ -103,11 +102,12 @@ msgid ""
|
||||
"client."
|
||||
msgstr ""
|
||||
"Postupuj podľa pokynov v <a href=\"https://github.com/WiVRn/WiVRn/blob/"
|
||||
"master/docs/building.md#client-headset\">dokumentácii</a> na vytvorenie "
|
||||
"vlastného klienta."
|
||||
"master/docs/building.md#client-headset\">dokumentácii</a> na vytvorenie vlastn"
|
||||
"ého "
|
||||
"klienta."
|
||||
|
||||
#: dashboard/qml/ApkInstallPage.qml:65 dashboard/qml/HeadsetStatsPage.qml:36
|
||||
#: dashboard/qml/HeadsetsPage.qml:183 dashboard/qml/TroubleshootPage.qml:59
|
||||
#: dashboard/qml/ApkInstallPage.qml:65 dashboard/qml/HeadsetsPage.qml:183
|
||||
#: dashboard/qml/HeadsetStatsPage.qml:36 dashboard/qml/TroubleshootPage.qml:59
|
||||
#, kde-format
|
||||
msgctxt "go back to the home page"
|
||||
msgid "Back"
|
||||
@@ -116,7 +116,7 @@ msgstr "Späť"
|
||||
#: dashboard/qml/ConnectUsbDialog.qml:11
|
||||
#, kde-format
|
||||
msgid "Select your headset"
|
||||
msgstr "Vyberte svoj headset"
|
||||
msgstr "Vyber svoj headset"
|
||||
|
||||
#: dashboard/qml/DeviceCard.qml:46
|
||||
#, kde-format
|
||||
@@ -133,12 +133,7 @@ msgstr "Preinštalovať WiVRn"
|
||||
msgid "Install WiVRn"
|
||||
msgstr "Nainštalovať WiVRn"
|
||||
|
||||
#: dashboard/qml/HeadsetStatsPage.qml:12
|
||||
#, kde-format
|
||||
msgid "Headset statistics"
|
||||
msgstr "Štatistiky headsetu"
|
||||
|
||||
#: dashboard/qml/HeadsetsPage.qml:12 dashboard/qml/Main.qml:354
|
||||
#: dashboard/qml/HeadsetsPage.qml:12 dashboard/qml/Main.qml:342
|
||||
#, kde-format
|
||||
msgid "Headsets"
|
||||
msgstr "Headsety"
|
||||
@@ -215,12 +210,12 @@ msgstr "Vypnúť párovanie"
|
||||
#: dashboard/qml/HeadsetsPage.qml:166
|
||||
#, kde-format
|
||||
msgid "Start the WiVRn app on your headset and use the PIN: %1"
|
||||
msgstr "Spustite aplikáciu WiVRn v headsete a zadajte PIN: %1"
|
||||
msgstr "Spusť aplikáciu WiVRn v headsete a zadaj PIN: %1"
|
||||
|
||||
#: dashboard/qml/HeadsetsPage.qml:166
|
||||
#, kde-format
|
||||
msgid "Enable pairing to allow your headset to connect to this computer"
|
||||
msgstr "Zapnite párovanie, aby sa mohol headset pripojiť k tomuto počítaču"
|
||||
msgstr "Zapni párovanie, aby sa mohol headset pripojiť k tomuto počítaču"
|
||||
|
||||
#: dashboard/qml/HeadsetsPage.qml:171 dashboard/qml/TroubleshootPage.qml:37
|
||||
#, kde-format
|
||||
@@ -232,128 +227,122 @@ msgstr "Zapnúť párovanie"
|
||||
msgid "Pair a new headset"
|
||||
msgstr "Spárovať nový headset"
|
||||
|
||||
#: dashboard/qml/Main.qml:107
|
||||
#: dashboard/qml/HeadsetStatsPage.qml:12
|
||||
#, kde-format
|
||||
msgid "Headset statistics"
|
||||
msgstr "Štatistiky headsetu"
|
||||
|
||||
#: dashboard/qml/Main.qml:103
|
||||
#, kde-format
|
||||
msgid "The server does not have CAP_SYS_NICE capabilities."
|
||||
msgstr "Server nemá oprávnenia CAP_SYS_NICE."
|
||||
|
||||
#: dashboard/qml/Main.qml:114
|
||||
#: dashboard/qml/Main.qml:110
|
||||
#, kde-format
|
||||
msgid "Fix it"
|
||||
msgstr "Opraviť"
|
||||
|
||||
#: dashboard/qml/Main.qml:123
|
||||
#: dashboard/qml/Main.qml:119
|
||||
#, kde-format
|
||||
msgid "The CAP_SYS_NICE capability will be used when the server is restarted."
|
||||
msgstr "CAP_SYS_NICE bude použité po reštarte servera."
|
||||
|
||||
#: dashboard/qml/Main.qml:129
|
||||
#: dashboard/qml/Main.qml:125
|
||||
#, kde-format
|
||||
msgctxt "restart the server"
|
||||
msgid "Restart now"
|
||||
msgstr "Reštartovať teraz"
|
||||
|
||||
#: dashboard/qml/Main.qml:140
|
||||
#: dashboard/qml/Main.qml:136
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"NVIDIA GPUs require at least driver version 565.77, current version is %1"
|
||||
msgstr ""
|
||||
"GPU od NVIDIA vyžadujú minimálne verziu ovládača 565.77, aktuálna verzia je "
|
||||
"%1"
|
||||
"GPU od NVIDIA vyžadujú minimálne verziu ovládača 565.77, aktuálna verzia je %1"
|
||||
|
||||
#: dashboard/qml/Main.qml:146
|
||||
#: dashboard/qml/Main.qml:142
|
||||
#, kde-format
|
||||
msgid "More info"
|
||||
msgstr "Viac info"
|
||||
|
||||
#: dashboard/qml/Main.qml:154
|
||||
#: dashboard/qml/Main.qml:150
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Use the Mesa (radv) driver for AMD GPUs\n"
|
||||
"Hardware encoding with vaapi does not work with AMDVLK and AMDGPU-PRO"
|
||||
msgstr ""
|
||||
"Pre GPU od AMD používajte ovládač Mesa (radv)\n"
|
||||
"Pre GPU od AMD používaj ovládač Mesa (radv)\n"
|
||||
"Hardvérové kódovanie cez vaapi nefunguje s AMDVLK ani AMDGPU-PRO"
|
||||
|
||||
#: dashboard/qml/Main.qml:162
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"No OpenVR compatibility detected, Steam games won't be able to load VR.\n"
|
||||
"Install xrizer or OpenComposite."
|
||||
msgstr ""
|
||||
"Žiadna OpenVR kompatibilita nebola nájdená, Hry na steame nebude možné "
|
||||
"načítať do VRka.\n"
|
||||
"Nainštalujte xrizer alebo OpenComposite."
|
||||
|
||||
#: dashboard/qml/Main.qml:171
|
||||
#: dashboard/qml/Main.qml:159
|
||||
#, kde-format
|
||||
msgid "Server failed to start"
|
||||
msgstr "Nepodarilo sa spustiť server"
|
||||
|
||||
#: dashboard/qml/Main.qml:177 dashboard/qml/TroubleshootPage.qml:77
|
||||
#: dashboard/qml/Main.qml:165 dashboard/qml/TroubleshootPage.qml:77
|
||||
#, kde-format
|
||||
msgid "Open server logs"
|
||||
msgstr "Zobraziť logy servera"
|
||||
|
||||
#: dashboard/qml/Main.qml:214
|
||||
#: dashboard/qml/Main.qml:202
|
||||
#, kde-format
|
||||
msgctxt "whether the server is running, displayed in front of a checkbox"
|
||||
msgid "Running"
|
||||
msgstr "Beží"
|
||||
|
||||
#: dashboard/qml/Main.qml:229
|
||||
#: dashboard/qml/Main.qml:217
|
||||
#, kde-format
|
||||
msgctxt "whether pairing is enabled, displayed in front of a checkbox"
|
||||
msgid "Pairing"
|
||||
msgstr "Párovanie"
|
||||
|
||||
#: dashboard/qml/Main.qml:242
|
||||
#: dashboard/qml/Main.qml:230
|
||||
#, kde-format
|
||||
msgid "PIN: %1"
|
||||
msgstr "PIN: %1"
|
||||
|
||||
#: dashboard/qml/Main.qml:250 dashboard/qml/WizardPage.qml:373
|
||||
#: dashboard/qml/Main.qml:238 dashboard/qml/WizardPage.qml:373
|
||||
#, kde-format
|
||||
msgid "Connect by USB"
|
||||
msgstr "Pripojiť cez USB"
|
||||
|
||||
#: dashboard/qml/Main.qml:261
|
||||
#: dashboard/qml/Main.qml:249
|
||||
#, kde-format
|
||||
msgid "No headset is connected or your headset is not in developer mode."
|
||||
msgstr "Žiadny headset nie je pripojený alebo nemá zapnutý vývojársky režim."
|
||||
|
||||
#: dashboard/qml/Main.qml:269
|
||||
#: dashboard/qml/Main.qml:257
|
||||
#, kde-format
|
||||
msgid "Disconnect"
|
||||
msgstr "Odpojiť"
|
||||
|
||||
#: dashboard/qml/Main.qml:286
|
||||
#: dashboard/qml/Main.qml:274
|
||||
#, kde-format
|
||||
msgctxt "automatically started application"
|
||||
msgid "Application"
|
||||
msgstr "Aplikácia"
|
||||
|
||||
#: dashboard/qml/Main.qml:307
|
||||
#: dashboard/qml/Main.qml:295
|
||||
#, kde-format
|
||||
msgid "Steam information"
|
||||
msgstr "Informácie o Steame"
|
||||
|
||||
#: dashboard/qml/Main.qml:325
|
||||
#: dashboard/qml/Main.qml:313
|
||||
#, kde-format
|
||||
msgid "Wizard"
|
||||
msgstr "Sprievodca"
|
||||
|
||||
#: dashboard/qml/Main.qml:332
|
||||
#: dashboard/qml/Main.qml:320
|
||||
#, kde-format
|
||||
msgid "Install the app"
|
||||
msgstr "Nainštalovať aplikáciu"
|
||||
|
||||
#: dashboard/qml/Main.qml:361 dashboard/qml/SettingsPage.qml:14
|
||||
#: dashboard/qml/Main.qml:349 dashboard/qml/SettingsPage.qml:14
|
||||
#, kde-format
|
||||
msgid "Settings"
|
||||
msgstr "Nastavenia"
|
||||
|
||||
#: dashboard/qml/Main.qml:368 dashboard/qml/TroubleshootPage.qml:10
|
||||
#: dashboard/qml/Main.qml:356 dashboard/qml/TroubleshootPage.qml:10
|
||||
#, kde-format
|
||||
msgid "Troubleshoot"
|
||||
msgstr "Riešiť problémy"
|
||||
@@ -380,12 +369,12 @@ msgstr "Prehľadať"
|
||||
#, kde-format
|
||||
msgctxt "automatic foveation setup"
|
||||
msgid "Manual foveation"
|
||||
msgstr "Manuálne foveovanie"
|
||||
msgstr "Manuálna foveation"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:46
|
||||
#, kde-format
|
||||
msgid "Foveation strength:"
|
||||
msgstr "Sila foveovania"
|
||||
msgstr "Foveation sila"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:62
|
||||
#, kde-format
|
||||
@@ -404,13 +393,13 @@ msgid ""
|
||||
"The recommended values are between 20% and 50% for headsets without eye "
|
||||
"tracking and between 50% and 70% for headsets with eye tracking."
|
||||
msgstr ""
|
||||
"Silnejšia foveácia zvyšuje ostrosť v strede obrazu a znižuje ju na okrajoch, "
|
||||
"čím zrýchľuje dekódovanie. Je vhodnejšia pre rýchle hry.\n"
|
||||
"Silnejšia foveácia zvyšuje ostrosť v strede obrazu a znižuje ju na okrajoch, č"
|
||||
"ím zrýchľuje dekódovanie. Je vhodnejšia pre rýchle hry.\n"
|
||||
"\n"
|
||||
"Slabšia foveácia zachováva rovnomernú ostrosť v celom obraze.\n"
|
||||
"\n"
|
||||
"Odporúčané hodnoty sú medzi 20 % a 50 % pre headsety bez sledovania očí a "
|
||||
"medzi 50 % a 70 % pre headsety so sledovaním očí."
|
||||
"Odporúčané hodnoty sú medzi 20 % a 50 % pre headsety bez sledovania očí a medz"
|
||||
"i 50 % a 70 % pre headsety so sledovaním očí."
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:74
|
||||
#, kde-format
|
||||
@@ -476,9 +465,8 @@ msgid ""
|
||||
"To add a new encoder, split an existing encoder by clicking near an edge.\n"
|
||||
"Drag an edge to resize or remove encoders."
|
||||
msgstr ""
|
||||
"Ak chcete pridať nový enkodér, rozdeľte existujúci kliknutím pri jeho "
|
||||
"okraji.\n"
|
||||
"Potiahnutím okraja môžete meniť veľkosť alebo enkodér odstrániť."
|
||||
"Ak chceš pridať nový enkodér, rozdeľ existujúci kliknutím pri jeho okraji.\n"
|
||||
"Potiahnutím okraja môžeš meniť veľkosť alebo enkodér odstrániť."
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:220
|
||||
#, kde-format
|
||||
@@ -618,14 +606,14 @@ msgid ""
|
||||
"For Steam games, right click on the game in Steam, go in Properties > "
|
||||
"General and paste this in \"Launch options\":"
|
||||
msgstr ""
|
||||
"Pre Steam hry kliknite pravým tlačidlom na hru v Steame, otvorte Vlastnosti > "
|
||||
"Všeobecné a vložte toto do \"Spúšťacích parametrov“:"
|
||||
"Pre Steam hry klikni pravým tlačidlom na hru v Steame, otvor Vlastnosti > "
|
||||
"Všeo becné a vlož toto do \"Spúšťacích parametrov“:"
|
||||
|
||||
#: dashboard/qml/SteamLaunchOptions.qml:20
|
||||
#, kde-format
|
||||
msgid "Paste this in the Steam launch options for the app you want to start"
|
||||
msgstr ""
|
||||
"Vložte toto do spúšťacích možností Steamu pre aplikáciu, ktorú chcete spustiť"
|
||||
"Vlož toto do spúšťacích možností Steamu pre aplikáciu, ktorú chceš spustiť"
|
||||
|
||||
#: dashboard/qml/SteamLaunchOptions.qml:26
|
||||
#, kde-format
|
||||
@@ -649,8 +637,8 @@ msgid ""
|
||||
"If you installed WiVRn over USB on a Meta headset, the app is in the "
|
||||
"\"unknown sources\" section."
|
||||
msgstr ""
|
||||
"Ak ste nainštalovali WiVRn cez USB na Meta headset, aplikácia sa nachádza v "
|
||||
"sekcii „neznáme zdroje“."
|
||||
"Ak si nainštaloval WiVRn cez USB na Meta headset, aplikácia sa nachádza v sekc"
|
||||
"ii „neznáme zdroje“."
|
||||
|
||||
#: dashboard/qml/TroubleshootPage.qml:24
|
||||
#, kde-format
|
||||
@@ -663,9 +651,8 @@ msgid ""
|
||||
"If the server is not visible or the connection fails, check that port 5353 "
|
||||
"(UDP) and 9757 (TCP and UDP) are open in your firewall."
|
||||
msgstr ""
|
||||
"Ak server nie je viditeľný alebo sa nepodarilo pripojenie, skontrolujte, či sú"
|
||||
" "
|
||||
"vo vašom firewalle otvorené porty 5353 (UDP) a 9757 (TCP aj UDP)."
|
||||
"Ak server nie je viditeľný alebo sa nepodarilo pripojenie, skontroluj, či sú v"
|
||||
" tvojom firewalle otvorené porty 5353 (UDP) a 9757 (TCP aj UDP)."
|
||||
|
||||
#: dashboard/qml/TroubleshootPage.qml:28
|
||||
#, kde-format
|
||||
@@ -679,9 +666,10 @@ msgid ""
|
||||
"</p><ul><li>The headset app version is in the \"About\" page</li><li>The "
|
||||
"server version is <b>%1</b></li></ul>"
|
||||
msgstr ""
|
||||
"<p>Verzia aplikácie v headsete a verzia servera na vašom počítači sa musia "
|
||||
"zhodovať.</p><ul><li>Verziu aplikácie nájdete v časti „O aplikácii“</"
|
||||
"li><li>Verzia servera je <b>%1</b></li></ul>"
|
||||
"<p>Verzia aplikácie v headsete a verzia servera na tvojom počítači sa musia zh"
|
||||
"odovať."
|
||||
"</p><ul><li>Verziu aplikácie nájdeš v časti „O aplikácii“</li><li>Verzia "
|
||||
"servera je <b>%1</b></li></ul>"
|
||||
|
||||
#: dashboard/qml/TroubleshootPage.qml:32
|
||||
#, kde-format
|
||||
@@ -694,8 +682,8 @@ msgid ""
|
||||
"If you have reinstalled the server or the client or if you want to connect "
|
||||
"another headset, you must enable pairing before connecting."
|
||||
msgstr ""
|
||||
"Ak ste preinštalovali server alebo klienta, alebo ak chcete pripojiť iný "
|
||||
"headset, musíte pred pripojením povoliť párovanie."
|
||||
"Ak si preinštaloval server alebo klienta, alebo ak chceš pripojiť iný headset,"
|
||||
" musíš pred pripojením povoliť párovanie."
|
||||
|
||||
#: dashboard/qml/TroubleshootPage.qml:33
|
||||
#, kde-format
|
||||
@@ -718,9 +706,8 @@ msgid ""
|
||||
"When the headset is connected, select \"WiVRn\" as the default audio output "
|
||||
"device for applications to use it."
|
||||
msgstr ""
|
||||
"Keď je headset pripojený, vyberte WiVRn ako predvolené zvukové zariadenie, aby"
|
||||
" "
|
||||
"ho aplikácie používali."
|
||||
"Keď je headset pripojený, vyber WiVRn ako predvolené zvukové zariadenie, aby h"
|
||||
"o aplikácie používali."
|
||||
|
||||
#: dashboard/qml/TroubleshootPage.qml:67
|
||||
#, kde-format
|
||||
@@ -756,8 +743,8 @@ msgid ""
|
||||
"This wizard will help you set up WiVRn on your headset and connect it to "
|
||||
"your computer."
|
||||
msgstr ""
|
||||
"Tento sprievodca vám pomôže nastaviť WiVRn na vašom headsete a pripojiť ho k "
|
||||
"počítaču."
|
||||
"Tento sprievodca ti pomôže nastaviť WiVRn na tvojom headsete a pripojiť ho k p"
|
||||
"očítaču."
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:83 dashboard/qml/WizardPage.qml:258
|
||||
#: dashboard/qml/WizardPage.qml:321 dashboard/qml/WizardPage.qml:452
|
||||
@@ -769,12 +756,12 @@ msgstr "Ďalej"
|
||||
#: dashboard/qml/WizardPage.qml:112
|
||||
#, kde-format
|
||||
msgid "How to enable developer mode"
|
||||
msgstr "Ako zapnúť vývojársky režim"
|
||||
msgstr "Ako zapnúť vývojársky reži"
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:119
|
||||
#, kde-format
|
||||
msgid "Follow the manufacturer's instructions below:"
|
||||
msgstr "Postupujte podľa inštrukcií od výrobcu:"
|
||||
msgstr "Postupuj podľa inštrukcií od výrobcu:"
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:142
|
||||
#, kde-format
|
||||
@@ -783,9 +770,9 @@ msgid ""
|
||||
"headset.\n"
|
||||
"You can either install it from the Meta store or directly over USB."
|
||||
msgstr ""
|
||||
"Na používanie WiVRn je potrebné nainštalovať klientsku aplikáciu do "
|
||||
"headsetu.\n"
|
||||
"Môžete ju nainštalovať buď z Meta obchodu alebo priamo cez USB."
|
||||
"Na používanie WiVRn je potrebné nainštalovať klientsku aplikáciu do headsetu."
|
||||
"\n"
|
||||
"Môžeš ju nainštalovať buď z Meta obchodu alebo priamo cez USB."
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:148
|
||||
#, kde-format
|
||||
@@ -798,8 +785,8 @@ msgid ""
|
||||
"For the Quest 2, 3, 3S, and Pro, you can get the app from the <a "
|
||||
"href=\"https://www.meta.com/experiences/7959676140827574/\">Meta store</a>."
|
||||
msgstr ""
|
||||
"Pre Quest 2, 3, 3S a Pro si môžete aplikáciu stiahnuť z <a href=\"https://"
|
||||
"www.meta.com/experiences/7959676140827574/\">obchodu Meta</a>."
|
||||
"Pre Quest 2, 3, 3S a Pro si môžeš aplikáciu stiahnuť z <a "
|
||||
"href=\"https://www.meta.com/experiences/7959676140827574/\">Meta obchodu</a>."
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:164
|
||||
#, kde-format
|
||||
@@ -807,8 +794,8 @@ msgid ""
|
||||
"A newer release is available: %1 → %2, the client app on the Meta store may "
|
||||
"not be compatible."
|
||||
msgstr ""
|
||||
"K dispozícii je novšia verzia: %1 → %2, Aplikácia z obchodu Meta nemusí byť "
|
||||
"kompatibilná."
|
||||
"K dispozícii je novšia verzia: %1 → %2, Aplikácia z obchodu Meta nemusí byť ko"
|
||||
"mpatibilná."
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:171
|
||||
#, kde-format
|
||||
@@ -816,8 +803,8 @@ msgid ""
|
||||
"This is a nightly build, the client app on the Meta store may not be "
|
||||
"compatible."
|
||||
msgstr ""
|
||||
"Toto je nightly verzia, aplikácia z Meta obchodu s ňou nemusí byť "
|
||||
"kompatibilná."
|
||||
"Toto je nightly verzia, aplikácia z Meta obchodu s ňou nemusí byť kompatibilná"
|
||||
"."
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:181
|
||||
#, kde-format
|
||||
@@ -842,14 +829,14 @@ msgid ""
|
||||
"<ul><li>The ADB udev rules are installed</li><li>The headset is in <a "
|
||||
"href=\"#\">developer mode</a></li></ul></p>"
|
||||
msgstr ""
|
||||
"<p>Headset nebol rozpoznaný. Uistite sa, že:\n"
|
||||
"<ul><li>Máte nainštalované ADB udev rules</li><li>Headset je v <a "
|
||||
"<p>Headset nebol rozpoznaný. Uisti sa, že:\n"
|
||||
"<ul><li>Máš nainštalované ADB udev rules</li><li>Headset je v <a "
|
||||
"href=\"#\">režime vývojára</a></li></ul></p>"
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:280
|
||||
#, kde-format
|
||||
msgid "Select the application you want to start"
|
||||
msgstr "Vyberte aplikáciu, ktorú chcete spustiť"
|
||||
msgstr "Vyber aplikáciu, ktorú chceš spustiť"
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:286
|
||||
#, kde-format
|
||||
@@ -869,13 +856,13 @@ msgid ""
|
||||
"WiVRn entirely replaces SteamVR, you should not start SteamVR while WiVRn is "
|
||||
"running."
|
||||
msgstr ""
|
||||
"WiVRn úplne nahrádza SteamVR, preto by ste SteamVR nemali spúšťať, keď beží "
|
||||
"WiVRn"
|
||||
"WiVRn úplne nahrádza SteamVR, preto by si SteamVR nemal spúšťať, keď beží WiVR"
|
||||
"n"
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:358
|
||||
#, kde-format
|
||||
msgid "Start the WiVRn app on your headset"
|
||||
msgstr "Spustite aplikáciu WiVRn v headsete"
|
||||
msgstr "Spusť aplikáciu WiVRn v headsete"
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:363
|
||||
#, kde-format
|
||||
@@ -883,14 +870,14 @@ msgid ""
|
||||
"To connect over WiFi, start the WiVRn app on your headset, connect to \"%1\" "
|
||||
"and enter PIN \"%2\"."
|
||||
msgstr ""
|
||||
"Na pripojenie cez Wi-Fi spustite aplikáciu WiVRn v headsete, pripojte sa k \"%"
|
||||
"1“ "
|
||||
"a zadajte PIN \"%2“."
|
||||
"Na pripojenie cez Wi-Fi spusti aplikáciu WiVRn v headsete, pripoj sa k \"%1“ a"
|
||||
" "
|
||||
"zadaj PIN \"%2“."
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:370
|
||||
#, kde-format
|
||||
msgid "To connect over USB, click on \"Connect by USB\"."
|
||||
msgstr "Pre pripojenie cez USB kliknite na \"Pripojiť cez USB“."
|
||||
msgstr "Pre pripojenie cez USB klikni na \"Pripojiť cez USB“."
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:383
|
||||
#, kde-format
|
||||
@@ -918,9 +905,8 @@ msgid ""
|
||||
"To connect another headset, make sure pairing is enabled in the dashboard "
|
||||
"before connecting."
|
||||
msgstr ""
|
||||
"Ak chcete pripojiť ďalší headset, uistite sa, že je v ovládacom paneli povolen"
|
||||
"é "
|
||||
"párovanie."
|
||||
"Ak chceš pripojiť ďalší headset, uisti sa, že je v ovládacom paneli povolené p"
|
||||
"árovanie."
|
||||
|
||||
#: dashboard/qml/WizardPage.qml:457 dashboard/qml/WizardPage.qml:494
|
||||
#, kde-format
|
||||
@@ -932,12 +918,12 @@ msgstr "Dokončiť"
|
||||
msgid "Finished"
|
||||
msgstr "Hotovo"
|
||||
|
||||
#: dashboard/wivrn_server.cpp:592
|
||||
#: dashboard/wivrn_server.cpp:584
|
||||
#, kde-format
|
||||
msgid "xrizer"
|
||||
msgstr "xrizer"
|
||||
|
||||
#: dashboard/wivrn_server.cpp:593
|
||||
#: dashboard/wivrn_server.cpp:585
|
||||
#, kde-format
|
||||
msgid "Open Composite"
|
||||
msgstr "Open Composite"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user