pub struct SurfaceRenderer<'s> {
pub dev_id: usize,
pub device_handle: DeviceHandle,
pub surface: Surface<'s>,
pub config: SurfaceConfiguration,
/* private fields */
}Expand description
Combination of surface and its configuration.
Fields§
§dev_id: usize§device_handle: DeviceHandle§surface: Surface<'s>§config: SurfaceConfigurationImplementations§
Source§impl<'s> SurfaceRenderer<'s>
impl<'s> SurfaceRenderer<'s>
Sourcepub async fn new<'w>(
surface: Surface<'w>,
surface_renderer_config: SurfaceRendererConfiguration,
intermediate_texture_config: Option<TextureConfiguration>,
device_handle: DeviceHandle,
dev_id: usize,
) -> Result<SurfaceRenderer<'w>, WgpuContextError>
pub async fn new<'w>( surface: Surface<'w>, surface_renderer_config: SurfaceRendererConfiguration, intermediate_texture_config: Option<TextureConfiguration>, device_handle: DeviceHandle, dev_id: usize, ) -> Result<SurfaceRenderer<'w>, WgpuContextError>
Creates a new render surface for the specified window and dimensions.
pub fn device(&self) -> &Device
pub fn queue(&self) -> &Queue
pub fn set_present_mode(&mut self, present_mode: PresentMode)
pub fn current_surface_texture(&self) -> SurfaceTexture
pub fn target_texture_view(&self) -> TextureView
pub fn maybe_blit_and_present(&self)
Trait Implementations§
Auto Trait Implementations§
impl<'s> !Freeze for SurfaceRenderer<'s>
impl<'s> !RefUnwindSafe for SurfaceRenderer<'s>
impl<'s> Send for SurfaceRenderer<'s>
impl<'s> Sync for SurfaceRenderer<'s>
impl<'s> Unpin for SurfaceRenderer<'s>
impl<'s> !UnwindSafe for SurfaceRenderer<'s>
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