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) {