Write documentation for new iced_wgpu types
This commit is contained in:
parent
8f0b59a4b2
commit
9a73c3a88d
5 changed files with 16 additions and 1 deletions
|
|
@ -12,6 +12,9 @@ pub struct SwapChain {
|
|||
impl SwapChain {}
|
||||
|
||||
impl SwapChain {
|
||||
/// Creates a new [`SwapChain`] for the given surface.
|
||||
///
|
||||
/// [`SwapChain`]: struct.SwapChain.html
|
||||
pub fn new(
|
||||
device: &wgpu::Device,
|
||||
surface: &wgpu::Surface,
|
||||
|
|
@ -24,6 +27,10 @@ impl SwapChain {
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns the next frame of the [`SwapChain`] alongside its [`Viewport`].
|
||||
///
|
||||
/// [`SwapChain`]: struct.SwapChain.html
|
||||
/// [`Viewport`]: ../struct.Viewport.html
|
||||
pub fn next_frame(&mut self) -> (wgpu::SwapChainOutput<'_>, &Viewport) {
|
||||
(self.raw.get_next_texture(), &self.viewport)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue