pub struct RenderState {Show 15 fields
pub surface_format: TextureFormat,
pub surface_size: (u32, u32),
pub scene_uniform_buffer: Buffer,
pub scene_bind_group: BindGroup,
pub scene_bind_group_layout: BindGroupLayout,
pub depth_texture_view: TextureView,
pub hdr_texture_view: TextureView,
pub tonemap_pipeline: RenderPipeline,
pub tonemap_bind_group: BindGroup,
pub tonemap_bind_group_layout: BindGroupLayout,
pub ibl_shadow_bind_group: BindGroup,
pub ibl_shadow_bind_group_layout: BindGroupLayout,
pub shadow_pipeline: RenderPipeline,
pub shadow_map_view: TextureView,
pub hdr_msaa_texture_view: TextureView,
}Expand description
共享渲染状态
持有与 GPU 表面和场景 Uniform 相关的资源。 RenderApp 在 GPU 初始化后将其插入 World。
Fields§
§surface_format: TextureFormat§surface_size: (u32, u32)§scene_uniform_buffer: Buffer§scene_bind_group: BindGroup§scene_bind_group_layout: BindGroupLayout§depth_texture_view: TextureView§hdr_texture_view: TextureView§tonemap_pipeline: RenderPipeline§tonemap_bind_group: BindGroup§tonemap_bind_group_layout: BindGroupLayout§ibl_shadow_bind_group: BindGroup§ibl_shadow_bind_group_layout: BindGroupLayout§shadow_pipeline: RenderPipeline§shadow_map_view: TextureView§hdr_msaa_texture_view: TextureViewTrait Implementations§
Auto Trait Implementations§
impl !Freeze for RenderState
impl !RefUnwindSafe for RenderState
impl Send for RenderState
impl Sync for RenderState
impl Unpin for RenderState
impl UnsafeUnpin for RenderState
impl !UnwindSafe for RenderState
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.