Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 712235a

Browse files
authored
stagingImage to textureImage
staging image wasn't defined anywhere in the code up to this point.
1 parent 6cfdafa commit 712235a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

06_Texture_mapping/00_Images.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ this in the depth buffer chapter, where we'll implement such a system.
301301

302302
```c++
303303
VkMemoryRequirements memRequirements;
304-
vkGetImageMemoryRequirements(device, stagingImage, &memRequirements);
304+
vkGetImageMemoryRequirements(device, textureImage, &memRequirements);
305305

306306
VkMemoryAllocateInfo allocInfo = {};
307307
allocInfo.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
@@ -312,7 +312,7 @@ if (vkAllocateMemory(device, &allocInfo, nullptr, &textureImageMemory) != VK_SUC
312312
throw std::runtime_error("failed to allocate image memory!");
313313
}
314314

315-
vkBindImageMemory(device, stagingImage, textureImageMemory, 0);
315+
vkBindImageMemory(device, textureImage, textureImageMemory, 0);
316316
```
317317
318318
Allocating memory for an image works in exactly the same way as allocating
@@ -721,4 +721,4 @@ the graphics pipeline. We'll work on that in the next chapter.
721721

722722
[C++ code](/code/texture_image.cpp) /
723723
[Vertex shader](/code/shader_ubo.vert) /
724-
[Fragment shader](/code/shader_ubo.frag)
724+
[Fragment shader](/code/shader_ubo.frag)

0 commit comments

Comments
 (0)