Changeset 90a424f in opengl-game for vulkan-utils.hpp
- Timestamp:
- Sep 16, 2019, 7:04:53 PM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- fe5c3ba
- Parents:
- c6fec84
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-utils.hpp
rc6fec84 r90a424f 2 2 #define _VULKAN_UTILS_H 3 3 4 #include <optional> 4 5 #include <vector> 5 6 … … 7 8 8 9 using namespace std; 10 11 struct QueueFamilyIndices { 12 optional<uint32_t> graphicsFamily; 13 optional<uint32_t> presentFamily; 14 15 bool isComplete() { 16 return graphicsFamily.has_value() && presentFamily.has_value(); 17 } 18 }; 19 20 struct SwapChainSupportDetails { 21 VkSurfaceCapabilitiesKHR capabilities; 22 vector<VkSurfaceFormatKHR> formats; 23 vector<VkPresentModeKHR> presentModes; 24 }; 9 25 10 26 class VulkanUtils { … … 20 36 VkDebugUtilsMessengerEXT debugMessenger, 21 37 const VkAllocationCallbacks* pAllocator); 38 39 static QueueFamilyIndices findQueueFamilies(VkPhysicalDevice device, VkSurfaceKHR surface); 40 static bool checkDeviceExtensionSupport(VkPhysicalDevice device, const vector<const char*>& deviceExtensions); 41 static SwapChainSupportDetails querySwapChainSupport(VkPhysicalDevice device, VkSurfaceKHR surface); 22 42 }; 23 43
Note:
See TracChangeset
for help on using the changeset viewer.