Create an image view for our texture
| 2077 | |
| 2078 | // Create an image view for our texture |
| 2079 | void setupTextureImageView() |
| 2080 | { |
| 2081 | VkImageViewCreateInfo imageViewCreateInfo = VkImageViewCreateInfo(); |
| 2082 | imageViewCreateInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; |
| 2083 | imageViewCreateInfo.image = textureImage; |
| 2084 | imageViewCreateInfo.viewType = VK_IMAGE_VIEW_TYPE_2D; |
| 2085 | imageViewCreateInfo.format = VK_FORMAT_R8G8B8A8_UNORM; |
| 2086 | imageViewCreateInfo.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; |
| 2087 | imageViewCreateInfo.subresourceRange.baseMipLevel = 0; |
| 2088 | imageViewCreateInfo.subresourceRange.levelCount = 1; |
| 2089 | imageViewCreateInfo.subresourceRange.baseArrayLayer = 0; |
| 2090 | imageViewCreateInfo.subresourceRange.layerCount = 1; |
| 2091 | |
| 2092 | // Create our texture image view |
| 2093 | if (vkCreateImageView(device, &imageViewCreateInfo, nullptr, &textureImageView) != VK_SUCCESS) |
| 2094 | { |
| 2095 | vulkanAvailable = false; |
| 2096 | return; |
| 2097 | } |
| 2098 | } |
| 2099 | |
| 2100 | // Create a sampler for our texture |
| 2101 | void setupTextureSampler() |
nothing calls this directly
no test coverage detected