pub struct FrameOutput {
pub view_projection: DMat4,
pub frustum: Option<Frustum>,
pub tiles: Arc<Vec<VisibleTile>>,
pub terrain: Arc<Vec<TerrainMeshData>>,
pub hillshade: Arc<Vec<PreparedHillshadeRaster>>,
pub vectors: Arc<Vec<VectorMeshData>>,
pub models: Arc<Vec<ModelInstance>>,
pub symbols: Arc<Vec<PlacedSymbol>>,
pub visualization: Arc<Vec<VisualizationOverlay>>,
pub placeholders: Arc<Vec<LoadingPlaceholder>>,
pub image_overlays: Arc<Vec<ImageOverlayData>>,
pub zoom_level: u8,
}Expand description
Bundled per-frame snapshot produced by MapState::update for renderers.
Contains everything a renderer needs to draw a single frame,
avoiding the need to reach into MapState internals. All data is
owned (Cloned from MapState), so the struct can be sent to a
render thread without holding a lock.
§Usage
state.update();
let frame = state.frame_output();
// Send `frame` to the GPU thread ...Fields§
§view_projection: DMat4View-projection matrix (f64 precision, camera-relative origin).
Cast to glam::Mat4 (f32) when uploading to a GPU uniform buffer.
The f64 source preserves precision for CPU-side picking and culling.
frustum: Option<Frustum>View frustum planes for CPU-side culling.
None only before the first call to update().
tiles: Arc<Vec<VisibleTile>>Visible tiles (loaded imagery or parent-tile fallbacks).
Wrapped in Arc for zero-copy sharing with render threads.
terrain: Arc<Vec<TerrainMeshData>>Terrain meshes to render (one per visible tile with elevation data).
Wrapped in Arc for zero-copy sharing with render threads.
hillshade: Arc<Vec<PreparedHillshadeRaster>>Prepared DEM-derived hillshade rasters aligned to the visible terrain set.
vectors: Arc<Vec<VectorMeshData>>Tessellated vector meshes (polygons, lines, points).
Wrapped in Arc for zero-copy sharing with render threads.
models: Arc<Vec<ModelInstance>>Placed 3D model instances to render.
Wrapped in Arc for zero-copy sharing with render threads.
symbols: Arc<Vec<PlacedSymbol>>Placed symbol instances after collision resolution.
visualization: Arc<Vec<VisualizationOverlay>>Visualization overlay data (grids, columns, etc.) from the last update.
placeholders: Arc<Vec<LoadingPlaceholder>>Loading placeholders for visible tiles that have no data yet.
Renderers should draw styled rectangles at these world bounds before or behind the opaque tile pass so that loading areas never appear as blank gaps.
image_overlays: Arc<Vec<ImageOverlayData>>Georeferenced image overlays (image/video/canvas sources).
Each entry is a textured quad defined by four world-space corners plus RGBA8 pixel data. Renderers should draw these between the tile and vector passes.
zoom_level: u8Current integer zoom level (0-22).