2021-09-23 10:10:39 +02:00
|
|
|
#pragma once
|
|
|
|
|
#include "RenderPass.h"
|
|
|
|
|
#include "UI/RenderHierarchy.h"
|
2023-10-26 18:37:29 +02:00
|
|
|
#include "Graphics/Resources.h"
|
2021-09-23 10:10:39 +02:00
|
|
|
|
|
|
|
|
namespace Seele
|
|
|
|
|
{
|
|
|
|
|
DECLARE_NAME_REF(Gfx, Texture2D)
|
|
|
|
|
DECLARE_NAME_REF(Gfx, RenderTargetAttachment)
|
2023-10-26 18:37:29 +02:00
|
|
|
class UIPass : public RenderPass
|
2021-09-23 10:10:39 +02:00
|
|
|
{
|
|
|
|
|
public:
|
2023-10-26 18:37:29 +02:00
|
|
|
UIPass(Gfx::PGraphics graphics, PScene scene);
|
2023-11-05 10:36:01 +01:00
|
|
|
UIPass(UIPass&&) = default;
|
|
|
|
|
UIPass& operator=(UIPass&&) = default;
|
2021-09-23 10:10:39 +02:00
|
|
|
virtual ~UIPass();
|
2022-11-17 16:47:42 +01:00
|
|
|
virtual void beginFrame(const Component::Camera& cam) override;
|
2022-04-15 23:45:44 +02:00
|
|
|
virtual void render() override;
|
|
|
|
|
virtual void endFrame() override;
|
2021-09-23 10:10:39 +02:00
|
|
|
virtual void publishOutputs() override;
|
|
|
|
|
virtual void createRenderPass() override;
|
|
|
|
|
private:
|
2023-11-01 23:12:30 +01:00
|
|
|
Gfx::ORenderTargetAttachment renderTarget;
|
|
|
|
|
Gfx::OTexture2D colorBuffer;
|
|
|
|
|
Gfx::ORenderTargetAttachment depthAttachment;
|
|
|
|
|
Gfx::OTexture2D depthBuffer;
|
2021-09-23 10:10:39 +02:00
|
|
|
|
2023-11-01 23:12:30 +01:00
|
|
|
Gfx::ODescriptorLayout descriptorLayout;
|
2023-11-05 10:36:01 +01:00
|
|
|
Gfx::PDescriptorSet descriptorSet;
|
2022-04-18 18:08:38 +02:00
|
|
|
|
2023-11-01 23:12:30 +01:00
|
|
|
Gfx::OUniformBuffer numTexturesBuffer;
|
|
|
|
|
Gfx::OVertexBuffer elementBuffer;
|
2022-04-18 18:08:38 +02:00
|
|
|
|
2023-11-01 23:12:30 +01:00
|
|
|
Gfx::OVertexDeclaration declaration;
|
|
|
|
|
Gfx::OVertexShader vertexShader;
|
|
|
|
|
Gfx::OFragmentShader fragmentShader;
|
|
|
|
|
Gfx::OPipelineLayout pipelineLayout;
|
|
|
|
|
Gfx::OGraphicsPipeline pipeline;
|
2023-10-26 18:37:29 +02:00
|
|
|
|
|
|
|
|
Array<UI::RenderElementStyle> renderElements;
|
|
|
|
|
Array<Gfx::PTexture> usedTextures;
|
2021-09-23 10:10:39 +02:00
|
|
|
};
|
|
|
|
|
DEFINE_REF(UIPass);
|
|
|
|
|
} // namespace Seele
|