pub struct Frame {
pub gpu: Gpu,
pub targets: FrameTargets,
/* private fields */
}Fields§
§gpu: Gpu§targets: FrameTargetsImplementations§
Source§impl Frame
impl Frame
pub fn new(gpu: Gpu, width: u32, height: u32) -> Result<Self, String>
pub fn set_shadows(&mut self, shadows: &Shadows, fit: &Fit)
pub fn set_probe_corner_floor(&self, floor: f32) -> Result<(), String>
pub fn probe_corner_floor(&self) -> f32
pub fn set_reflection_occlusion(&mut self, threshold: f32) -> Result<(), String>
pub fn set_sky_visibility(&mut self, on: bool)
pub fn set_opaque_on(&self, on: OpaqueFeatures)
pub fn set_opaque_off(&self, off: OpaqueFeatures)
pub fn warm_opaque(&mut self, features: OpaqueFeatures, lit: bool)
pub fn warm(&mut self, first: &[OpaqueKey], later: &[OpaqueKey]) -> Warming
pub fn set_warm_workers(&mut self, workers: usize)
pub fn opaque_pipelines(&self) -> Vec<OpaqueKey>
pub fn opaque_made_on_render_thread(&self) -> usize
pub fn use_pipeline_cache(&mut self, path: &Path) -> CacheLoad
pub fn save_pipeline_cache(&self) -> Result<Option<usize>, String>
pub fn set_reflections_planned(&mut self, planned: bool)
pub fn opaque_keys( &self, scene: &Scene<'_>, shadows: Option<(&Shadows, &Fit)>, ) -> Result<Vec<OpaqueKey>, String>
pub fn opaque_drawn(&self) -> &[OpaqueFeatures]
pub fn scene_features(&self) -> OpaqueFeatures
pub fn opaque_features(&self, batches: &[Batch]) -> Vec<OpaqueFeatures>
pub fn set_lights(&mut self, lights: &[LocalLight]) -> Result<(), String>
pub fn set_light_quality(&mut self, quality: LightQuality) -> Result<(), String>
pub fn set_transmission( &mut self, tints: &[Option<[f32; 3]>], ) -> Result<(), String>
pub fn lights(&self) -> &Lights
pub fn set_probe_emission(&mut self, scale: f32) -> Result<(), String>
pub fn set_jitter(&mut self, jitter: [f32; 2])
pub fn set_reflections(&mut self, history: Option<Reflections>)
pub fn set_local_reflections( &self, artifacts: Option<Vec<ReflectionArtifact>>, hour: f32, ) -> Result<(), String>
pub fn set_local_reflection_hour(&self, hour: f32) -> Result<(), String>
pub fn set_sky(&mut self, source: SkySource, settle: bool) -> u64
pub fn sky(&self) -> &SkyPass
pub fn sky_mut(&mut self) -> &mut SkyPass
pub fn set_ambient(&mut self, ambient: Ambient) -> Result<(), String>
pub fn ambient(&self) -> Ambient
pub fn set_contact(&mut self, desc: Option<ContactDesc>) -> Result<(), String>
pub fn contact(&self) -> Option<&ContactField>
pub fn write_contact(&self, values: &[f32]) -> Result<(), String>
pub fn set_probes(&mut self, probes: ProbeLighting)
pub fn set_probe_hour(&mut self, hour: f32) -> Result<(), String>
pub fn probes(&self) -> &ProbeLighting
pub fn set_maps(&mut self, images: &MapImages<'_>) -> Result<(), String>
pub fn set_detail(&mut self, atlas: &Atlas) -> Result<(), String>
pub fn set_texture_filter( &mut self, filter: TextureFilter, ) -> Result<(), String>
pub fn texture_filter(&self) -> TextureFilter
pub fn maps(&self) -> &MapTextures
pub fn set_content( &self, slot: usize, width: u32, height: u32, format: ContentFormat, ) -> Result<(), String>
pub fn write_content( &self, slot: usize, rect: [u32; 4], bytes: &[u8], ) -> Result<(), String>
pub fn copy_content( &self, encoder: &mut CommandEncoder, slot: usize, source: &Texture, ) -> Result<ContentCopy, String>
pub fn regenerate_content( &self, encoder: &mut CommandEncoder, slot: usize, ) -> Result<(), String>
pub fn regenerate_content_regions( &self, encoder: &mut CommandEncoder, slot: usize, regions: &[MipRegion], ) -> Result<(), String>
pub fn set_caustic(&self, caustic: Option<Caustic>) -> Result<(), String>
pub fn caustic(&self) -> Option<Caustic>
pub fn release_content(&self, slot: usize)
pub fn content(&self) -> Ref<'_, ContentSlots>
pub fn set_surfaces(&self, surfaces: &[InstanceSurface]) -> Result<(), String>
pub fn surfaces(&self) -> Ref<'_, Vec<InstanceSurface>>
pub fn lit_bindings(&self) -> Option<LitBindings<'_>>
pub fn deformer_buffer(&self) -> &DeformerBuffer
pub fn has_tree(&self) -> bool
pub fn set_canopy_mode(&mut self, mode: CanopyMode) -> Result<(), String>
pub fn set_canopy_sharpness(&mut self, sharpness: f32) -> Result<(), String>
pub fn set_canopy_strength(&mut self, strength: f32) -> Result<(), String>
pub fn set_canopy_gobo(&mut self, gobo: Gobo) -> Result<(), String>
pub fn canopy_gobo(&self) -> Gobo
pub fn visible_card_count(&self) -> u32
pub fn set_tree( &mut self, tree: &Tree, origin: [f32; 3], receiver_y: f32, id: u32, ) -> Result<MeshHandle, String>
pub fn upload_mesh(&mut self, data: MeshData<'_>) -> Result<MeshHandle, String>
pub fn upload_skinned_mesh( &mut self, data: MeshData<'_>, skin: SkinData<'_>, ) -> Result<MeshHandle, String>
pub fn upload_swaying_mesh( &mut self, data: MeshData<'_>, sway: &[SwayVertex], ) -> Result<MeshHandle, String>
pub fn release_mesh(&mut self, handle: MeshHandle) -> Result<(), String>
pub fn replace_mesh( &mut self, handle: MeshHandle, data: MeshData<'_>, ) -> Result<(), String>
pub fn mesh_stats(&self) -> MeshStats
pub fn shadow_mesh(&self, handle: MeshHandle) -> Option<(&Buffer, &Buffer, u32)>
pub fn mesh_buffers(&self, handle: MeshHandle) -> Option<MeshBuffers<'_>>
pub fn swaying(&self, handle: MeshHandle) -> bool
pub fn skinned(&self, handle: MeshHandle) -> bool
pub fn set_poses(&self, poses: &[InstancePose<'_>]) -> Result<(), String>
pub fn same_poses(&self, poses: &[InstancePose<'_>]) -> bool
pub fn render(&mut self, scene: &Scene<'_>) -> Result<&FrameTargets, String>
pub fn resize(&mut self, width: u32, height: u32) -> Result<(), String>
pub fn viewport(&self) -> [u32; 2]
pub fn set_viewport(&mut self, width: u32, height: u32) -> Result<(), String>
pub fn encode( &mut self, scene: &Scene<'_>, encoder: &mut CommandEncoder, shadows: Option<(&mut Shadows, &Fit)>, profiler: Option<&mut GpuProfiler>, ) -> Result<(), String>
pub fn encode_with_shadow_hook( &mut self, scene: &Scene<'_>, encoder: &mut CommandEncoder, shadows: Option<(&mut Shadows, &Fit)>, profiler: Option<&mut GpuProfiler>, shadow_hook: impl FnOnce(&Gpu, &mut CommandEncoder, &mut Shadows, &Fit) -> Result<(), String>, ) -> Result<(), String>
pub fn encode_with_casts( &mut self, scene: &Scene<'_>, encoder: &mut CommandEncoder, shadows: Option<(&mut Shadows, &Fit)>, profiler: Option<&mut GpuProfiler>, casts: Option<&mut LayerDraw<'_>>, shadow_hook: impl FnOnce(&Gpu, &mut CommandEncoder, &mut Shadows, &Fit) -> Result<(), String>, ) -> Result<(), String>
pub fn collect_timings(&mut self) -> Vec<Vec<PassTiming>>
pub fn readback_velocity(&self) -> Result<Vec<[u16; 2]>, String>
Trait Implementations§
Source§impl MeshUploader for Frame
impl MeshUploader for Frame
fn upload_mesh(&mut self, data: MeshData<'_>) -> Result<MeshHandle, String>
Auto Trait Implementations§
impl !Freeze for Frame
impl !RefUnwindSafe for Frame
impl Send for Frame
impl !Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl !UnwindSafe for Frame
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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§impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.