[−][src]Struct rendy::wsi::Surface
Rendering target bound to window.
Methods
impl<B> Surface<B> where
B: Backend,
[src]
B: Backend,
pub fn new(instance: &Instance<B>, window: &Window) -> Surface<B>
[src]
Create surface for the window.
pub unsafe fn create<T, impl FnOnce(&T) -> B::Surface>(
instance: &Instance<B>,
f: impl FnOnce(&T) -> B::Surface
) -> Surface<B> where
T: Instance<Backend = B>,
impl FnOnce(&T) -> B::Surface: FnOnce(&T) -> <B as Backend>::Surface,
[src]
instance: &Instance<B>,
f: impl FnOnce(&T) -> B::Surface
) -> Surface<B> where
T: Instance<Backend = B>,
impl FnOnce(&T) -> B::Surface: FnOnce(&T) -> <B as Backend>::Surface,
Create surface from instance
.
Safety
Closure must return surface object created from raw instance provided as closure argument.
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 compatibility(
&self,
physical_device: &<B as Backend>::PhysicalDevice
) -> (SurfaceCapabilities, Option<Vec<Format>>, Vec<PresentMode>)
[src]
&self,
physical_device: &<B as Backend>::PhysicalDevice
) -> (SurfaceCapabilities, Option<Vec<Format>>, Vec<PresentMode>)
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>, Error>
[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>, Error>
Cast surface into render target.
impl<B> Surface<B> where
B: Backend,
B: Backend,
pub fn instance_id(&self) -> InstanceId
Get owned id.
pub fn assert_instance_owner(&self, instance: &Instance<B>)
Assert specified instance is owner.
Trait Implementations
Auto Trait Implementations
impl<B> Unpin for Surface<B> where
<B as Backend>::Surface: Unpin,
<B as Backend>::Surface: Unpin,
impl<B> Sync for Surface<B> where
<B as Backend>::Surface: Sync,
<B as Backend>::Surface: Sync,
impl<B> Send for Surface<B> where
<B as Backend>::Surface: Send,
<B as Backend>::Surface: Send,
impl<B> UnwindSafe for Surface<B> where
<B as Backend>::Surface: UnwindSafe,
<B as Backend>::Surface: UnwindSafe,
impl<B> RefUnwindSafe for Surface<B> where
<B as Backend>::Surface: RefUnwindSafe,
<B as Backend>::Surface: RefUnwindSafe,
Blanket Implementations
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Supports<T> for T
[src]
impl<T> SetParameter for T
[src]
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
[src]
T: Parameter<Self>,
Sets value
as a parameter of self
.
impl<T> Erased for T
[src]
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
Convert the source color to the destination color using the bradford method by default Read more