Skip to content

Commit 6fa5edd

Browse files
authored
Fix incorrect create image view error message (#334)
The function "createImageView" has a somewhat incorrect error message, saying that it failed to create a texture image view. However, the function is also used by more than simply the texture image view creation process(e.g., the swapchain image view creation process, "createImageViews").
1 parent e064106 commit 6fa5edd

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

code/25_sampler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ class HelloTriangleApplication {
782782

783783
VkImageView imageView;
784784
if (vkCreateImageView(device, &viewInfo, nullptr, &imageView) != VK_SUCCESS) {
785-
throw std::runtime_error("failed to create texture image view!");
785+
throw std::runtime_error("failed to create image view!");
786786
}
787787

788788
return imageView;

code/26_texture_mapping.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ class HelloTriangleApplication {
796796

797797
VkImageView imageView;
798798
if (vkCreateImageView(device, &viewInfo, nullptr, &imageView) != VK_SUCCESS) {
799-
throw std::runtime_error("failed to create texture image view!");
799+
throw std::runtime_error("failed to create image view!");
800800
}
801801

802802
return imageView;

code/27_depth_buffering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ class HelloTriangleApplication {
873873

874874
VkImageView imageView;
875875
if (vkCreateImageView(device, &viewInfo, nullptr, &imageView) != VK_SUCCESS) {
876-
throw std::runtime_error("failed to create texture image view!");
876+
throw std::runtime_error("failed to create image view!");
877877
}
878878

879879
return imageView;

code/28_model_loading.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ class HelloTriangleApplication {
880880

881881
VkImageView imageView;
882882
if (vkCreateImageView(device, &viewInfo, nullptr, &imageView) != VK_SUCCESS) {
883-
throw std::runtime_error("failed to create texture image view!");
883+
throw std::runtime_error("failed to create image view!");
884884
}
885885

886886
return imageView;

code/29_mipmapping.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ class HelloTriangleApplication {
974974

975975
VkImageView imageView;
976976
if (vkCreateImageView(device, &viewInfo, nullptr, &imageView) != VK_SUCCESS) {
977-
throw std::runtime_error("failed to create texture image view!");
977+
throw std::runtime_error("failed to create image view!");
978978
}
979979

980980
return imageView;

code/30_multisampling.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ class HelloTriangleApplication {
10241024

10251025
VkImageView imageView;
10261026
if (vkCreateImageView(device, &viewInfo, nullptr, &imageView) != VK_SUCCESS) {
1027-
throw std::runtime_error("failed to create texture image view!");
1027+
throw std::runtime_error("failed to create image view!");
10281028
}
10291029

10301030
return imageView;

en/06_Texture_mapping/01_Image_view_and_sampler.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ VkImageView createImageView(VkImage image, VkFormat format) {
7676

7777
VkImageView imageView;
7878
if (vkCreateImageView(device, &viewInfo, nullptr, &imageView) != VK_SUCCESS) {
79-
throw std::runtime_error("failed to create texture image view!");
79+
throw std::runtime_error("failed to create image view!");
8080
}
8181

8282
return imageView;

0 commit comments

Comments
 (0)