完善结构数据填充,好避免警告
This commit is contained in:
parent
17e3942a0e
commit
7557909ea5
@ -94,18 +94,26 @@ private:
|
|||||||
|
|
||||||
texture=vulkan::LoadTGATexture(OS_TEXT("lena.tga"),device);
|
texture=vulkan::LoadTGATexture(OS_TEXT("lena.tga"),device);
|
||||||
|
|
||||||
VkSamplerCreateInfo sampler_create_info{};
|
VkSamplerCreateInfo sampler_create_info;
|
||||||
|
|
||||||
sampler_create_info.magFilter = VK_FILTER_LINEAR;
|
sampler_create_info.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
|
||||||
sampler_create_info.minFilter = VK_FILTER_LINEAR;
|
sampler_create_info.pNext = nullptr;
|
||||||
sampler_create_info.mipmapMode = VK_SAMPLER_MIPMAP_MODE_LINEAR;
|
sampler_create_info.flags = 0;
|
||||||
sampler_create_info.addressModeU= VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
|
sampler_create_info.magFilter = VK_FILTER_LINEAR;
|
||||||
sampler_create_info.addressModeV= VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
|
sampler_create_info.minFilter = VK_FILTER_LINEAR;
|
||||||
sampler_create_info.addressModeW= VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
|
sampler_create_info.mipmapMode = VK_SAMPLER_MIPMAP_MODE_LINEAR;
|
||||||
sampler_create_info.mipLodBias = 0.0f;
|
sampler_create_info.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
|
||||||
sampler_create_info.compareOp = VK_COMPARE_OP_NEVER;
|
sampler_create_info.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
|
||||||
sampler_create_info.minLod = 0.0f;
|
sampler_create_info.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
|
||||||
sampler_create_info.maxLod = 1.0f;
|
sampler_create_info.mipLodBias = 0.0f;
|
||||||
|
sampler_create_info.anisotropyEnable = false;
|
||||||
|
sampler_create_info.maxAnisotropy = 0;
|
||||||
|
sampler_create_info.compareEnable = false;
|
||||||
|
sampler_create_info.compareOp = VK_COMPARE_OP_NEVER;
|
||||||
|
sampler_create_info.minLod = 0.0f;
|
||||||
|
sampler_create_info.maxLod = 1.0f;
|
||||||
|
sampler_create_info.borderColor = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK;
|
||||||
|
sampler_create_info.unnormalizedCoordinates = false;
|
||||||
|
|
||||||
sampler=device->CreateSampler(&sampler_create_info);
|
sampler=device->CreateSampler(&sampler_create_info);
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ RenderPass *Device::CreateRenderPass(List<VkFormat> color_format,VkFormat depth_
|
|||||||
|
|
||||||
for(uint i=0;i<atta_count;i++)
|
for(uint i=0;i<atta_count;i++)
|
||||||
{
|
{
|
||||||
|
attachments[i].flags = 0;
|
||||||
attachments[i].samples = VK_SAMPLE_COUNT_1_BIT;
|
attachments[i].samples = VK_SAMPLE_COUNT_1_BIT;
|
||||||
attachments[i].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR; //LOAD_OP_CLEAR代表LOAD时清空内容
|
attachments[i].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR; //LOAD_OP_CLEAR代表LOAD时清空内容
|
||||||
attachments[i].storeOp = VK_ATTACHMENT_STORE_OP_STORE; //STORE_OP_STROE代表SOTRE时储存内容
|
attachments[i].storeOp = VK_ATTACHMENT_STORE_OP_STORE; //STORE_OP_STROE代表SOTRE时储存内容
|
||||||
|
Loading…
x
Reference in New Issue
Block a user