Skip to main content

Image

Trait Image 

Source
pub trait Image:
    Send
    + Sync
    + Debug {
    // Required method
    fn sample(&self, uv: [f32; 2], lod: Lod) -> Result<[f32; 4], String>;
}
Expand description

A texture the caller samples itself (its footprint, addressing, filtering and transfer are its own policy), by the level of detail the program states (crate::Lod).

Required Methods§

Source

fn sample(&self, uv: [f32; 2], lod: Lod) -> Result<[f32; 4], String>

The texel at uv at level of detail lod, or an error that stops the evaluation.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§