Skip to main content

Crate smudge_platform

Crate smudge_platform 

Source
Expand description

Window creation, event translation and frame presentation for desktop and web targets.

This crate is the only place that talks to the operating system’s windowing layer. It owns the run loop and hands each frame to the chosen renderer.

Structs§

AdapterSummary
The GPU adapter a window presents through, as plain strings.
PresentStats
What the last present did.
PresentStatsHandle
A shared slot the platform writes the latest PresentStats into.
WindowOptions
The settings a window opens with.

Enums§

PlatformError
Something that stopped a window from opening, running or presenting a frame.
RendererChoice
Which renderer a window presents with.

Constants§

RENDERER_ENVIRONMENT
The environment variable that overrides the renderer choice.

Functions§

run
Opens a window and runs frames until the window closes.
run_with
Opens a window, hands the app to configure, and runs frames until the window closes.

Type Aliases§

EventHook
The measurement hook that injects scripted input before a frame runs.
FrameHook
The measurement hook that receives one pair of statistics per presented frame.