pub struct BatchTextures {
pub pattern: Option<TextureHandle>,
pub ramps: Option<TextureHandle>,
pub image: Option<TextureHandle>,
pub glyphs: Option<TextureHandle>,
pub shadow: Option<TextureHandle>,
}Expand description
The textures a Batch samples, as device handles.
Noesis hands a batch its textures as pointers to its own texture objects.
WgpuRenderDevice::draw_batch_with takes handles instead, so a host that
creates Noesis’s textures itself (and so knows which handle each pointer
stands for) can resolve them and pass them in. A field is None when the
batch leaves that slot empty. Samplers still come from the batch.
Fields§
§pattern: Option<TextureHandle>Pattern (brush) texture, sampled with batch.pattern_sampler.
ramps: Option<TextureHandle>Gradient ramps, sampled with batch.ramps_sampler.
image: Option<TextureHandle>Offscreen image or effect input, sampled with batch.image_sampler.
glyphs: Option<TextureHandle>SDF glyph atlas, sampled with batch.glyphs_sampler.
shadow: Option<TextureHandle>Shadow intermediate, sampled with batch.shadow_sampler.
Implementations§
Source§impl BatchTextures
impl BatchTextures
Sourcepub fn from_batch(batch: &Batch) -> Self
pub fn from_batch(batch: &Batch) -> Self
Reads the handles out of batch’s texture pointers through
noesis_runtime’s shim. Only valid when every texture in the batch was
created through a device registered with
noesis_runtime::render_device::register.
Trait Implementations§
Source§impl Clone for BatchTextures
impl Clone for BatchTextures
impl Copy for BatchTextures
Source§impl Debug for BatchTextures
impl Debug for BatchTextures
Source§impl Default for BatchTextures
impl Default for BatchTextures
impl Eq for BatchTextures
Source§impl Hash for BatchTextures
impl Hash for BatchTextures
Source§impl PartialEq for BatchTextures
impl PartialEq for BatchTextures
impl StructuralPartialEq for BatchTextures
Auto Trait Implementations§
impl Freeze for BatchTextures
impl RefUnwindSafe for BatchTextures
impl Send for BatchTextures
impl Sync for BatchTextures
impl Unpin for BatchTextures
impl UnsafeUnpin for BatchTextures
impl UnwindSafe for BatchTextures
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.