画线的代码写完
This commit is contained in:
@@ -56,6 +56,7 @@ public:
|
||||
|
||||
Texture texture = { 0 };
|
||||
Texture texture_point = { 0 };
|
||||
Texture texture_point_line = { 0 };
|
||||
Texture cam_text = { 0 };
|
||||
|
||||
std::unique_ptr<vkb::core::BufferC> vertex_buffer;
|
||||
@@ -65,6 +66,9 @@ public:
|
||||
std::unique_ptr<vkb::core::BufferC> vertex_buffer_point;
|
||||
uint32_t point_count = 0;
|
||||
|
||||
std::unique_ptr<vkb::core::BufferC> vertex_buffer_point_line;
|
||||
uint32_t point_count_line = 0;
|
||||
|
||||
struct
|
||||
{
|
||||
glm::mat4 projection;
|
||||
@@ -92,20 +96,24 @@ public:
|
||||
VkPipeline solid;
|
||||
VkPipeline background;
|
||||
VkPipeline point;
|
||||
VkPipeline line;
|
||||
} pipelines;
|
||||
|
||||
|
||||
VkPipelineLayout pipeline_layout;
|
||||
VkPipelineLayout pipeline_layout_bg;
|
||||
VkPipelineLayout pipeline_layout_point;
|
||||
VkPipelineLayout pipeline_layout_point_line;
|
||||
|
||||
VkDescriptorSet descriptor_set;
|
||||
VkDescriptorSet descriptor_set_bg;
|
||||
VkDescriptorSet descriptor_set_point;
|
||||
VkDescriptorSet descriptor_set_point_line;
|
||||
|
||||
VkDescriptorSetLayout descriptor_set_layout;
|
||||
VkDescriptorSetLayout descriptor_set_layout_bg;
|
||||
VkDescriptorSetLayout descriptor_set_layout_point;
|
||||
VkDescriptorSetLayout descriptor_set_layout_point_line;
|
||||
|
||||
static TextureLoading* Get() {
|
||||
return this_instance;
|
||||
@@ -122,6 +130,7 @@ public:
|
||||
|
||||
void draw();
|
||||
void draw_point_cloud(VkCommandBuffer command_buffer);
|
||||
void draw_point_cloud_line(VkCommandBuffer command_buffer);
|
||||
void generate_quad();
|
||||
|
||||
void setup_descriptor_pool();
|
||||
@@ -135,6 +144,9 @@ public:
|
||||
void setup_descriptor_set_layout_point();
|
||||
void setup_descriptor_set_point();
|
||||
|
||||
void setup_descriptor_set_layout_point_line();
|
||||
void setup_descriptor_set_point_line();
|
||||
|
||||
void prepare_uniform_buffers();
|
||||
void update_uniform_buffers();
|
||||
|
||||
@@ -145,6 +157,7 @@ public:
|
||||
void prepare_pipelines();
|
||||
void prepare_pipeline_bg();
|
||||
void prepare_pipeline_point();
|
||||
void prepare_pipeline_point_line();
|
||||
|
||||
|
||||
bool prepare(const vkb::ApplicationOptions& options) override;
|
||||
@@ -163,6 +176,7 @@ public:
|
||||
public:
|
||||
|
||||
void update_point_vertex_buffer(float* pos, int pointCount);
|
||||
void update_point_vertex_buffer_line(float* pos, int pointCount_line);
|
||||
private:
|
||||
std::thread workerThread;
|
||||
bool running = false;
|
||||
@@ -172,6 +186,7 @@ public:
|
||||
//void start();
|
||||
std::mutex mtx;
|
||||
std::mutex mtx_point;
|
||||
std::mutex mtx_point_line;
|
||||
std::mutex mtx_mvp;
|
||||
//void stop();
|
||||
//void updateTexture();
|
||||
|
||||
Reference in New Issue
Block a user