Fix spelling. minor adjustments

This commit is contained in:
Sascha Willems 2024-10-11 16:36:47 +02:00
parent a734964b21
commit ffe83aee08
2 changed files with 18 additions and 18 deletions

View file

@ -158,7 +158,7 @@ public:
throw "Could not find a suitable memory type!";
}
// Create the per-frame (in flight) sVulkan synchronization primitives used in this example
// Create the per-frame (in flight) Vulkan synchronization primitives used in this example
void createSynchronizationPrimitives()
{
for (uint32_t i = 0; i < MAX_CONCURRENT_FRAMES; i++) {
@ -237,7 +237,7 @@ public:
VK_CHECK_RESULT(vkCreateBuffer(device, &stagingBufferCI, nullptr, &stagingBuffer.handle));
vkGetBufferMemoryRequirements(device, stagingBuffer.handle, &memReqs);
memAlloc.allocationSize = memReqs.size;
// Request a host visible memory type that can be used to copy our data dto
// Request a host visible memory type that can be used to copy our data to
// Also request it to be coherent, so that writes are visible to the GPU right after unmapping the buffer
memAlloc.memoryTypeIndex = getMemoryTypeIndex(memReqs.memoryTypeBits, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT);
VK_CHECK_RESULT(vkAllocateMemory(device, &memAlloc, nullptr, &stagingBuffer.memory));
@ -558,7 +558,7 @@ public:
vertexInputBinding.inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
// Input attribute bindings describe shader attribute locations and memory layouts
std::array<VkVertexInputAttributeDescription, 2> vertexInputAttributs;
std::array<VkVertexInputAttributeDescription, 2> vertexInputAttributs{};
// These match the following shader layout (see triangle.vert):
// layout (location = 0) in vec3 inPos;
// layout (location = 1) in vec3 inColor;
@ -632,7 +632,7 @@ public:
void createUniformBuffers()
{
// Prepare and initialize the per-frame uniform buffer blocks containing shader uniforms
// Single uniforms like in OpenGL are no longer present in Vulkan. All Shader uniforms are passed via uniform buffer blocks
// Single uniforms like in OpenGL are no longer present in Vulkan. All shader uniforms are passed via uniform buffer blocks
VkBufferCreateInfo bufferInfo{ VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };
bufferInfo.size = sizeof(ShaderData);
// This buffer will be used as a uniform buffer