The core processing function that must be implemented by derived classes.
This method is where the actual transformation logic is implemented. It should contain the algorithmic details of how the buffer's data is transformed, analyzed, or processed. The implementation can utilize any backend capabilities available to the processor, including:
Derived classes must override this method to provide specific processing behavior.
226{
227 auto vk_buffer = std::dynamic_pointer_cast<VKBuffer>(buffer);
229 return;
230 }
231
233 if (vk_buffer->has_vertex_layout()) {
234 auto vertex_layout = vk_buffer->get_vertex_layout();
235 if (vertex_layout.has_value()) {
237 .semantic_layout = vertex_layout.value(),
238 .use_reflection = false
239 };
240 }
241 }
242 }
243
245 return;
246 }
247
250 }
251
253 return;
254 }
255
256 auto vertex_layout = vk_buffer->get_vertex_layout();
257 if (!vertex_layout.has_value()) {
259 "VKBuffer has no vertex layout set. Use buffer->set_vertex_layout()");
260 return;
261 }
262
263 if (vertex_layout->vertex_count == 0) {
265 "Vertex layout has zero vertices, skipping draw");
266 return;
267 }
268
269 if (vertex_layout->attributes.empty()) {
271 "Vertex layout has no attributes");
272 return;
273 }
274
276
279
281
283
284 uint32_t width = 0, height = 0;
286
287 if (width > 0 && height > 0) {
288 auto cmd = foundry.get_command_buffer(cmd_id);
289
290 vk::Viewport viewport { 0.0F, 0.0F, static_cast<float>(width), static_cast<float>(height), 0.0F, 1.0F };
291 cmd.setViewport(0, 1, &viewport);
292
293 vk::Rect2D scissor { { 0, 0 }, { width, height } };
294 cmd.setScissor(0, 1, &scissor);
295 }
296
298
301 }
302
303 flow.bind_vertex_buffers(cmd_id, { vk_buffer });
304
305 flow.draw(cmd_id, vertex_layout->vertex_count);
306
307 flow.end_render_pass(cmd_id);
308
310}
#define MF_RT_WARN(comp, ctx,...)
#define MF_RT_ERROR(comp, ctx,...)
void initialize_pipeline(const std::shared_ptr< Buffer > &buffer) override
std::unordered_map< std::shared_ptr< VKBuffer >, VertexInfo > m_buffer_info
Registry::Service::DisplayService * m_display_service
std::shared_ptr< Core::Window > m_target_window
Portal::Graphics::RenderPipelineID m_render_pipeline_id
bool m_needs_pipeline_rebuild
std::vector< Portal::Graphics::DescriptorSetID > m_descriptor_set_ids
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.
constexpr RenderPipelineID INVALID_RENDER_PIPELINE
MAYAFLUX_API RenderFlow & get_render_flow()
Get the global render flow instance.
MAYAFLUX_API ShaderFoundry & get_shader_foundry()
Get the global shader compiler instance.
std::function< void(const std::shared_ptr< void > &, uint32_t &, uint32_t &)> get_swapchain_extent
Get swapchain extent for a window.