pub struct WgpuRenderer {
Show 40 fields pub context: GraphicsContext, pub surface: Surface, pub hot_reload: HotReload, pub config: SurfaceConfiguration, pub size: PhysicalSize<u32>, pub pipelines: PipelineMap, pub shaders: RefCell<ShaderMap>, pub egui_winit: State, pub egui_render_routine: RefCell<EguiRenderRoutine>, pub screenshot_buffer: SizedBuffer, pub vertex_buffer: SizedBuffer, pub index_buffer: SizedBuffer, pub quad_ubg: UniformBindGroup, pub texture_layout: Arc<BindGroupLayout>, pub window: Window, pub depth_texture: Arc<Texture>, pub first_pass_texture: Texture, pub first_pass_bind_group: BindGroup, pub lights_buffer: Buffer, pub lights_bind_group: BindGroup, pub lights_bind_group_layout: BindGroupLayout, pub global_lighting_params_buffer: Buffer, pub global_lighting_params_bind_group: Arc<BindGroup>, pub global_lighting_params_bind_group_layout: BindGroupLayout, pub bloom: Bloom, pub post_processing_effects: RefCell<Vec<PostProcessingEffect>>, pub render_texture_format: TextureFormat, pub tonemapping_texture: Texture, pub tonemapping_bind_group: BindGroup, pub camera_uniform: CameraUniform, pub camera_buffer: Buffer, pub camera_bind_group: BindGroup, pub camera_bind_group_layout: BindGroupLayout, pub color: Color, pub enable_z_buffer: bool, pub texture_creator: Arc<AtomicRefCell<WgpuTextureCreator>>, pub thread_pool: ThreadPool, pub rx_texture: Receiver<LoadedImage>, pub tx_texture: Sender<LoadedImage>, pub textures: Arc<Mutex<TextureMap>>,
}

Fields§

§context: GraphicsContext§surface: Surface§hot_reload: HotReload§config: SurfaceConfiguration§size: PhysicalSize<u32>§pipelines: PipelineMap§shaders: RefCell<ShaderMap>§egui_winit: State§egui_render_routine: RefCell<EguiRenderRoutine>§screenshot_buffer: SizedBuffer§vertex_buffer: SizedBuffer§index_buffer: SizedBuffer§quad_ubg: UniformBindGroup§texture_layout: Arc<BindGroupLayout>§window: Window§depth_texture: Arc<Texture>§first_pass_texture: Texture§first_pass_bind_group: BindGroup§lights_buffer: Buffer§lights_bind_group: BindGroup§lights_bind_group_layout: BindGroupLayout§global_lighting_params_buffer: Buffer§global_lighting_params_bind_group: Arc<BindGroup>§global_lighting_params_bind_group_layout: BindGroupLayout§bloom: Bloom§post_processing_effects: RefCell<Vec<PostProcessingEffect>>§render_texture_format: TextureFormat§tonemapping_texture: Texture§tonemapping_bind_group: BindGroup§camera_uniform: CameraUniform§camera_buffer: Buffer§camera_bind_group: BindGroup§camera_bind_group_layout: BindGroupLayout§color: Color§enable_z_buffer: bool§texture_creator: Arc<AtomicRefCell<WgpuTextureCreator>>§thread_pool: ThreadPool§rx_texture: Receiver<LoadedImage>§tx_texture: Sender<LoadedImage>§textures: Arc<Mutex<TextureMap>>

Implementations§

source§

impl WgpuRenderer

source

pub async fn new(window: Window, egui_winit: State) -> Self

source

pub fn window(&self) -> &Window

source

pub fn render_post_processing( &mut self, screen_view: &TextureView, params: &GlobalLightingParams )

source

pub fn render_debug(&mut self, surface_view: &TextureView)

source

pub fn render_egui(&self, view: &TextureView, params: &DrawParams<'_>)

source

pub fn on_event(&mut self, event: &WindowEvent<'_>, egui_ctx: &Context) -> bool

source

pub fn render_meshes( &mut self, is_first: bool, clear_color: Color, pass_data: MeshDrawData, surface_view: &TextureView )

source

pub fn render_particles( &mut self, is_first: bool, pass_data: ParticleDrawData, clear_color: Color, surface_view: &TextureView )

source

pub fn as_mut_any(&mut self) -> &mut dyn Any

source

pub fn begin_frame(&mut self, egui_ctx: &Context)

source

pub fn update(&mut self, params: &mut DrawParams<'_>)

source

pub fn draw(&mut self, params: DrawParams<'_>)

source

pub fn scale_factor(&self) -> f32

source

pub fn resize(&mut self, new_size: UVec2)

source

pub fn load_textures(&mut self, texture_queue: TextureLoadQueue)

source

pub fn width(&self) -> f32

source

pub fn height(&self) -> f32

source

pub fn end_frame(&mut self)

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<F, T> IntoSample<T> for Fwhere T: FromSample<F>,

§

fn into_sample(self) -> T

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T, U> ToSample<U> for Twhere U: FromSample<T>,

§

fn to_sample_(self) -> U

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> Any for Twhere T: Any,

§

impl<S, T> Duplex<S> for Twhere T: FromSample<S> + ToSample<S>,