Add FB hand mesh support with GLB fallback (#934)
Use the XR_FB_HAND_TRACKING_MESH extension to render hand models when supported, and fall back to the bundled GLB hand models otherwise. This fixes incorrect hand model rendering on PFDM MR device, Have tested with PFDM MR V4.5.0 version.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "vk/allocation.h"
|
||||
#include <fastgltf/tools.hpp>
|
||||
#include <fastgltf/types.hpp>
|
||||
#include <span>
|
||||
#include <vector>
|
||||
#include <vulkan/vulkan.hpp>
|
||||
|
||||
@@ -90,6 +91,12 @@ public:
|
||||
return add(alignment, data_to_add);
|
||||
}
|
||||
|
||||
size_t add_indices(std::span<const uint16_t> indices)
|
||||
{
|
||||
usage |= vk::BufferUsageFlagBits::eIndexBuffer;
|
||||
return add(4, indices.data(), indices.size_bytes());
|
||||
}
|
||||
|
||||
std::pair<size_t, vk::IndexType> add_indices(const fastgltf::Accessor & accessor)
|
||||
{
|
||||
usage |= vk::BufferUsageFlagBits::eIndexBuffer;
|
||||
|
||||
Reference in New Issue
Block a user