MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ present_rendered_image()

void MayaFlux::Portal::Graphics::RenderFlow::present_rendered_image ( CommandBufferID  cmd_id,
const std::shared_ptr< Core::Window > &  window 
)

Present rendered image to window.

Parameters
cmd_idCommand buffer ID
windowTarget window for presentation

Definition at line 865 of file RenderFlow.cpp.

868{
869 auto cmd = m_shader_foundry->get_command_buffer(cmd_id);
870 if (!cmd) {
872 "Invalid command buffer ID: {}", cmd_id);
873 return;
874 }
875
876 if (!window) {
878 "Cannot present rendered image for null window");
879 return;
880 }
881
882 try {
883 cmd.end();
884 } catch (const std::exception& e) {
886 "Failed to end command buffer: {}", e.what());
887 return;
888 }
889
890 uint64_t cmd_bits = *reinterpret_cast<uint64_t*>(&cmd);
891 m_display_service->present_frame(window, cmd_bits);
892}
#define MF_ERROR(comp, ctx,...)
Registry::Service::DisplayService * m_display_service
vk::CommandBuffer get_command_buffer(CommandBufferID cmd_id)
Get Vulkan command buffer handle from CommandBufferID.
@ Rendering
GPU rendering operations (graphics pipeline, frame rendering)
@ Portal
High-level user-facing API layer.
std::function< void(const std::shared_ptr< void > &, uint64_t)> present_frame
Present a rendered frame to window.

References MayaFlux::Portal::Graphics::ShaderFoundry::get_command_buffer(), m_display_service, m_shader_foundry, MF_ERROR, MayaFlux::Journal::Portal, MayaFlux::Registry::Service::DisplayService::present_frame, and MayaFlux::Journal::Rendering.

+ Here is the call graph for this function: