pub struct WgpuRenderer {Show 37 fields
pub context: GraphicsContext,
pub pipelines: PipelineMap,
pub user_pipelines: UserPipelineMap,
pub shaders: RefCell<ShaderMap>,
pub render_targets: RefCell<RenderTargetMap>,
pub text: RefCell<TextRasterizer>,
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: &'static Window,
pub depth_texture: Arc<Texture>,
pub first_pass_texture: BindableTexture,
pub lights_buffer: Buffer,
pub global_lighting_params_buffer: Buffer,
pub bloom: Bloom,
pub post_processing_effects: RefCell<Vec<PostProcessingEffect>>,
pub render_texture_format: TextureFormat,
pub tonemapping_texture: BindableTexture,
pub camera_uniform: CameraUniform,
pub camera_buffer: Buffer,
pub camera_bind_group: Arc<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 loaded_image_recv: Receiver<LoadedImage>,
pub loaded_image_send: Sender<LoadedImage>,
pub textures: Arc<Mutex<TextureMap>>,
pub sprite_shader_id: ShaderId,
pub error_shader_id: ShaderId,
pub screenshot_params: ScreenshotParams,
pub screenshot_history_buffer: VecDeque<ScreenshotItem>,
}Fields§
§context: GraphicsContext§pipelines: PipelineMap§user_pipelines: UserPipelineMap§shaders: RefCell<ShaderMap>§render_targets: RefCell<RenderTargetMap>§text: RefCell<TextRasterizer>§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: &'static Window§depth_texture: Arc<Texture>§first_pass_texture: BindableTexture§lights_buffer: Buffer§global_lighting_params_buffer: Buffer§bloom: Bloom§post_processing_effects: RefCell<Vec<PostProcessingEffect>>§render_texture_format: TextureFormat§tonemapping_texture: BindableTexture§camera_uniform: CameraUniform§camera_buffer: Buffer§camera_bind_group: Arc<BindGroup>§camera_bind_group_layout: BindGroupLayout§color: Color§enable_z_buffer: bool§texture_creator: Arc<AtomicRefCell<WgpuTextureCreator>>§thread_pool: ThreadPool§loaded_image_recv: Receiver<LoadedImage>§loaded_image_send: Sender<LoadedImage>§textures: Arc<Mutex<TextureMap>>§sprite_shader_id: ShaderId§error_shader_id: ShaderId§screenshot_params: ScreenshotParams§screenshot_history_buffer: VecDeque<ScreenshotItem>Implementations§
Source§impl WgpuRenderer
impl WgpuRenderer
pub async fn new(window: &'static Window, egui_winit: State) -> Self
pub fn window(&self) -> &Window
pub fn render_post_processing( &mut self, screen_view: &TextureView, game_config: &GameConfig, )
pub fn render_egui(&self, view: &TextureView, egui: &Context)
pub fn on_event(&mut self, event: &WindowEvent, _egui_ctx: &Context) -> bool
pub fn as_mut_any(&mut self) -> &mut dyn Any
pub fn update(&mut self, params: &mut DrawParams<'_>)
pub fn draw(&mut self, params: DrawParams<'_>, egui: &Context)
pub fn scale_factor(&self) -> f32
pub fn resize(&mut self, new_size: UVec2)
pub fn width(&self) -> f32
pub fn height(&self) -> f32
pub fn end_frame(&mut self)
Auto Trait Implementations§
impl !Freeze for WgpuRenderer
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
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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