simvx.editor.game_render_hook

Offscreen render hook for the editor’s game viewport.

Wires into the engine’s pre_render_callback so that the play-mode game scene (and edit-mode textured viewports) are rendered into offscreen targets before the editor’s own draw pass. Composed by :class:Root.

Module Contents

Classes

GameRenderHook

Renders the play-mode game scene into an offscreen viewport.

API

class simvx.editor.game_render_hook.GameRenderHook(state: simvx.editor.state.State, play_mode: simvx.editor.play_mode.PlayMode)[source]

Renders the play-mode game scene into an offscreen viewport.

Owns the engine pre_render chaining and the lifecycle of the game viewport target (created on play, destroyed on stop). Reads the editor viewport rects to size the offscreen target.

Initialization

attach(tree, viewport_3d, viewport_2d) None[source]

Install the pre_render callback and remember viewport refs.

Called once during Root.ready() after viewports are built. tree must expose app._engine for the engine hook; missing engine (test harness) is tolerated as a silent no-op.