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

◆ execute_shader()

void MayaFlux::Buffers::RenderProcessor::execute_shader ( const std::shared_ptr< VKBuffer > &  buffer)
overrideprotectedvirtual

Prepare this buffer's geometry and record its draw commands.

Publishes the render transform and advances triangulation before recording. Valid empty geometry still records a secondary command buffer so normal processing can present an empty frame. Presentation refreshes call record_draw() directly to reuse the prepared geometry.

Implements MayaFlux::Buffers::ShaderProcessor.

Definition at line 750 of file RenderProcessor.cpp.

751{
753
755 || !m_target_window->is_graphics_registered()) {
756 return;
757 }
758
760 return;
761 }
762
763 auto* state = get_or_cache_buffer_state(buffer);
764 if (!state) {
766 "VKBuffer has no vertex layout set. Use buffer->set_vertex_layout()");
767 return;
768 }
769
771 prepare_geometry(buffer, *state);
772 record_draw(buffer, *state);
773}
#define MF_RT_ERROR(comp, ctx,...)
std::shared_ptr< NetworkGeometryBuffer > buffer
const Kinesis::RenderTransform & publish_render_transform()
Resolve the view and geometry transforms and write them to the UBO.
void record_draw(const std::shared_ptr< VKBuffer > &buffer)
Record the buffer's prepared geometry into a fresh secondary command buffer.
Portal::Graphics::RenderPipelineID m_pipeline_id
BufferState * get_or_cache_buffer_state(const std::shared_ptr< VKBuffer > &buffer)
void prepare_geometry(const std::shared_ptr< VKBuffer > &buffer, BufferState &state)
Prepare and retain the source and draw range for one attached buffer.
bool is_visible(const std::shared_ptr< VKBuffer > &buffer) const
Whether this processor contributes to presentation.
std::shared_ptr< Core::Window > m_target_window
void collect_retired_pipelines()
Destroy retired pipelines whose window has completed every frame submitted before retirement.
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.
constexpr RenderPipelineID INVALID_RENDER_PIPELINE

References buffer, MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, MayaFlux::Portal::Graphics::INVALID_RENDER_PIPELINE, and MF_RT_ERROR.