pub struct SkyGroundNode { /* private fields */ }Implementations§
Source§impl SkyGroundNode
impl SkyGroundNode
Sourcepub fn new(
device: &Device,
target_format: TextureFormat,
depth_format: TextureFormat,
convention: DepthConvention,
) -> Self
pub fn new( device: &Device, target_format: TextureFormat, depth_format: TextureFormat, convention: DepthConvention, ) -> Self
depth_format must match the attachments passed to Self::record, which owns the frame’s color and depth clear.
Sourcepub fn set_uniforms(&mut self, queue: &Queue, uniforms: &SkyGroundUniforms)
pub fn set_uniforms(&mut self, queue: &Queue, uniforms: &SkyGroundUniforms)
Also sets the color clear to the uniforms’ horizon.
Sourcepub fn record(
&self,
encoder: &mut CommandEncoder,
view: &TextureView,
depth_view: &TextureView,
viewport: Option<&Viewport>,
)
pub fn record( &self, encoder: &mut CommandEncoder, view: &TextureView, depth_view: &TextureView, viewport: Option<&Viewport>, )
Clears both attachments, so it records at the start of a stage the schedule lets clear; viewport restricts the shading, not the clear.
pub fn draw(&self, rp: &mut RenderPass<'_>, viewport: Option<&Viewport>)
Auto Trait Implementations§
impl Freeze for SkyGroundNode
impl !RefUnwindSafe for SkyGroundNode
impl Send for SkyGroundNode
impl Sync for SkyGroundNode
impl Unpin for SkyGroundNode
impl UnsafeUnpin for SkyGroundNode
impl !UnwindSafe for SkyGroundNode
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
Mutably borrows from an owned value. Read more