Add renderer readback command contract
This commit is contained in:
@@ -13,6 +13,7 @@ enum class RecordedRenderCommandKind : std::uint8_t {
|
||||
bind_shader,
|
||||
bind_mesh,
|
||||
draw,
|
||||
read_texture,
|
||||
end_render_pass,
|
||||
trace_marker,
|
||||
};
|
||||
@@ -23,6 +24,9 @@ struct RecordedRenderCommand {
|
||||
ClearColor clear_color {};
|
||||
Viewport viewport {};
|
||||
MeshDesc mesh_desc {};
|
||||
TextureDesc texture_desc {};
|
||||
ReadbackRegion readback_region {};
|
||||
std::uint64_t readback_bytes = 0;
|
||||
const char* component = "";
|
||||
const char* name = "";
|
||||
};
|
||||
@@ -83,6 +87,10 @@ public:
|
||||
[[nodiscard]] pp::foundation::Status bind_shader(IShaderProgram& shader) noexcept override;
|
||||
[[nodiscard]] pp::foundation::Status bind_mesh(IMesh& mesh) noexcept override;
|
||||
[[nodiscard]] pp::foundation::Status draw() noexcept override;
|
||||
[[nodiscard]] pp::foundation::Status read_texture(
|
||||
ITexture2D& texture,
|
||||
ReadbackRegion region,
|
||||
IReadbackBuffer& destination) noexcept override;
|
||||
void end_render_pass() noexcept override;
|
||||
|
||||
[[nodiscard]] bool in_render_pass() const noexcept;
|
||||
|
||||
Reference in New Issue
Block a user