pub struct DeferredUvCopy {
pub src: u32,
pub dst: u32,
pub uv_scale: [f32; 2],
}Expand description
Records that the uv rect block at dst must be overwritten with the block at
src once the renderer has resolved external images.
TODO: This is a hack. At the end of frame building we resolve UVs from the render task graph, however this is too early to resolve the real UVs for external images (happens on the renderer thread). So this is an even-more- deferred step on top of the already deferred blocks. It would be cleaner to move the existing deferred mechanism later and avoid stacking another one on top, but the better fix would be to not write UV rects in the gpu buffer and pass render task handles to the quad shaders.
Fields§
§src: u32§dst: u32§uv_scale: [f32; 2]Per-axis scale applied to the copied uv rect. Used to convert the
renderer’s normalized uvs (for external images that use them) into the
device pixels that the quad shaders expect. [1.0, 1.0] for uvs that
are already in device pixels.
Trait Implementations§
Source§impl Clone for DeferredUvCopy
impl Clone for DeferredUvCopy
Source§fn clone(&self) -> DeferredUvCopy
fn clone(&self) -> DeferredUvCopy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeferredUvCopy
impl Debug for DeferredUvCopy
Source§impl Serialize for DeferredUvCopy
impl Serialize for DeferredUvCopy
impl Copy for DeferredUvCopy
Auto Trait Implementations§
impl Freeze for DeferredUvCopy
impl RefUnwindSafe for DeferredUvCopy
impl Send for DeferredUvCopy
impl Sync for DeferredUvCopy
impl Unpin for DeferredUvCopy
impl UnsafeUnpin for DeferredUvCopy
impl UnwindSafe for DeferredUvCopy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more