15 const VkSamplerCreateInfo createInfo{
16 VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO,
37 VkSampler vkSampler{VK_NULL_HANDLE};
38 VkResult result = vkCreateSampler(static_cast<VkDevice>(
_device), &createInfo,
nullptr, &vkSampler);
41 *returnResult = result;
44 if (result != VK_SUCCESS) {
54 std::unique_ptr<API::Sampler> sampler = std::make_unique<API::Sampler>();
55 return build(*sampler, returnResult) ? std::move(sampler) :
nullptr;
VkBool32 _anisotropyEnable
bool build(API::Sampler &instance, VkResult *returnResult=nullptr)
VkBorderColor _borderColor
VkSamplerMipmapMode _mipmapMode
VkSamplerAddressMode _addressModeU
VkBool32 _unnormalizedCoordinates
Sampler(const API::Device &device)
const API::Device & _device
VkSamplerAddressMode _addressModeV
VkSamplerAddressMode _addressModeW