From 213a43c929afb6612e199e0d2fb9ad8ff96a7192 Mon Sep 17 00:00:00 2001 From: macodeth Date: Fri, 10 Jul 2026 23:30:35 +0700 Subject: [PATCH] fix syntax bugs in command buffer chapter --- en/03_Drawing_a_triangle/03_Drawing/01_Command_buffers.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/en/03_Drawing_a_triangle/03_Drawing/01_Command_buffers.adoc b/en/03_Drawing_a_triangle/03_Drawing/01_Command_buffers.adoc index 4bf65359..cf0e4d3d 100644 --- a/en/03_Drawing_a_triangle/03_Drawing/01_Command_buffers.adoc +++ b/en/03_Drawing_a_triangle/03_Drawing/01_Command_buffers.adoc @@ -145,7 +145,7 @@ We always begin recording a command buffer by calling `vk::raii::CommandBuffer:: [,c++] ---- -commandBuffer->begin({}); +commandBuffer.begin({}); ---- The `flags` member of the `vk::CommandBufferBeginInfo` specifies how we're going to use the command buffer. @@ -237,7 +237,7 @@ vk::RenderingAttachmentInfo attachmentInfo = { .clearValue = clearColor}; ---- -The `imageView` parameter specifies which image view to render to. The `imageLayout` parameter specifies the layout the image will be in during rendering. The `loadOp` parameter specifies what to do with the image before rendering, and the `storeOp` parameter specifies what to do with the image after rendering. We're using `VK_ATTACHMENT_LOAD_OP_CLEAR` to clear the image to black before rendering, and `vk::AttachmentStoreOp::eStore` to store the rendered image for later use. +The `imageView` parameter specifies which image view to render to. The `imageLayout` parameter specifies the layout the image will be in during rendering. The `loadOp` parameter specifies what to do with the image before rendering, and the `storeOp` parameter specifies what to do with the image after rendering. We're using `vk::AttachmentLoadOp::eClear` to clear the image to black before rendering, and `vk::AttachmentStoreOp::eStore` to store the rendered image for later use. Next, we set up the rendering info: