保存代码
This commit is contained in:
@@ -926,14 +926,14 @@ void TextureLoading::setup_descriptor_set_point_line()
|
||||
{
|
||||
// Binding 0 : Vertex shader uniform buffer
|
||||
vkb::initializers::write_descriptor_set(
|
||||
descriptor_set_point,
|
||||
descriptor_set_point_line,
|
||||
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
|
||||
0,
|
||||
&buffer_descriptor),
|
||||
// Binding 1 : Fragment shader texture sampler
|
||||
// Fragment shader: layout (binding = 1) uniform sampler2D samplerColor;
|
||||
vkb::initializers::write_descriptor_set(
|
||||
descriptor_set_point,
|
||||
descriptor_set_point_line,
|
||||
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, // The descriptor set will use a combined image sampler (sampler and image could be split)
|
||||
1, // Shader binding point 1
|
||||
&image_descriptor) // Pointer to the descriptor image for our texture
|
||||
@@ -1418,12 +1418,13 @@ bool TextureLoading::prepare(const vkb::ApplicationOptions& options)
|
||||
setup_descriptor_set_layout_bg();
|
||||
setup_descriptor_set_bg();
|
||||
|
||||
setup_descriptor_set_layout_point();
|
||||
setup_descriptor_set_point();
|
||||
|
||||
setup_descriptor_set_layout_point_line();
|
||||
setup_descriptor_set_point_line();
|
||||
|
||||
setup_descriptor_set_layout_point();
|
||||
setup_descriptor_set_point();
|
||||
|
||||
prepare_pipelines();
|
||||
prepare_pipeline_bg();
|
||||
prepare_pipeline_point();
|
||||
@@ -1444,12 +1445,12 @@ bool TextureLoading::prepare(const vkb::ApplicationOptions& options)
|
||||
|
||||
float testPoint_line[] = {
|
||||
0,0,z,
|
||||
-0.05,0.05,z,
|
||||
-0.1,0.1,z,
|
||||
-0.2,0.2,z,
|
||||
-0.3,0.3,z,
|
||||
-0,0.5,z,
|
||||
-1,1,z,
|
||||
0.05 + 0.1,0.05,z,
|
||||
0.1 + 0.1,0.1,z,
|
||||
0.2 + 0.1,0.2,z,
|
||||
0.3 + 0.1,0.3,z,
|
||||
0 + 0.1,0.5,z,
|
||||
1 + 0.1,1,z,
|
||||
};
|
||||
update_point_vertex_buffer_line(testPoint_line, sizeof(testPoint_line) / (3 * 4));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user