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

Skip to content

Commit 7027f38

Browse files
authored
Merge pull request #47 from AdenFlorian/patch-2
Fix leftover stagingImage references in images chapter
2 parents 3dc2663 + 48c8a5b commit 7027f38

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

06_Texture_mapping/00_Images.md

Lines changed: 2 additions & 2 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

0 commit comments

Comments
 (0)