![]() |
HoviTron Video Pipeline
|
Class that take care of the tasks linked to OpenXR (input and display), is used when HMD support is requested.
More...
#include <WindowOpenXR.h>
Public Member Functions | |
void | initWindow () override |
void | continueInit () override |
void | cleanUp () override |
void | cleanUpSurface () override |
void | mainLoop (VulkanDrawing *vulkanDrawing) override |
void | createSurface () override |
std::vector< const char * > | getRequiredExtensions () override |
VkBool32 | isDeviceSupportingSufaceKHR (VkPhysicalDevice device, int i) override |
std::vector< const char * > | getRequiredDeviceExtensions () override |
SwapChainSupportDetails | querySwapChainSupport (vk::PhysicalDevice device) override |
void | getFrameBufferSize (int *w, int *h, vk::PhysicalDevice &pDevice) override |
bool | isSynchroWithSemaphore () override |
bool | isDepthRecquired () override |
const bool | useOpenXR () override |
vk::Image | getSwapchainImage (int view, int index) override |
void | resetOrigin () override |
void | framebufferResizeCallback () |
void | checkForCorrectSize () |
std::vector< vk::Image > | getBlitDestinations (int view, int elem) override |
std::vector< vk::Extent2D > | getBlitExtentDestinations (int view, int elem) override |
virtual std::vector< vk::Semaphore > | getSemaphoreWait (int view, int elem) override |
virtual std::vector< vk::Semaphore > | getSemaphoreSignal (int view, int elem) override |
void | getVulkanPhysicalDevice (VkInstance &vkInstance, VkPhysicalDevice *physicalDevice) |
void | createVulkanDevice (VkPhysicalDevice &physicalDevice, VkDeviceCreateInfo &info, VkDevice *device) |
void | pollEvents (bool *exitRenderLoop, bool *requestRestart) |
bool | isSessionRunning () |
void | setRotation (glm::quat &q, int view) |
void | setMirror (bool mirrorActivated) |
![]() | |
virtual void | initWindow ()=0 |
virtual void | continueInit ()=0 |
virtual void | cleanUp ()=0 |
virtual void | cleanUpSurface ()=0 |
virtual void | mainLoop (VulkanDrawing *vulkanDrawing)=0 |
virtual void | createSurface ()=0 |
virtual std::vector< const char * > | getRequiredExtensions ()=0 |
const bool | isValidationLayersEnabled () |
virtual VkBool32 | isDeviceSupportingSufaceKHR (VkPhysicalDevice device, int i)=0 |
virtual std::vector< const char * > | getRequiredDeviceExtensions ()=0 |
virtual SwapChainSupportDetails | querySwapChainSupport (vk::PhysicalDevice device)=0 |
bool | isSwapChainNeeded () |
bool | isIndepFromWindowDimension () |
virtual const bool | useOpenXR () |
virtual bool | isDepthRecquired () |
virtual bool | isSynchroWithSemaphore ()=0 |
virtual void | getFrameBufferSize (int *w, int *h, vk::PhysicalDevice &pDevice)=0 |
void | setWrapper (VulkanWrapper *wraps) |
virtual void | checkForCorrectSize ()=0 |
virtual vk::Buffer | getRenderingDestination () |
virtual vk::Image | getSwapchainImage (int view, int index) |
virtual vk::Image | getDepthSwapchainImage (int view, int index) |
glm::vec3 | getTranslation () |
void | setRotation (float v0, float v1, float v3) |
glm::vec3 | getRotation () |
virtual std::vector< vk::Image > | getBlitDestinations (int view, int elem) |
virtual std::vector< vk::Extent2D > | getBlitExtentDestinations (int view, int elem) |
virtual std::vector< vk::Semaphore > | getSemaphoreWait (int view, int elem) |
virtual std::vector< vk::Semaphore > | getSemaphoreSignal (int view, int elem) |
vk::ImageView | getSwapchainImageView (int view, int elem) |
vk::ImageView | getDepthSwapchainImageView (int view, int elem) |
int | getViewNumber () |
int | getAttachmentSize () |
virtual vk::Extent2D | getSwapchainExtent (int view) |
virtual vk::Format | getSwapchainFormat (int view) |
virtual vk::Format | getDepthSwapchainFormat (int view) |
virtual void | resetOrigin ()=0 |
virtual | ~WindowAbstract ()=default |
Additional Inherited Members | |
![]() | |
std::vector< std::unique_ptr< SwapchainAbstract > > | swapchains |
std::vector< std::unique_ptr< SwapchainAbstract > > | depthSwapchains |
bool | separateFromWindowDim = false |
const std::vector< const char * > | deviceExtensions |
VulkanWrapper * | wrapper = nullptr |
glm::vec3 | currentRotation = {0,0,0} |
glm::vec3 | currentTranslation = {0,0,0} |
bool | needSwapchain = true |
bool | initialised = false |
const bool | enableValidationLayers = false |
bool | qualibrationMode = false |
int | selectedCamera = -1 |
Class that take care of the tasks linked to OpenXR (input and display), is used when HMD support is requested.
This class have to take care of all the task linked to OpenXR (initialization, main loop, input handling, ... ). To properly use the light field in Creal headset, 2 extensions of OpenXR should be supported: XR_VARJO_QUAD_VIEWS and XR_KHR_COMPOSITION_LAYER_DEPTH The management of the swapchain is delegated to SwapchainOpenXR class. This class is also able to create a "mirror" window that will show the result of the rendering of the first view (usually left eye) Contains a lot of platform dependent code. Android related code is present as a legacy, please don't use it.
Definition at line 52 of file WindowOpenXR.h.
|
virtual |
Make no sense in this context
Implements WindowAbstract.
Definition at line 426 of file WindowOpenXR.cpp.
|
overridevirtual |
Clean up allocated ressources
Implements WindowAbstract.
Definition at line 171 of file WindowOpenXR.cpp.
|
overridevirtual |
Clean up mirror swapchain if needed
Implements WindowAbstract.
Definition at line 233 of file WindowOpenXR.cpp.
|
overridevirtual |
Continue initialisation after context
Implements WindowAbstract.
Definition at line 136 of file WindowOpenXR.cpp.
|
overridevirtual |
Create surface for the mirror if needed
Implements WindowAbstract.
Definition at line 281 of file WindowOpenXR.cpp.
void WindowOpenXR::createVulkanDevice | ( | VkPhysicalDevice & | physicalDevice, |
VkDeviceCreateInfo & | info, | ||
VkDevice * | device | ||
) |
Let OpenXR create the Vulkan Device
Definition at line 721 of file WindowOpenXR.cpp.
void WindowOpenXR::framebufferResizeCallback | ( | ) |
|
overridevirtual |
Obtain destination for blit operation
Reimplemented from WindowAbstract.
Definition at line 430 of file WindowOpenXR.cpp.
|
overridevirtual |
Obtain extent destination for blit operation
Reimplemented from WindowAbstract.
Definition at line 439 of file WindowOpenXR.cpp.
|
overridevirtual |
return the framebuffer size
Implements WindowAbstract.
Definition at line 408 of file WindowOpenXR.cpp.
|
overridevirtual |
Return required extensions for the Vulkan Device
Implements WindowAbstract.
Definition at line 366 of file WindowOpenXR.cpp.
|
overridevirtual |
Return required extensions for Vulkan Instance
Implements WindowAbstract.
Definition at line 292 of file WindowOpenXR.cpp.
|
overridevirtual |
Return semaphore to signal end of rendering
Reimplemented from WindowAbstract.
Definition at line 457 of file WindowOpenXR.cpp.
|
overridevirtual |
Return semaphore to wait for mirror image acquisition
Reimplemented from WindowAbstract.
Definition at line 448 of file WindowOpenXR.cpp.
|
overridevirtual |
Return the image of the swapchain image at a certain index
Reimplemented from WindowAbstract.
Definition at line 1409 of file WindowOpenXR.cpp.
void WindowOpenXR::getVulkanPhysicalDevice | ( | VkInstance & | vkInstance, |
VkPhysicalDevice * | physicalDevice | ||
) |
Let OpenXR choose the device
Definition at line 705 of file WindowOpenXR.cpp.
|
overridevirtual |
Start the initialization of OpenXR
Implements WindowAbstract.
Definition at line 110 of file WindowOpenXR.cpp.
|
overridevirtual |
return true if depth is needed by the window
Reimplemented from WindowAbstract.
Definition at line 917 of file WindowOpenXR.cpp.
|
overridevirtual |
Return true if the device support the surface
Implements WindowAbstract.
Definition at line 353 of file WindowOpenXR.cpp.
bool WindowOpenXR::isSessionRunning | ( | ) |
Return true if the session is still running
Definition at line 1349 of file WindowOpenXR.cpp.
|
overridevirtual |
return true if semaphore are used for synchronization
Implements WindowAbstract.
Definition at line 412 of file WindowOpenXR.cpp.
|
overridevirtual |
Main rendering loop
Implements WindowAbstract.
Definition at line 242 of file WindowOpenXR.cpp.
void WindowOpenXR::pollEvents | ( | bool * | exitRenderLoop, |
bool * | requestRestart | ||
) |
Process OpenXR events
Definition at line 928 of file WindowOpenXR.cpp.
|
overridevirtual |
Check for what format and present mode the swapchain support
Implements WindowAbstract.
Definition at line 399 of file WindowOpenXR.cpp.
|
overridevirtual |
Reset the origin, Which means that we will store some offset values to cancel the rotation and translation return by the OpenXR runtime.
Implements WindowAbstract.
Definition at line 1491 of file WindowOpenXR.cpp.
void WindowOpenXR::setMirror | ( | bool | mirrorActivated | ) |
activate the glfw mirror
Definition at line 909 of file WindowOpenXR.cpp.
void WindowOpenXR::setRotation | ( | glm::quat & | q, |
int | view | ||
) |
Use the quaternion to set the current rotation (euler angles)
Definition at line 1353 of file WindowOpenXR.cpp.
|
overridevirtual |
Return true (because OpenXr is used)
Reimplemented from WindowAbstract.
Definition at line 166 of file WindowOpenXR.cpp.