Struct Renderer
pub struct Renderer { /* private fields */ }Implementations§
§impl Renderer
impl Renderer
pub fn new(gpu: Gpu, width: u32, height: u32) -> Result<Renderer, RendererError>
pub fn new_with_output_format( gpu: Gpu, width: u32, height: u32, output_format: TextureFormat, ) -> Result<Renderer, RendererError>
pub fn gpu(&self) -> &Gpu
pub fn size(&self) -> (u32, u32)
pub fn capacity(&self) -> (u32, u32)
pub fn set_viewport(&mut self, width: u32, height: u32) -> Result<(), String>
pub fn history_restarts(&self) -> u64
pub fn target_textures(&self) -> Vec<Texture>
pub fn output_format(&self) -> TextureFormat
pub fn last_pass_order(&self) -> &[&'static str]
pub fn set_history_gap(&mut self, seconds: f32)
pub fn history_valid(&self) -> bool
pub fn frame(&self) -> &Frame
pub fn warm(&mut self, scenes: &[Scene<'_>]) -> Result<Warming, String>
pub fn set_warm_workers(&mut self, workers: usize)
pub fn use_pipeline_cache(&mut self, path: &Path) -> CacheLoad
pub fn save_pipeline_cache(&self) -> Result<Option<usize>, String>
pub fn warm_opaque(&mut self, features: OpaqueFeatures, lit: bool)
pub fn set_finish(&mut self, finish: Chain)
pub fn set_tape(&mut self, tape: Option<Tape>)
pub fn clear_finish(&mut self)
pub fn set_text_after_taa(&mut self, after: bool)
pub fn text_after_taa(&self) -> bool
pub fn set_sharpen(&mut self, strength: f32) -> Result<(), String>
pub fn sharpen(&self) -> f32
pub fn set_texture_filter( &mut self, filter: TextureFilter, ) -> Result<(), String>
pub fn texture_filter(&self) -> TextureFilter
pub fn set_lens(&mut self, lens: Option<Lens>)
pub fn set_haze(&mut self, haze: Option<RoomHaze>)
pub fn set_exposure(&mut self, exposure: Exposure) -> Result<(), String>
pub fn pick(&mut self, x: u32, y: u32) -> Result<(), String>
pub fn picked(&mut self) -> Option<Picked>
pub fn text_bounds(&self) -> &[TextBounds]
pub fn text_at(&self, x: f32, y: f32) -> Option<&TextBounds>
pub fn readback_geometry(&self) -> Result<GeometryReadback, String>
pub fn shadows(&self) -> &Shadows
pub fn set_shadow_quality(&mut self, quality: Quality)
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 set_poses(&mut self, poses: &[InstancePose<'_>]) -> Result<(), String>
pub fn set_surfaces( &mut self, surfaces: &[InstanceSurface], ) -> Result<(), 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 glass_mesh_buffers( &self, handle: MeshHandle, ) -> Option<(&Buffer, &Buffer, u32)>
pub fn upload_glass(&mut self, mesh: &Mesh) -> Result<MeshHandle, String>
pub fn release_glass(&mut self, handle: MeshHandle) -> Result<(), String>
pub fn replace_glass( &mut self, handle: MeshHandle, mesh: &Mesh, ) -> Result<(), String>
pub fn lod_mut(&mut self) -> &mut LodSet
pub fn lod_stats(&self) -> LodStats
pub fn set_sky(&mut self, source: SkySource, hour: f32) -> Result<(), String>
pub fn request_sky( &mut self, source: SkySource, hour: f32, ) -> Result<u64, String>
pub fn sky_settling(&self) -> bool
pub fn wait_sky(&mut self) -> Result<bool, String>
pub fn set_probes(&mut self, probes: ProbeLighting) -> Result<(), String>
pub fn set_ambient(&mut self, ambient: Ambient) -> Result<(), String>
pub fn set_contact(&mut self, desc: Option<ContactDesc>) -> Result<(), String>
pub fn write_contact(&self, values: &[f32]) -> Result<(), String>
pub fn set_reflection_occlusion(&mut self, threshold: f32) -> Result<(), String>
pub fn set_sky_visibility(&mut self, on: bool)
pub fn set_probe_emission(&mut self, scale: f32) -> Result<(), String>
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 set_maps(&mut self, images: &MapImages<'_>) -> Result<(), String>
pub fn set_detail(&mut self, atlas: &Atlas) -> Result<(), String>
pub fn set_plates( &mut self, plate: Option<&Plate>, settings: PlateSettings, ) -> Result<(), String>
pub fn plate_kit(&mut self) -> PlateKit
pub fn swap_plates(&mut self, plates: Option<Plates>) -> Option<Plates>
pub fn plates(&self) -> Option<&Plates>
pub fn set_plate_settings(&mut self, settings: PlateSettings)
pub fn set_plate_hour(&mut self, hour: f32)
pub fn set_plate_casters(&mut self, casters: &[Instance])
pub fn plate_casters(&self) -> &[Instance]
pub fn set_props(&mut self, props: Option<ImpostorPass>)
pub fn set_tree( &mut self, tree: &Tree, origin: [f32; 3], receiver_y: f32, id: u32, petal_rate: f32, petal_color: [f32; 3], ) -> Result<MeshHandle, String>
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 volume_cuts(&self) -> VolumeCuts
pub fn set_volume_cuts(&mut self, cuts: VolumeCuts)
pub fn resize(&mut self, width: u32, height: u32) -> Result<(), String>
pub fn render( &mut self, scene: &Scene<'_>, text: &Text<'_>, effects: &Effects<'_>, style: Finish, output: &TextureView, ) -> Result<Vec<PassTiming>, String>
pub fn render_with_flat( &mut self, scene: &Scene<'_>, text: &Text<'_>, effects: &Effects<'_>, style: Finish, flat: &FlatScene<'_>, output: &TextureView, ) -> Result<Vec<PassTiming>, String>
pub fn render_flat( &mut self, flat: &FlatScene<'_>, output: &TextureView, ) -> Result<Vec<PassTiming>, String>
pub fn render_flat_look( &mut self, flat: &FlatScene<'_>, look: &LookFrame<'_>, output: &TextureView, ) -> Result<Vec<PassTiming>, String>
pub fn submit( &mut self, scene: &Scene<'_>, text: &Text<'_>, effects: &Effects<'_>, style: Finish, output: &TextureView, ) -> Result<Submitted, String>
pub fn submit_with_flat( &mut self, scene: &Scene<'_>, text: &Text<'_>, effects: &Effects<'_>, style: Finish, flat: &FlatScene<'_>, output: &TextureView, ) -> Result<Submitted, String>
pub fn submit_flat( &mut self, flat: &FlatScene<'_>, output: &TextureView, ) -> Result<Submitted, String>
pub fn submit_flat_look( &mut self, flat: &FlatScene<'_>, look: &LookFrame<'_>, output: &TextureView, ) -> Result<Submitted, String>
pub fn flat_looks(&self) -> Option<&FlatLooks>
pub fn flat_pass(&self) -> Option<&FlatPass>
pub fn warm_flat<'a>( &mut self, format: TextureFormat, size: [u32; 2], looks: impl IntoIterator<Item = &'a Look>, ) -> Result<(), String>
pub fn flat_pipelines_made_on_render_thread(&self) -> usize
pub fn frame_stats(&self) -> FrameStats
pub fn set_frame_stats(&mut self, stats: FrameStats)
pub fn set_dynamic_resolution( &mut self, budget: Option<Budget>, ) -> Result<(), String>
pub fn dynamic_resolution(&self) -> Option<&DynamicResolution>
pub fn apply_dynamic_resolution( &mut self, content: [u32; 2], ) -> Result<(u32, u32), String>
pub fn timings(&self) -> Option<&FrameTimings>
pub fn timing_drops(&self) -> TimingDrops
pub fn frames_submitted(&self) -> u64
pub fn frames_in_flight(&self) -> u64
pub fn wait_frames( &mut self, in_flight: u64, ) -> Result<Vec<FrameTimings>, String>
§impl Renderer
impl Renderer
pub fn set_frames_on_demand( &mut self, limits: Option<Limits>, ) -> Result<(), String>
pub fn frames_on_demand(&self) -> Option<Limits>
pub fn demand_stats(&self) -> Option<DemandStats>
pub fn frame_needed(&self, next: &Next<'_>) -> Need
pub fn submit_needed( &mut self, next: &Next<'_>, need: &Need, output: &TextureView, ) -> Result<Option<Submitted>, String>
pub fn render_needed( &mut self, next: &Next<'_>, need: &Need, output: &TextureView, ) -> Result<Option<Vec<PassTiming>>, String>
pub fn present_last( &mut self, output: &TextureView, ) -> Result<Submitted, String>
pub fn wake(&mut self, groups: u32) -> Result<Submitted, String>
pub fn submit_bridge( &mut self, next: &Next<'_>, output: &TextureView, ) -> Result<Option<Submitted>, String>
pub fn render_bridge( &mut self, next: &Next<'_>, output: &TextureView, ) -> Result<Option<Vec<PassTiming>>, String>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Renderer
impl !RefUnwindSafe for Renderer
impl Send for Renderer
impl !Sync for Renderer
impl Unpin for Renderer
impl UnsafeUnpin for Renderer
impl !UnwindSafe for Renderer
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<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§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.