![]() |
HoviTron Video Pipeline
|
Abstraction of the way of the result is displayed (screen or HMD). More...
#include <WindowAbstract.h>
Public Member Functions | |
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 |
Protected Attributes | |
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 |
Abstraction of the way of the result is displayed (screen or HMD).
The purpose of this abstract class is to abstract the final rendering hardware (computer screen or HMD) and the control/inputs attached to it) from the rest of the code that does the rendering job. This class also contains the mainloop of the application Contains a lot of platform dependent code
Definition at line 44 of file WindowAbstract.h.
|
virtualdefault |
Destructor
|
pure virtual |
Check if the buffer have the correct size, if not recreate this
Implemented in WindowOpenXR, and WindowGLFW.
|
pure virtual |
Clean up ressources
Implemented in WindowGLFW, and WindowOpenXR.
|
pure virtual |
Clean up surface object if any
Implemented in WindowGLFW, and WindowOpenXR.
|
pure virtual |
Continue initialisation after context
Implemented in WindowGLFW, and WindowOpenXR.
|
pure virtual |
Create a Vulkan surface (if necessary)
Implemented in WindowGLFW, and WindowOpenXR.
int WindowAbstract::getAttachmentSize | ( | ) |
Return the number of attachment necessary
Definition at line 228 of file WindowAbstract.cpp.
|
virtual |
Get Additional rendering destination, for blit command. Usefull for the mirror in OpenXR mode
Reimplemented in WindowOpenXR.
Definition at line 62 of file WindowAbstract.cpp.
|
virtual |
Get the dimension of rendering destination, for blit command. Usefull for the mirror in OpenXR mode
Reimplemented in WindowOpenXR.
Definition at line 68 of file WindowAbstract.cpp.
|
virtual |
Get the format used for the depth attachments
Definition at line 222 of file WindowAbstract.cpp.
|
virtual |
Return one image of the depth swapchain at a certain index
Definition at line 204 of file WindowAbstract.cpp.
vk::ImageView WindowAbstract::getDepthSwapchainImageView | ( | int | view, |
int | elem | ||
) |
Return the vkimageView of the depthSwapchain
Definition at line 95 of file WindowAbstract.cpp.
|
pure virtual |
return the framebuffer size
Implemented in WindowGLFW, and WindowOpenXR.
|
virtual |
Return the buffer for the rendering destination when the swapchain are not used as result of the rendering
Definition at line 46 of file WindowAbstract.cpp.
|
pure virtual |
Return the extensions required by the vulkan device
Implemented in WindowGLFW, and WindowOpenXR.
|
pure virtual |
Return the required extension (for the vulkan instance) needed by the library in charge of diplaying
Implemented in WindowGLFW, and WindowOpenXR.
glm::vec3 WindowAbstract::getRotation | ( | ) |
|
virtual |
Return the semaphore that must be signaled
Reimplemented in WindowOpenXR.
Definition at line 84 of file WindowAbstract.cpp.
|
virtual |
Return the semaphore that must be waited for
Reimplemented in WindowOpenXR.
Definition at line 79 of file WindowAbstract.cpp.
|
virtual |
Get the vkExtent2D for the swapchain
Definition at line 210 of file WindowAbstract.cpp.
|
virtual |
Get the vkFormat of the swapchain
Definition at line 216 of file WindowAbstract.cpp.
|
virtual |
Return one image of the swapchain at a certain index
Reimplemented in WindowOpenXR.
Definition at line 199 of file WindowAbstract.cpp.
vk::ImageView WindowAbstract::getSwapchainImageView | ( | int | view, |
int | elem | ||
) |
Return the vkimageView of the swapchain
Definition at line 89 of file WindowAbstract.cpp.
glm::vec3 WindowAbstract::getTranslation | ( | ) |
int WindowAbstract::getViewNumber | ( | ) |
Return the number of view that must be waited for
Definition at line 101 of file WindowAbstract.cpp.
|
pure virtual |
First initialisation
Implemented in WindowGLFW, and WindowOpenXR.
|
virtual |
return true if depth is needed by the window
Reimplemented in WindowOpenXR.
Definition at line 117 of file WindowAbstract.cpp.
|
pure virtual |
Return true if the device support the surface
Implemented in WindowGLFW, and WindowOpenXR.
bool WindowAbstract::isIndepFromWindowDimension | ( | ) |
return true if rendering must be independent of screen dimension
Definition at line 34 of file WindowAbstract.cpp.
bool WindowAbstract::isSwapChainNeeded | ( | ) |
|
pure virtual |
return true if semaphore are used for synchronization
Implemented in WindowGLFW, and WindowOpenXR.
const bool WindowAbstract::isValidationLayersEnabled | ( | ) |
Return true if validation layer are activated
Definition at line 23 of file WindowAbstract.cpp.
|
pure virtual |
Main rendering loop
Implemented in WindowGLFW, and WindowOpenXR.
|
pure virtual |
Check for what format and present mode the swapchain support
Implemented in WindowGLFW, and WindowOpenXR.
|
pure virtual |
Reset the origin
Implemented in WindowGLFW, and WindowOpenXR.
void WindowAbstract::setRotation | ( | float | v0, |
float | v1, | ||
float | v3 | ||
) |
Set the Rotatation
Definition at line 107 of file WindowAbstract.cpp.
void WindowAbstract::setWrapper | ( | VulkanWrapper * | wraps | ) |
Set VulkanWrapper reference
Definition at line 40 of file WindowAbstract.cpp.
|
virtual |
return true if it use openXr window
Reimplemented in WindowOpenXR.
Definition at line 113 of file WindowAbstract.cpp.
|
protected |
Current Rotation in euler angles. These are defined using OpenXR space : +x = right + y = up + z = backward
Definition at line 148 of file WindowAbstract.h.
|
protected |
Current Translation. These are defined using OpenXR space : +x = right + y = up + z = backward
Definition at line 150 of file WindowAbstract.h.
|
protected |
depth swapchain of the window
Definition at line 129 of file WindowAbstract.h.
|
protected |
Default Vulkan device extension
Definition at line 135 of file WindowAbstract.h.
|
protected |
Decide if the validation layers should be activated.
Definition at line 167 of file WindowAbstract.h.
|
protected |
true if init process is finnish
Definition at line 154 of file WindowAbstract.h.
|
protected |
true if a swapchain is needed
Definition at line 152 of file WindowAbstract.h.
|
protected |
Used when qualibration should be adjusted using keyboard
Definition at line 171 of file WindowAbstract.h.
|
protected |
Camera selected when doing adjustement in calibration
Definition at line 173 of file WindowAbstract.h.
|
protected |
searate rendering from window dimension
Definition at line 132 of file WindowAbstract.h.
|
protected |
color swapchains of the window
Definition at line 127 of file WindowAbstract.h.
|
protected |
pointer to the wrapper
Definition at line 146 of file WindowAbstract.h.