[−][src]Struct rendy::wsi::Surface
Rendering target bound to window.
Implementations
impl<B> Surface<B> where
B: Backend, [src]
B: Backend,
pub fn new(
instance: &Instance<B>,
handle: &impl HasRawWindowHandle
) -> Result<Surface<B>, InitError>[src]
instance: &Instance<B>,
handle: &impl HasRawWindowHandle
) -> Result<Surface<B>, InitError>
Create surface for the window.
pub unsafe fn new_with(
instance: &Instance<B>,
f: impl FnOnce(&<B as Backend>::Instance) -> <B as Backend>::Surface
) -> Surface<B>[src]
instance: &Instance<B>,
f: impl FnOnce(&<B as Backend>::Instance) -> <B as Backend>::Surface
) -> Surface<B>
Create surface from instance.
Safety
Closure must return surface object created from raw instance provided as closure argument.
pub unsafe fn from_raw(
surface: <B as Backend>::Surface,
instance: InstanceId
) -> Surface<B>[src]
surface: <B as Backend>::Surface,
instance: InstanceId
) -> Surface<B>
Create surface from raw parts.
impl<B> Surface<B> where
B: Backend, [src]
B: Backend,
pub fn raw(&self) -> &<B as Backend>::Surface[src]
Get raw B::Surface reference
pub unsafe fn extent(
&self,
physical_device: &<B as Backend>::PhysicalDevice
) -> Option<Extent2D>[src]
&self,
physical_device: &<B as Backend>::PhysicalDevice
) -> Option<Extent2D>
Get current extent of the surface.
pub unsafe fn format(
&self,
physical_device: &<B as Backend>::PhysicalDevice
) -> Format[src]
&self,
physical_device: &<B as Backend>::PhysicalDevice
) -> Format
Get surface ideal format.
pub unsafe fn supported_formats(
&self,
physical_device: &<B as Backend>::PhysicalDevice
) -> Option<Vec<Format>>[src]
&self,
physical_device: &<B as Backend>::PhysicalDevice
) -> Option<Vec<Format>>
Get formats supported by surface
Safety
physical_devicemust be created from sameInstanceas theSurface
pub unsafe fn capabilities(
&self,
physical_device: &<B as Backend>::PhysicalDevice
) -> SurfaceCapabilities[src]
&self,
physical_device: &<B as Backend>::PhysicalDevice
) -> SurfaceCapabilities
Get formats supported by surface
Safety
physical_devicemust be created from sameInstanceas theSurface
pub unsafe fn into_target(
self,
physical_device: &<B as Backend>::PhysicalDevice,
device: &Device<B>,
suggest_extent: Extent2D,
image_count: u32,
present_mode: PresentMode,
usage: Usage
) -> Result<Target<B>, SwapchainError>[src]
self,
physical_device: &<B as Backend>::PhysicalDevice,
device: &Device<B>,
suggest_extent: Extent2D,
image_count: u32,
present_mode: PresentMode,
usage: Usage
) -> Result<Target<B>, SwapchainError>
Cast surface into render target.
impl<B> Surface<B> where
B: Backend, [src]
B: Backend,
pub fn instance_id(&self) -> InstanceId[src]
Get owned id.
pub fn assert_instance_owner(&self, instance: &Instance<B>)[src]
Assert specified instance is owner.
Trait Implementations
Auto Trait Implementations
impl<B> RefUnwindSafe for Surface<B> where
<B as Backend>::Surface: RefUnwindSafe,
<B as Backend>::Surface: RefUnwindSafe,
impl<B> Send for Surface<B> where
<B as Backend>::Surface: Send,
<B as Backend>::Surface: Send,
impl<B> Sync for Surface<B> where
<B as Backend>::Surface: Sync,
<B as Backend>::Surface: Sync,
impl<B> Unpin for Surface<B> where
<B as Backend>::Surface: Unpin,
<B as Backend>::Surface: Unpin,
impl<B> UnwindSafe for Surface<B> where
<B as Backend>::Surface: UnwindSafe,
<B as Backend>::Surface: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,