Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ temp_ebook.md
ebook/*.pdf
ebook/*.epub

convert.py
convert.py

attachments/build/
2 changes: 1 addition & 1 deletion attachments/07_image_views.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class HelloTriangleApplication {
}

void createImageViews() {
swapChainImageViews.clear();
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
Expand Down
2 changes: 1 addition & 1 deletion attachments/08_graphics_pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class HelloTriangleApplication {
}

void createImageViews() {
swapChainImageViews.clear();
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
Expand Down
2 changes: 1 addition & 1 deletion attachments/09_shader_modules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class HelloTriangleApplication {
}

void createImageViews() {
swapChainImageViews.clear();
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
Expand Down
2 changes: 1 addition & 1 deletion attachments/10_fixed_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ class HelloTriangleApplication {
}

void createImageViews() {
swapChainImageViews.clear();
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
Expand Down
2 changes: 1 addition & 1 deletion attachments/12_graphics_pipeline_complete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class HelloTriangleApplication {
}

void createImageViews() {
swapChainImageViews.clear();
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
Expand Down
2 changes: 1 addition & 1 deletion attachments/14_command_buffers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class HelloTriangleApplication {
}

void createImageViews() {
swapChainImageViews.clear();
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
Expand Down
2 changes: 1 addition & 1 deletion attachments/15_hello_triangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class HelloTriangleApplication {
}

void createImageViews() {
swapChainImageViews.clear();
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
Expand Down
2 changes: 1 addition & 1 deletion attachments/16_frames_in_flight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class HelloTriangleApplication {
}

void createImageViews() {
swapChainImageViews.clear();
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
Expand Down
2 changes: 1 addition & 1 deletion attachments/17_swap_chain_recreation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ class HelloTriangleApplication {
}

void createImageViews() {
swapChainImageViews.clear();
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
Expand Down
2 changes: 1 addition & 1 deletion attachments/18_vertex_input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ class HelloTriangleApplication {
}

void createImageViews() {
swapChainImageViews.clear();
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
Expand Down
2 changes: 2 additions & 0 deletions attachments/19_vertex_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ class HelloTriangleApplication {
}

void createImageViews() {
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
for ( auto image : swapChainImages )
Expand Down
2 changes: 2 additions & 0 deletions attachments/20_staging_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ class HelloTriangleApplication {
}

void createImageViews() {
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
for ( auto image : swapChainImages )
Expand Down
2 changes: 2 additions & 0 deletions attachments/21_index_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ class HelloTriangleApplication {
}

void createImageViews() {
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
for ( auto image : swapChainImages )
Expand Down
2 changes: 2 additions & 0 deletions attachments/22_descriptor_layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,8 @@ class HelloTriangleApplication {
}

void createImageViews() {
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
for ( auto image : swapChainImages )
Expand Down
2 changes: 2 additions & 0 deletions attachments/23_descriptor_sets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ class HelloTriangleApplication {
}

void createImageViews() {
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
for ( auto image : swapChainImages )
Expand Down
2 changes: 2 additions & 0 deletions attachments/24_texture_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,8 @@ class HelloTriangleApplication {
}

void createImageViews() {
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
for ( auto image : swapChainImages )
Expand Down
2 changes: 2 additions & 0 deletions attachments/25_sampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,8 @@ class HelloTriangleApplication {
}

void createImageViews() {
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
for ( auto image : swapChainImages )
Expand Down
2 changes: 2 additions & 0 deletions attachments/26_texture_mapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,8 @@ class HelloTriangleApplication {
}

void createImageViews() {
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
for ( auto image : swapChainImages )
Expand Down
2 changes: 2 additions & 0 deletions attachments/27_depth_buffering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,8 @@ class HelloTriangleApplication {
}

void createImageViews() {
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{
.viewType = vk::ImageViewType::e2D,
.format = swapChainSurfaceFormat.format,
Expand Down
2 changes: 2 additions & 0 deletions attachments/28_model_loading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,8 @@ class HelloTriangleApplication {
}

void createImageViews() {
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{
.viewType = vk::ImageViewType::e2D,
.format = swapChainSurfaceFormat.format,
Expand Down
2 changes: 2 additions & 0 deletions attachments/29_mipmapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,8 @@ class HelloTriangleApplication {
}

void createImageViews() {
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{
.viewType = vk::ImageViewType::e2D,
.format = swapChainSurfaceFormat.format,
Expand Down
2 changes: 2 additions & 0 deletions attachments/30_multisampling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,8 @@ class HelloTriangleApplication {
}

void createImageViews() {
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{
.viewType = vk::ImageViewType::e2D,
.format = swapChainSurfaceFormat.format,
Expand Down
2 changes: 2 additions & 0 deletions attachments/31_compute_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,8 @@ class ComputeShaderApplication {
}

void createImageViews() {
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{
.viewType = vk::ImageViewType::e2D,
.format = swapChainSurfaceFormat.format,
Expand Down
2 changes: 2 additions & 0 deletions attachments/32_ecosystem_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,8 @@ class HelloTriangleApplication {
}

void createImageViews() {
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{
.viewType = vk::ImageViewType::e2D,
.format = swapChainSurfaceFormat.format,
Expand Down
2 changes: 2 additions & 0 deletions attachments/33_vulkan_profiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ class HelloTriangleApplication {
imageView = nullptr;
}

swapChainImageViews.clear();
swapChain = nullptr;
}

Expand Down Expand Up @@ -493,6 +494,7 @@ class HelloTriangleApplication {
}

void createImageViews() {
assert(swapChainImageViews.empty());
swapChainImageViews.reserve(swapChainImages.size());

for (const auto& image : swapChainImages) {
Expand Down
2 changes: 2 additions & 0 deletions attachments/34_android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@ class HelloTriangleApplication {

// Create image views
void createImageViews() {
assert(swapChainImageViews.empty());
swapChainImageViews.reserve(swapChainImages.size());

for (const auto& image : swapChainImages) {
Expand Down Expand Up @@ -1202,6 +1203,7 @@ class HelloTriangleApplication {
imageView = nullptr;
}

swapChainImageViews.clear();
swapChain = nullptr;
}

Expand Down
2 changes: 2 additions & 0 deletions attachments/35_gltf_ktx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,8 @@ class VulkanApplication {
}

void createImageViews() {
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{
.viewType = vk::ImageViewType::e2D,
.format = swapChainSurfaceFormat.format,
Expand Down
2 changes: 2 additions & 0 deletions attachments/36_multiple_objects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,8 @@ class VulkanApplication {
}

void createImageViews() {
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{
.viewType = vk::ImageViewType::e2D,
.format = swapChainSurfaceFormat.format,
Expand Down
2 changes: 2 additions & 0 deletions attachments/37_multithreading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,8 @@ class MultithreadedApplication {
}

void createImageViews() {
assert(swapChainImageViews.empty());

vk::ImageViewCreateInfo imageViewCreateInfo{
.viewType = vk::ImageViewType::e2D,
.format = swapChainSurfaceFormat.format,
Expand Down
Loading