35 lines
No EOL
1.5 KiB
C
35 lines
No EOL
1.5 KiB
C
#ifndef __SWAPCHAIN_H__
|
|
#define __SWAPCHAIN_H__
|
|
#include <vulkan/vulkan_core.h>
|
|
|
|
VkSurfaceFormatKHR *svlk_getSurfaceFormats(VkPhysicalDevice physDevice, VkSurfaceKHR surface, unsigned int *len);
|
|
|
|
VkPresentModeKHR *svlk_getPresentModes(VkPhysicalDevice physDevice, VkSurfaceKHR surface, unsigned int *len);
|
|
|
|
VkSurfaceFormatKHR svlk_selectSwapchainFormatFromList(VkSurfaceFormatKHR *surfaceFormats, VkFormat format, VkColorSpaceKHR colorSpace, unsigned int *len);
|
|
|
|
VkSurfaceFormatKHR svlk_selectSwapchainFormat(VkPhysicalDevice physDevice, VkSurfaceKHR surface, VkFormat format, VkColorSpaceKHR colorSpace);
|
|
|
|
VkExtent2D svlk_checkSwapchainExtent(const VkSurfaceCapabilitiesKHR *capabilities, int w, int h);
|
|
|
|
VkSwapchainCreateInfoKHR svlk_createSwapchainCreateinfo(
|
|
unsigned int imageCount,
|
|
VkSurfaceKHR surface,
|
|
VkSurfaceFormatKHR format,
|
|
VkPresentModeKHR presentMode,
|
|
VkExtent2D extent,
|
|
int arrayLayers,
|
|
unsigned int usage,
|
|
VkSurfaceTransformFlagBitsKHR pretransform
|
|
);
|
|
|
|
void svlk_selectSharingMode(VkSwapchainCreateInfoKHR *createinfo, int concurrent, unsigned int *queueFamilies, int queueFamiliesNum);
|
|
|
|
VkResult svlk_createSwapchain();
|
|
|
|
VkImage *svlk_getSwapchainImages(VkDevice device, VkSwapchainKHR swapchain, unsigned int *imageCount);
|
|
|
|
VkImageViewCreateInfo svlk_createVkImageViewCreateInfo(VkImage image, VkImageViewType viewtype, VkFormat format);
|
|
VkResult svlk_createVkImageView(VkDevice device, VkImage image, VkImageViewType viewtype, VkFormat format, VkImageView *imageView);
|
|
|
|
#endif |