added VulkanDeviceCreater::ChooseSurfaceFormat
This commit is contained in:
@@ -140,6 +140,17 @@ struct PreferFormats
|
||||
//偏好格式需从低质量到高质量排列
|
||||
const VkFormat *formats;
|
||||
uint count;
|
||||
|
||||
public:
|
||||
|
||||
const int Find(const VkFormat fmt)const
|
||||
{
|
||||
for(int i=0;i<count;i++)
|
||||
if(fmt==formats[i])
|
||||
return i;
|
||||
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
|
||||
constexpr const PreferFormats PreferLDR {SwapchainPreferFormatsLDR, sizeof(SwapchainPreferFormatsLDR )/sizeof(VkFormat)};
|
||||
@@ -168,11 +179,16 @@ protected:
|
||||
|
||||
VkSurfaceKHR surface;
|
||||
|
||||
VkSurfaceFormatKHR surface_format;
|
||||
VkSurfaceFormat2KHR surface_format2;
|
||||
|
||||
CharPointerList ext_list;
|
||||
VkPhysicalDeviceFeatures features={};
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
VkDevice CreateDevice(const uint32_t);
|
||||
|
||||
public:
|
||||
@@ -196,6 +212,8 @@ public:
|
||||
|
||||
virtual bool RequirementCheck();
|
||||
|
||||
virtual void ChooseSurfaceFormat();
|
||||
|
||||
virtual GPUDevice *CreateRenderDevice();
|
||||
|
||||
public:
|
||||
|
Reference in New Issue
Block a user