summaryrefslogtreecommitdiffstats
path: root/wgpu/src/window/swap_chain.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-09 03:44:16 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-09 03:44:16 +0100
commit9a73c3a88d92262b4e59c1f061b1c56e533e2b0b (patch)
tree05014ecebcbd31c043f2e168de4830a96fa3cc32 /wgpu/src/window/swap_chain.rs
parent8f0b59a4b28bee028a879b0705eeeaa0b2e82df6 (diff)
downloadiced-9a73c3a88d92262b4e59c1f061b1c56e533e2b0b.tar.gz
iced-9a73c3a88d92262b4e59c1f061b1c56e533e2b0b.tar.bz2
iced-9a73c3a88d92262b4e59c1f061b1c56e533e2b0b.zip
Write documentation for new `iced_wgpu` types
Diffstat (limited to 'wgpu/src/window/swap_chain.rs')
-rw-r--r--wgpu/src/window/swap_chain.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/wgpu/src/window/swap_chain.rs b/wgpu/src/window/swap_chain.rs
index 3760e8a2..6f545fce 100644
--- a/wgpu/src/window/swap_chain.rs
+++ b/wgpu/src/window/swap_chain.rs
@@ -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)
}