pub struct MeshRenderer { /* private fields */ }Expand description
Pipeline for MeshScenes: Depth32Float depth, single-sampled, opaque.
Implementations§
Source§impl MeshRenderer
impl MeshRenderer
Sourcepub async fn new(
device: &Device,
format: TextureFormat,
) -> Result<Self, GpuError>
pub async fn new( device: &Device, format: TextureFormat, ) -> Result<Self, GpuError>
Creates the pipeline for color targets of format.
Sourcepub async fn prepare(
&self,
device: &Device,
scene: &MeshScene,
camera: OrbitCamera,
aspect: f32,
max_coordinate_error: f64,
) -> Result<PreparedMeshes, GpuError>
pub async fn prepare( &self, device: &Device, scene: &MeshScene, camera: OrbitCamera, aspect: f32, max_coordinate_error: f64, ) -> Result<PreparedMeshes, GpuError>
Uploads a complete scene with vertices relative to the camera target.
Sourcepub async fn prepare_preview(
&self,
device: &Device,
scene: &MeshScene,
camera: OrbitCamera,
aspect: f32,
max_coordinate_error: f64,
) -> Result<PreparedMeshes, GpuError>
pub async fn prepare_preview( &self, device: &Device, scene: &MeshScene, camera: OrbitCamera, aspect: f32, max_coordinate_error: f64, ) -> Result<PreparedMeshes, GpuError>
Like Self::prepare, but also accepts a scene marked incomplete (an interactive
preview that reports its missing objects elsewhere).
Sourcepub fn paint(&self, pass: &mut RenderPass<'_>, prepared: &PreparedMeshes)
pub fn paint(&self, pass: &mut RenderPass<'_>, prepared: &PreparedMeshes)
Records the draw of prepared.
Auto Trait Implementations§
impl !RefUnwindSafe for MeshRenderer
impl !UnwindSafe for MeshRenderer
impl Freeze for MeshRenderer
impl Send for MeshRenderer
impl Sync for MeshRenderer
impl Unpin for MeshRenderer
impl UnsafeUnpin for MeshRenderer
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