Remove useless code, add queue_family_index in scene class
This commit is contained in:
+2
-16
@@ -36,24 +36,10 @@ scene::scene() :
|
||||
device(application::instance().vk_device),
|
||||
physical_device(application::instance().vk_physical_device),
|
||||
queue(application::instance().vk_queue),
|
||||
commandpool(application::instance().vk_cmdpool)
|
||||
commandpool(application::instance().vk_cmdpool),
|
||||
queue_family_index(application::instance().vk_queue_family_index)
|
||||
{
|
||||
}
|
||||
|
||||
void scene::on_unfocused() {}
|
||||
void scene::on_focused() {}
|
||||
|
||||
vk::raii::Fence scene::create_fence(bool signaled)
|
||||
{
|
||||
vk::FenceCreateFlags flags{0};
|
||||
|
||||
if (signaled)
|
||||
flags = vk::FenceCreateFlagBits::eSignaled;
|
||||
|
||||
return vk::raii::Fence(device, vk::FenceCreateInfo{.flags = flags});
|
||||
}
|
||||
|
||||
vk::raii::Semaphore scene::create_semaphore()
|
||||
{
|
||||
return vk::raii::Semaphore(device, {});
|
||||
}
|
||||
|
||||
+1
-3
@@ -38,9 +38,7 @@ protected:
|
||||
vk::raii::PhysicalDevice& physical_device;
|
||||
vk::raii::Queue& queue;
|
||||
vk::raii::CommandPool& commandpool;
|
||||
|
||||
vk::raii::Fence create_fence(bool signaled = true);
|
||||
vk::raii::Semaphore create_semaphore();
|
||||
uint32_t queue_family_index;
|
||||
|
||||
public:
|
||||
scene();
|
||||
|
||||
@@ -112,7 +112,7 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
|
||||
.commandPool = *self->commandpool,
|
||||
.level = vk::CommandBufferLevel::ePrimary,
|
||||
.commandBufferCount = 1})[0]);
|
||||
self->fence = self->create_fence(false);
|
||||
self->fence = self->device.createFence({});
|
||||
|
||||
// Look up the XrActions for haptics
|
||||
self->haptics_actions[0].first = application::get_action("/user/hand/left/output/haptic").first;
|
||||
|
||||
Reference in New Issue
Block a user