mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-25 08:51:05 +01:00
[rs] Note that get_next_texture will error if a previous output is still alive.
This commit is contained in:
1 parent
af7a4282f2
commit
ac7809cdcb
1 file changed
+2
-1
+2
-1
@@ -1479,7 +1479,8 @@ impl SwapChain {
|
||||
/// When the [`SwapChainOutput`] returned by this method is dropped, the swapchain will present
|
||||
/// the texture to the associated [`Surface`].
|
||||
///
|
||||
/// Returns an `Err` if the GPU timed out when attempting to acquire the next texture.
|
||||
/// Returns an `Err` if the GPU timed out when attempting to acquire the next texture or if a
|
||||
/// previous output is still alive.
|
||||
pub fn get_next_texture(&mut self) -> Result<SwapChainOutput, ()> {
|
||||
let output = wgn::wgpu_swap_chain_get_next_texture(self.id);
|
||||
if output.view_id == wgc::id::Id::ERROR {
|
||||
|
||||
Reference in new issue
Block a user