Add renderer render pass clear contract
This commit is contained in:
@@ -64,6 +64,15 @@ struct ClearColor {
|
||||
float a = 0.0F;
|
||||
};
|
||||
|
||||
struct RenderPassDesc {
|
||||
bool clear_color_enabled = true;
|
||||
ClearColor clear_color;
|
||||
bool clear_depth_enabled = false;
|
||||
float clear_depth = 1.0F;
|
||||
bool clear_stencil_enabled = false;
|
||||
std::uint8_t clear_stencil = 0;
|
||||
};
|
||||
|
||||
enum class PrimitiveTopology : std::uint8_t {
|
||||
triangles,
|
||||
triangle_strip,
|
||||
@@ -201,7 +210,7 @@ public:
|
||||
virtual ~ICommandContext() = default;
|
||||
[[nodiscard]] virtual pp::foundation::Status begin_render_pass(
|
||||
IRenderTarget& target,
|
||||
ClearColor clear_color) noexcept = 0;
|
||||
RenderPassDesc desc) noexcept = 0;
|
||||
[[nodiscard]] virtual pp::foundation::Status set_viewport(Viewport viewport) noexcept = 0;
|
||||
[[nodiscard]] virtual pp::foundation::Status set_scissor(ScissorRect scissor) noexcept = 0;
|
||||
[[nodiscard]] virtual pp::foundation::Status set_blend_state(BlendState state) noexcept = 0;
|
||||
@@ -260,6 +269,7 @@ public:
|
||||
[[nodiscard]] pp::foundation::Status validate_extent(Extent2D extent) noexcept;
|
||||
[[nodiscard]] pp::foundation::Status validate_viewport(Viewport viewport, Extent2D target_extent) noexcept;
|
||||
[[nodiscard]] pp::foundation::Status validate_scissor(ScissorRect scissor, Extent2D target_extent) noexcept;
|
||||
[[nodiscard]] pp::foundation::Status validate_render_pass_desc(RenderPassDesc desc) noexcept;
|
||||
[[nodiscard]] pp::foundation::Status validate_blend_factor(BlendFactor factor) noexcept;
|
||||
[[nodiscard]] pp::foundation::Status validate_blend_op(BlendOp op) noexcept;
|
||||
[[nodiscard]] pp::foundation::Status validate_blend_state(BlendState state) noexcept;
|
||||
|
||||
Reference in New Issue
Block a user