93 static void keyCallback(GLFWwindow*
window,
int key,
int scancode,
int action,
int mods);
The application context is the core class which stores the basic openxr and vulkan objects.
void connect(const Headset *headset, const Renderer *renderer)
Connects the mirror view to the headset pointer and the renderer pointer.
const Renderer * renderer
void recreateSwapchain()
Recreates the swapchain. Can be called when no swapchain exists yet to create one.
VkSurfaceKHR mirrorSurface
MirrorView::RenderResult render(uint32_t swapchainImageIndex)
Renders the given swapchainImageIndex.
static bool hasBeenRestored
uint32_t mirrorDestinationImageIndex
uint32_t xrSwapchainImageIndex
VkSwapchainKHR swapchain
The swapchain on which the images to display are swapped.
void cleanup()
Cleanup resources allocated by MirrorView.
static bool hasWindowBeenResized
ApplicationContext * context
A pointer to the engines application context.
GLFWwindow * getGlfwWindow() const
Gets glfw window.
VkSurfaceKHR getSurface() const
Gets the surface.
static void iconifyCallback(GLFWwindow *window, int iconified)
Callback, called when the window gets minimized or gets unfocused.
bool isMirrorResizeDetected
static void framebufferResizeCallback(GLFWwindow *window, int width, int height)
Callback, called when the framebuffer gets resized. Aka the window gets resized.
MirrorView(ApplicationContext *context=nullptr)
VkExtent2D swapchainResolution
The swapchain resolution.
static void keyCallback(GLFWwindow *window, int key, int scancode, int action, int mods)
Callback, called when glfw detects a key press.
std::vector< VkImage > mirrorSwapchainImages
The mirror swapchain images.
The renderer is the main class for rendering. It owns all data which is used any time in any frame....
Log category system implementation.
Values that represent mirror view render results.
VkSemaphore imageAvailableSemaphore