From 11c45170c3322ea962e9fe84e498a594782bdf5b Mon Sep 17 00:00:00 2001 From: aliasifhuawei Date: Tue, 10 Dec 2024 13:25:51 -0800 Subject: [PATCH] indent fix --- samples/api/hello_triangle_1_3/README.adoc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/samples/api/hello_triangle_1_3/README.adoc b/samples/api/hello_triangle_1_3/README.adoc index c30bcdba3..37544e137 100644 --- a/samples/api/hello_triangle_1_3/README.adoc +++ b/samples/api/hello_triangle_1_3/README.adoc @@ -126,37 +126,37 @@ Unlike the original sample, which used hard-coded vertices in the shader, this s - **Vertex Structure Defined:** - ```cpp +```cpp struct Vertex { glm::vec2 position; glm::vec3 color; }; - ``` +``` - **Vertex Data Stored in a Buffer:** - ```cpp +```cpp std::vector vertices = { {{0.5f, -0.5f}, {1.0f, 0.0f, 0.0f}}, // Red Vertex // ... other vertices ... }; - ``` +``` - **Buffer Creation and Memory Allocation:** - ```cpp +```cpp VkBufferCreateInfo buffer_info = { /* ... */ }; vkCreateBuffer(device, &buffer_info, nullptr, &vertex_buffer); VkMemoryAllocateInfo alloc_info = { /* ... */ }; vkAllocateMemory(device, &alloc_info, nullptr, &vertex_buffer_memory); - ``` +``` - **Binding the Vertex Buffer:** - ```cpp +```cpp vkCmdBindVertexBuffers(cmd, 0, 1, &vertex_buffer, &offset); - ``` +``` **Benefits:**