Skip to main content

RenderParams

Struct RenderParams 

Source
pub struct RenderParams<'a> {
    pub state: &'a MapState,
    pub device: &'a Device,
    pub queue: &'a Queue,
    pub color_view: &'a TextureView,
    pub visible_tiles: &'a [VisibleTile],
    pub vector_meshes: &'a [VectorMeshData],
    pub model_instances: &'a [ModelInstance],
    pub clear_color: [f32; 4],
}
Expand description

All inputs needed for a full render frame.

Aggregated into a single struct to keep WgpuMapRenderer::render_full’s signature manageable. Lifetimes are tied to the caller’s frame data.

Fields§

§state: &'a MapState

Engine map state (camera, layers, terrain manager).

§device: &'a Device

WGPU device for buffer/texture/bind-group creation.

§queue: &'a Queue

WGPU queue for write_buffer / write_texture / submit.

§color_view: &'a TextureView

Colour attachment view (the surface texture for this frame).

§visible_tiles: &'a [VisibleTile]

Visible tile set for this frame (from engine’s tile manager).

§vector_meshes: &'a [VectorMeshData]

Tessellated vector meshes to render (one per visible vector layer).

§model_instances: &'a [ModelInstance]

3D model instances to render.

§clear_color: [f32; 4]

Background / clear colour [r, g, b, a] in linear sRGB.

Also used as the fog horizon colour. Defaults to white if not set.

Auto Trait Implementations§

§

impl<'a> Freeze for RenderParams<'a>

§

impl<'a> !RefUnwindSafe for RenderParams<'a>

§

impl<'a> Send for RenderParams<'a>

§

impl<'a> Sync for RenderParams<'a>

§

impl<'a> Unpin for RenderParams<'a>

§

impl<'a> UnsafeUnpin for RenderParams<'a>

§

impl<'a> !UnwindSafe for RenderParams<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,