From cb59a5c1c8971b894886adfb7df639566e87323f Mon Sep 17 00:00:00 2001 From: Xiang Silian Date: Mon, 22 Sep 2025 19:13:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=BA=BF=E7=94=BB=E5=87=BA=E6=9D=A5?= =?UTF-8?q?=E4=BA=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- samples/api/texture_loading/texture_loading.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/api/texture_loading/texture_loading.cpp b/samples/api/texture_loading/texture_loading.cpp index 7405395..b3fe47c 100644 --- a/samples/api/texture_loading/texture_loading.cpp +++ b/samples/api/texture_loading/texture_loading.cpp @@ -1336,7 +1336,7 @@ void TextureLoading::prepare_pipeline_point_line() // 输入装配 (绘制点列表) VkPipelineInputAssemblyStateCreateInfo input_assembly_state{ VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO }; - input_assembly_state.topology = VK_PRIMITIVE_TOPOLOGY_LINE_LIST; + input_assembly_state.topology = VK_PRIMITIVE_TOPOLOGY_LINE_STRIP;// VK_PRIMITIVE_TOPOLOGY_LINE_LIST; input_assembly_state.primitiveRestartEnable = VK_FALSE; // 光栅化 @@ -2064,7 +2064,7 @@ void TextureLoading::update_point_vertex_buffer_line(float* pos, int count, floa glm::vec3 color = { r,g,b }; // 1. 准备顶点数据 - std::vector vertices(point_count_line); + std::vector vertices; for (int i = 0; i < point_count_line - 1; ++i) {