Struct comfy_wgpu::WgpuRenderer
source · 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
impl WgpuRenderer
pub async fn new(window: Window, egui_winit: State) -> Self
pub fn window(&self) -> &Window
pub fn render_post_processing( &mut self, screen_view: &TextureView, params: &GlobalLightingParams )
pub fn render_debug(&mut self, surface_view: &TextureView)
pub fn render_egui(&self, view: &TextureView, params: &DrawParams<'_>)
pub fn on_event(&mut self, event: &WindowEvent<'_>, egui_ctx: &Context) -> bool
pub fn render_meshes( &mut self, is_first: bool, clear_color: Color, pass_data: MeshDrawData, surface_view: &TextureView )
pub fn render_particles( &mut self, is_first: bool, pass_data: ParticleDrawData, clear_color: Color, surface_view: &TextureView )
pub fn as_mut_any(&mut self) -> &mut dyn Any
pub fn begin_frame(&mut self, egui_ctx: &Context)
pub fn update(&mut self, params: &mut DrawParams<'_>)
pub fn draw(&mut self, params: DrawParams<'_>)
pub fn scale_factor(&self) -> f32
pub fn resize(&mut self, new_size: UVec2)
pub fn load_textures(&mut self, texture_queue: TextureLoadQueue)
pub fn width(&self) -> f32
pub fn height(&self) -> f32
pub fn end_frame(&mut self)
Auto Trait Implementations§
impl !RefUnwindSafe for WgpuRenderer
impl Send for WgpuRenderer
impl !Sync for WgpuRenderer
impl Unpin for WgpuRenderer
impl !UnwindSafe for WgpuRenderer
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