pub struct SampledTexture { /* private fields */ }Expand description
A texture the executor samples (see the module documentation).
Implementations§
Source§impl SampledTexture
impl SampledTexture
Sourcepub fn new(
levels: Levels,
transfer: Transfer,
sampler: SamplerUse,
filtering: Filtering,
) -> Result<SampledTexture, String>
pub fn new( levels: Levels, transfer: Transfer, sampler: SamplerUse, filtering: Filtering, ) -> Result<SampledTexture, String>
levels (at least one), read through transfer, sampled as sampler and filtering say; a sampler bias
that isn’t finite is refused.
Sourcepub fn with_footprintless_level(
self,
level: f32,
) -> Result<SampledTexture, String>
pub fn with_footprintless_level( self, level: f32, ) -> Result<SampledTexture, String>
The same texture with level the level of detail of an implicit-level sample that has no quad footprint (an
evaluation one pixel at a time): the caller’s stated assumption, which it reports. A level that isn’t finite
is refused.
Sourcepub fn footprintless_level(&self) -> Option<f32>
pub fn footprintless_level(&self) -> Option<f32>
The level an implicit-level sample without a footprint takes, if the caller stated one.
Sourcepub fn sampler(&self) -> SamplerUse
pub fn sampler(&self) -> SamplerUse
The sampler state the texture is sampled with.
Sourcepub fn dimensions(&self) -> [usize; 2]
pub fn dimensions(&self) -> [usize; 2]
The base level’s width and height.
Sourcepub fn decoded_bytes(&self) -> usize
pub fn decoded_bytes(&self) -> usize
The bytes it holds: the stored levels and the texels decoded for filtering.
Sourcepub fn unhonoured(&self) -> Option<&'static str>
pub fn unhonoured(&self) -> Option<&'static str>
What of its sampler this sampling does not apply, for the caller to report: a stated bias under
Filtering::BaseBilinear, which reads the base level whatever the level of detail.