Add renderer scissor state contract
This commit is contained in:
@@ -47,6 +47,14 @@ struct Viewport {
|
||||
float max_depth = 1.0F;
|
||||
};
|
||||
|
||||
struct ScissorRect {
|
||||
bool enabled = false;
|
||||
std::int32_t x = 0;
|
||||
std::int32_t y = 0;
|
||||
std::uint32_t width = 0;
|
||||
std::uint32_t height = 0;
|
||||
};
|
||||
|
||||
struct ClearColor {
|
||||
float r = 0.0F;
|
||||
float g = 0.0F;
|
||||
@@ -155,6 +163,7 @@ public:
|
||||
IRenderTarget& target,
|
||||
ClearColor clear_color) 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;
|
||||
[[nodiscard]] virtual pp::foundation::Status bind_shader(IShaderProgram& shader) noexcept = 0;
|
||||
[[nodiscard]] virtual pp::foundation::Status bind_texture(
|
||||
@@ -193,6 +202,7 @@ public:
|
||||
[[nodiscard]] std::uint32_t bytes_per_pixel(TextureFormat format) noexcept;
|
||||
[[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_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