pub unsafe fn clear_attachments<A, R>(&mut self, attachments: A, rects: R)
    where
        A: IntoIterator<Item = ClearAttachment>,
        R: IntoIterator<Item = ClearRect>,
    {
        struct Cmd {
            attachments: Mutex<SmallVec<[ClearAttachment; 3]>>,
            rects: Mutex<SmallVec<[ClearRect; 4]>>,
        }

        impl Command for Cmd {
            fn name(&self) -> &'static str {
                "vkCmdClearAttachments"
            }

            unsafe fn send(&self, out: &mut UnsafeCommandBufferBuilder) {
                out.clear_attachments(
                    self.attachments.lock().unwrap().drain(..),
                    self.rects.lock().unwrap().drain(..),
                );
            }
        }
        let attachments: SmallVec<[_; 3]> = attachments.into_iter().collect();
        let rects: SmallVec<[_; 4]> = rects.into_iter().collect();

        self.append_command(
            Cmd {
                attachments: Mutex::new(attachments),
                rects: Mutex::new(rects),
            },
            [],
        )
        .unwrap();
    }
/// Calls `vkCmdClearAttachments` on the builder.
///
/// Does nothing if the list of attachments or the list of rects is empty, as it would be a
/// no-op and isn't a valid usage of the command anyway.
Calls `vkCmdClearAttachments` on the builder.
Does nothing if the list of attachments or the list of rects is empty, as it would be a
no-op and isn't a valid usage of the command anyway.
Calls ` vkCmdClearAttachments ` on the builder . Does nothing if the list of attachments or the list of rects is empty as it would be a no - op and isn ' t a valid usage of the command anyway .
pub unsafe fn clear_attachments<A, R>(&mut self, attachments: A, rects: R)
    where
        A: IntoIterator<Item = ClearAttachment>,
        R: IntoIterator<Item = ClearRect>,
    {
        struct Cmd {
            attachments: Mutex<SmallVec<[ClearAttachment; 3]>>,
            rects: Mutex<SmallVec<[ClearRect; 4]>>,
        }
        impl Command for Cmd {
            fn name(&self) -> &'static str {
                "vkCmdClearAttachments"
            }
            unsafe fn send(&self, out: &mut UnsafeCommandBufferBuilder) {
                out.clear_attachments(
                    self.attachments.lock().unwrap().drain(..),
                    self.rects.lock().unwrap().drain(..),
                );
            }
        }
        let attachments: SmallVec<[_; 3]> = attachments.into_iter().collect();
        let rects: SmallVec<[_; 4]> = rects.into_iter().collect();
        self.append_command(
            Cmd {
                attachments: Mutex::new(attachments),
                rects: Mutex::new(rects),
            },
            [],
        )
        .unwrap();
    }
pub unsafe fn clear_attachments < A , R > ( & mut self , attachments : A , rects : R ) where A : IntoIterator < Item = ClearAttachment > , R : IntoIterator < Item = ClearRect > , { struct Cmd { attachments : Mutex < SmallVec < [ ClearAttachment ; 3 ] > > , rects : Mutex < SmallVec < [ ClearRect ; 4 ] > > , } impl Command for Cmd { fn name ( & self ) -> & ' static str { " " } unsafe fn send ( & self , out : & mut UnsafeCommandBufferBuilder ) { out . clear_attachments ( self . attachments . lock ( ) . unwrap ( ) . drain ( .. ) , self . rects . lock ( ) . unwrap ( ) . drain ( .. ) , ) ; } } let attachments : SmallVec < [ _ ; 3 ] > = attachments . into_iter ( ) . collect ( ) ; let rects : SmallVec < [ _ ; 4 ] > = rects . into_iter ( ) . collect ( ) ; self . append_command ( Cmd { attachments : Mutex :: new ( attachments ) , rects : Mutex :: new ( rects ) , } , [ ] , ) . unwrap ( ) ; }
Calls `vkCmdClearAttachments` on the builder.
Calls ` vkCmdClearAttachments ` on the builder .
&mut self
attachments
A
rects
R
&mut self
attachments
A
rects
R