Class RuntimeModule

Inheritance Relationships

Base Type

  • public TaggedModule< Tag< ModuleTags::FrameLifecycle, ModuleTags::PostUpdate, ModuleTags::Event >, SystemOrchestrator, ResourcesModule >

Class Documentation

class RuntimeModule : public TaggedModule<Tag<ModuleTags::FrameLifecycle, ModuleTags::PostUpdate, ModuleTags::Event>, SystemOrchestrator, ResourcesModule>

Module responsible for runtime scene rendering.

RuntimeModule handles the core rendering loop including frame lifecycle management, scene rendering, and swapchain presentation. It provides both standard rendering (directly to swapchain) and inner methods for rendering to custom render targets (used by the editor viewport).

Public Functions

RuntimeModule(ModuleStack &stack, Project &project, renderer::vulkan::VulkanContext &context, renderer::vulkan::VulkanSwapchain &swapchain)

Constructs the runtime module.

Parameters:
  • stack – The module stack this module belongs to.

  • context – The Vulkan context.

  • swapchain – The swapchain for presentation.

~RuntimeModule() override
void begin_frame(FrameContext &frame) override
void post_update(FrameContext &frame) override
void end_frame(FrameContext &frame) override
void on_event(Event &event) override
void inner_post_update(FrameContext &frame, const Reference<renderer::RenderTarget> &render_target)

Renders the scene to a custom render target.

Used by the editor viewport to render the scene to an offscreen target instead of the swapchain.

Parameters:
  • frame – The current frame context.

  • render_target – The target to render to.

void inner_end_frame(FrameContext &frame, bool present = true)

Completes frame rendering with optional presentation.

Parameters:
  • frame – The current frame context.

  • present – If true, presents to the swapchain. Set to false when rendering to a custom target.