vOOlkan
An object oriented approach to Vulkan
SwapchainPresentMode.h
Go to the documentation of this file.
1#ifndef VULKAN_SWAPCHAINPRESENTMODE
2#define VULKAN_SWAPCHAINPRESENTMODE
3
4#include <vulkan/vulkan.h>
5#include <vector>
6#include <functional>
7
8
9namespace Vulkan { class PhysicalDevice; class WindowSurface; namespace SwapchainOptions { class PresentMode; } }
10
16 public:
17
26 PresentMode(const PhysicalDevice& realGpu, const WindowSurface& windowSurface, std::function<VkPresentModeKHR(const std::vector<VkPresentModeKHR>&)> chooseBestPresentMode = chooseBestPresentMode);
27
28
29
30 PresentMode() = default;
31
32
38 const VkPresentModeKHR& operator+() const;
39
40
48 static bool isThereAnAvailablePresentMode(const PhysicalDevice& realGpu, const WindowSurface& windowSurface);
49
50 private:
51
52 //chooses the best present mode among the ones available
53 static VkPresentModeKHR chooseBestPresentMode(const std::vector<VkPresentModeKHR>& presentModes);
54
55 VkPresentModeKHR presentMode;
56};
57
58#endif
Represents the GPU (or any other device) that will be used with Vulkan to perform computer graphics.
Definition: PhysicalDevice.h:17
The present mode defines how the images of the swapchain are sent to the screen.
Definition: SwapchainPresentMode.h:15
static bool isThereAnAvailablePresentMode(const PhysicalDevice &realGpu, const WindowSurface &windowSurface)
Definition: SwapchainPresentMode.cpp:32
const VkPresentModeKHR & operator+() const
Returns the underlying VkPresentModeKHR.
Definition: SwapchainPresentMode.cpp:26
A window surface is the connection between Vulkan and the OS windows environment.
Definition: WindowSurface.h:13
Types of queue families.
Definition: Animations.h:17