Add renderer render pass clear contract

This commit is contained in:
2026-06-02 16:23:02 +02:00
parent 8232b0efc8
commit 58f163788b
9 changed files with 191 additions and 41 deletions

View File

@@ -30,7 +30,12 @@ enum class RecordedRenderCommandKind : std::uint8_t {
struct RecordedRenderCommand {
RecordedRenderCommandKind kind = RecordedRenderCommandKind::draw;
TextureDesc target_desc {};
bool clear_color_enabled = false;
ClearColor clear_color {};
bool clear_depth_enabled = false;
float clear_depth = 1.0F;
bool clear_stencil_enabled = false;
std::uint8_t clear_stencil = 0;
Viewport viewport {};
ScissorRect scissor {};
BlendState blend_state {};
@@ -107,7 +112,7 @@ public:
[[nodiscard]] pp::foundation::Status begin_render_pass(
IRenderTarget& target,
ClearColor clear_color) noexcept override;
RenderPassDesc desc) noexcept override;
[[nodiscard]] pp::foundation::Status set_viewport(Viewport viewport) noexcept override;
[[nodiscard]] pp::foundation::Status set_scissor(ScissorRect scissor) noexcept override;
[[nodiscard]] pp::foundation::Status set_blend_state(BlendState state) noexcept override;