Capture renderer draw mesh inputs
This commit is contained in:
@@ -96,6 +96,7 @@ pp::foundation::Status RecordingCommandContext::begin_render_pass(
|
||||
in_render_pass_ = true;
|
||||
shader_bound_ = false;
|
||||
mesh_bound_ = false;
|
||||
active_mesh_ = MeshDesc {};
|
||||
push_command(commands_, RecordedRenderCommand {
|
||||
.kind = RecordedRenderCommandKind::begin_render_pass,
|
||||
.target_desc = active_target_,
|
||||
@@ -256,6 +257,7 @@ pp::foundation::Status RecordingCommandContext::bind_mesh(IMesh& mesh) noexcept
|
||||
}
|
||||
|
||||
mesh_bound_ = true;
|
||||
active_mesh_ = desc;
|
||||
push_command(commands_, RecordedRenderCommand {
|
||||
.kind = RecordedRenderCommandKind::bind_mesh,
|
||||
.mesh_desc = desc,
|
||||
@@ -277,6 +279,7 @@ pp::foundation::Status RecordingCommandContext::draw() noexcept
|
||||
|
||||
push_command(commands_, RecordedRenderCommand {
|
||||
.kind = RecordedRenderCommandKind::draw,
|
||||
.mesh_desc = active_mesh_,
|
||||
});
|
||||
return pp::foundation::Status::success();
|
||||
}
|
||||
@@ -421,6 +424,7 @@ void RecordingCommandContext::end_render_pass() noexcept
|
||||
in_render_pass_ = false;
|
||||
shader_bound_ = false;
|
||||
mesh_bound_ = false;
|
||||
active_mesh_ = MeshDesc {};
|
||||
}
|
||||
|
||||
bool RecordingCommandContext::in_render_pass() const noexcept
|
||||
|
||||
@@ -143,6 +143,7 @@ public:
|
||||
private:
|
||||
std::vector<RecordedRenderCommand>* commands_ = nullptr;
|
||||
TextureDesc active_target_ {};
|
||||
MeshDesc active_mesh_ {};
|
||||
bool in_render_pass_ = false;
|
||||
bool shader_bound_ = false;
|
||||
bool mesh_bound_ = false;
|
||||
|
||||
Reference in New Issue
Block a user