MCPcopy Create free account
hub / github.com/PacktPublishing/3D-Graphics-Rendering-Cookbook / createImageView

Function createImageView

shared/UtilsVulkan.cpp:1428–1449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1426// createImageView(device, image, /* whatever the format is */ VK_FORMAT_R32G32B32A32_SFLOAT, VK_IMAGE_ASPECT_COLOR_BIT, VkImageView* imageView, VK_IMAGE_VIEW_TYPE_3D, 1)
1427
1428bool createImageView(VkDevice device, VkImage image, VkFormat format, VkImageAspectFlags aspectFlags, VkImageView* imageView, VkImageViewType viewType, uint32_t layerCount, uint32_t mipLevels)
1429{
1430 const VkImageViewCreateInfo viewInfo =
1431 {
1432 .sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
1433 .pNext = nullptr,
1434 .flags = 0,
1435 .image = image,
1436 .viewType = viewType,
1437 .format = format,
1438 .subresourceRange =
1439 {
1440 .aspectMask = aspectFlags,
1441 .baseMipLevel = 0,
1442 .levelCount = mipLevels,
1443 .baseArrayLayer = 0,
1444 .layerCount = layerCount
1445 }
1446 };
1447
1448 return (vkCreateImageView(device, &viewInfo, nullptr, imageView) == VK_SUCCESS);
1449}
1450
1451bool createColorOnlyRenderPass(VulkanRenderDevice& vkDev, VkRenderPass* renderPass, const RenderPassCreateInfo& ci, VkFormat colorFormat)
1452{

Callers 15

initVulkanFunction · 0.85
createSwapchainImagesFunction · 0.85
createDepthResourcesFunction · 0.85
loadCubeMapMethod · 0.85
loadKTXMethod · 0.85
loadTexture2DMethod · 0.85
addRGBATextureMethod · 0.85
addSolidRGBATextureMethod · 0.85
addColorTextureMethod · 0.85
addDepthTextureMethod · 0.85
createFontTextureMethod · 0.85
loadTextureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected