Графические конвейеры для вокселей и нод

This commit is contained in:
2025-02-13 22:22:10 +06:00
parent a27f055af8
commit 8c13938b06
24 changed files with 1239 additions and 65 deletions

View File

@@ -234,11 +234,11 @@ public:
std::queue<std::function<void(Vulkan*)>> BeforeDraw;
DrawState State = DrawState::Begin;
} Screen;
struct {
DestroyLock UseLock;
std::thread MainThread;
std::unique_ptr<VulkanRenderSession> RSession;
std::shared_ptr<VulkanRenderSession> RSession;
std::unique_ptr<ServerSession> Session;
std::list<void (Vulkan::*)()> ImGuiInterfaces;
@@ -358,17 +358,10 @@ public:
void gui_ConnectedToServer();
};
enum class EnumRebuildType {
None,
Need,
Urgently
};
class IVulkanDependent : public std::enable_shared_from_this<IVulkanDependent> {
protected:
virtual void free(Vulkan *instance) = 0;
virtual void init(Vulkan *instance) = 0;
virtual EnumRebuildType needRebuild();
friend Vulkan;
friend Pipeline;
@@ -449,8 +442,6 @@ protected:
virtual void free(Vulkan *instance) override;
virtual void init(Vulkan *instance) override;
// Если необходимо изменить графический конвейер, будет вызвано free и init
virtual EnumRebuildType needRebuild() override;
public:
Pipeline(std::shared_ptr<DescriptorLayout> layout);
@@ -1000,5 +991,29 @@ public:
size_t getLastUpdate() { return LastUpdate; }
};
class PipelineVF : public Pipeline {
std::string PathVertex, PathFragment;
std::shared_ptr<ShaderModule> ShaderVertex, ShaderFragment;
protected:
virtual void init(Vulkan *instance) override;
public:
PipelineVF(std::shared_ptr<DescriptorLayout> layout, const std::string &vertex, const std::string &fragment);
virtual ~PipelineVF();
};
class PipelineVGF : public Pipeline {
std::string PathVertex, PathGeometry, PathFragment;
std::shared_ptr<ShaderModule> ShaderVertex, ShaderGeometry, ShaderFragment;
protected:
virtual void init(Vulkan *instance) override;
public:
PipelineVGF(std::shared_ptr<DescriptorLayout> layout, const std::string &vertex, const std::string &geometry, const std::string &fragment);
virtual ~PipelineVGF();
};
} /* namespace TOS::Navie::VK */