Changeset 7f60b28 in opengl-game for vulkan-utils.hpp
- Timestamp:
- Jan 24, 2021, 5:22:33 PM (4 years ago)
- Branches:
- feature/imgui-sdl
- Children:
- 3f32dfd
- Parents:
- 6a39266
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-utils.hpp
r6a39266 r7f60b28 8 8 #include <vulkan/vulkan.h> 9 9 10 // TODO: Ideally, vulkan-utils should not have things speciic to windowing apis (glfw, sdl, sfml, etc.). 11 // Check what these inclydes are for and if that functionality can be moved 10 12 #include <SDL2/SDL.h> 11 13 #include <SDL2/SDL_vulkan.h> … … 20 22 return graphicsFamily.has_value() && presentFamily.has_value(); 21 23 } 22 };23 24 struct SwapChainSupportDetails {25 VkSurfaceCapabilitiesKHR capabilities;26 vector<VkSurfaceFormatKHR> formats;27 vector<VkPresentModeKHR> presentModes;28 24 }; 29 25 … … 50 46 static bool checkDeviceExtensionSupport(VkPhysicalDevice physicalDevice, 51 47 const vector<const char*>& deviceExtensions); 52 static SwapChainSupportDetails querySwapChainSupport(VkPhysicalDevice physicalDevice, 53 VkSurfaceKHR surface); 54 static VkSurfaceFormatKHR chooseSwapSurfaceFormat(const vector<VkSurfaceFormatKHR>& availableFormats); 55 static VkPresentModeKHR chooseSwapPresentMode(const vector<VkPresentModeKHR>& availablePresentModes); 48 static VkSurfaceCapabilitiesKHR querySwapChainCapabilities(VkPhysicalDevice physicalDevice, 49 VkSurfaceKHR surface); 50 static vector<VkSurfaceFormatKHR> querySwapChainFormats(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface); 51 static vector<VkPresentModeKHR> querySwapChainPresentModes(VkPhysicalDevice physicalDevice, 52 VkSurfaceKHR surface); 53 static VkSurfaceFormatKHR chooseSwapSurfaceFormat(const vector<VkSurfaceFormatKHR>& availableFormats, 54 const vector<VkFormat>& requestedFormats, VkColorSpaceKHR requestedColorSpace); 55 static VkPresentModeKHR chooseSwapPresentMode(const vector<VkPresentModeKHR>& availablePresentModes, 56 const vector<VkPresentModeKHR>& requestedPresentModes); 56 57 static VkExtent2D chooseSwapExtent(const VkSurfaceCapabilitiesKHR& capabilities, int width, int height); 57 58 static VkImageView createImageView(VkDevice device, VkImage image, VkFormat format,
Note:
See TracChangeset
for help on using the changeset viewer.