Skip to main content

GameScene

Trait GameScene 

Source
pub trait GameScene {
    // Required methods
    fn fixed_update(&mut self, dt: f32, input: &InputState);
    fn render(&mut self, alpha: f32, ctx: &mut GameRenderContext<'_>);

    // Provided method
    fn update(&mut self, _dt: f32, _input: &InputState) { ... }
}
Expand description

Real-time game or engine scene embedded inside an euv viewport or paired with an euv HUD overlay.

Required Methods§

Source

fn fixed_update(&mut self, dt: f32, input: &InputState)

Advances deterministic physics, AI, or ECS state by one fixed simulation step dt.

§Arguments
  • &Self - Mutable scene state.
  • f32 - Fixed simulation timestep in seconds.
  • &InputState - Real-time polled keyboard and pointer state.
Source

fn render(&mut self, alpha: f32, ctx: &mut GameRenderContext<'_>)

Emits immediate-mode geometry or blits an external engine RGBA8 framebuffer into ctx.

§Arguments
  • &Self - Mutable scene state.
  • f32 - Interpolation alpha in [0.0, 1.0].
  • &mut GameRenderContext<'_> - Viewport-local draw surface.

Provided Methods§

Source

fn update(&mut self, _dt: f32, _input: &InputState)

Advances variable-rate camera, animation, or visual interpolation state.

§Arguments
  • &Self - Mutable scene state.
  • f32 - Variable frame delta time in seconds.
  • &InputState - Real-time polled input state.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl GameScene for GyroLiquidGameScene

GameScene integration driving fixed-step SI liquid physics, sensor ingestion, pointer stirring, and zero-copy pooled optical rendering inside GameEngineHost.