Improvements in documentation

This commit is contained in:
Adam Sawicki 2017-09-27 14:14:42 +02:00
parent c7b3e7c85d
commit 951f66a841
3 changed files with 38 additions and 8 deletions

View file

@ -76,15 +76,15 @@ When you want to create a buffer or image:
VkBufferCreateInfo bufferInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };
bufferInfo.size = myBufferSize;
bufferInfo.size = 65536;
bufferInfo.usage = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;
VmaAllocationCreateInfo memReq = {};
memReq.usage = VMA_MEMORY_USAGE_GPU_ONLY;
VmaAllocationCreateInfo allocInfo = {};
allocInfo.usage = VMA_MEMORY_USAGE_GPU_ONLY;
VkBuffer buffer;
VmaAllocation allocation;
vmaCreateBuffer(allocator, &bufferInfo, &memReq, &buffer, &allocation, nullptr);
vmaCreateBuffer(allocator, &bufferInfo, &allocInfo, &buffer, &allocation, nullptr);
Don't forget to destroy your objects when no longer needed: