Header menu logo Mibo

SceneContext Type

The scene state passed to a Draw3D.drawImmediate callback: everything the pipeline gathered for the current frame (active camera, view/projection matrices, lights, the shadow pass output, elapsed time). Use it for fully-custom draws that need the scene data — water/refraction, screen-space effects, multi-pass.

Read-only snapshot of the frame's gather; raylib device state is global (Raylib.*/Rlgl.*), so there is no Device field (unlike the MonoGame backend). The pipeline restores camera scope around the callback. SceneContext.Shadows is ValueNone when no shadow-casting light exists.

Record fields

Record Field Description

Camera

Full Usage: Camera

Field type: Camera3D

The active camera config.

Field type: Camera3D

Lights

Full Usage: Lights

Field type: LightBuffers

The frame's accumulated lights (ambient + directional + point + spot).

Field type: LightBuffers

Projection

Full Usage: Projection

Field type: Matrix4x4

The active camera's projection matrix.

Field type: Matrix4x4

Shadows

Full Usage: Shadows

Field type: ShadowResult voption

The frame's shadow pass output — ValueNone when no shadow-casting light exists.

Field type: ShadowResult voption

Time

Full Usage: Time

Field type: float32

Total elapsed game time, in seconds — the animation clock.

Field type: float32

View

Full Usage: View

Field type: Matrix4x4

The active camera's view matrix.

Field type: Matrix4x4

Type something to start searching.