pub struct CommandBuffer { /* private fields */ }Implementations§
Source§impl CommandBuffer
impl CommandBuffer
pub fn new( pool: Vrc<CommandPool>, primary: bool, ) -> Result<Vrc<Self>, CommandBufferError>
pub fn new_multiple( pool: Vrc<CommandPool>, primary: bool, count: NonZeroU32, ) -> Result<Vec<Vrc<Self>>, CommandBufferError>
Sourcepub unsafe fn from_existing(
pool: Vrc<CommandPool>,
command_buffer: CommandBuffer,
) -> Self
pub unsafe fn from_existing( pool: Vrc<CommandPool>, command_buffer: CommandBuffer, ) -> Self
Creates a new CommandBuffer from existing handle.
§Safety
command_buffer must be valid handle allocated from pool.
Sourcepub fn reset(&self, release_resource: bool) -> Result<(), CommandBufferError>
pub fn reset(&self, release_resource: bool) -> Result<(), CommandBufferError>
§Panic
This function will panic if the vutex cannot be locked.
Sourcepub fn begin_recording(
&self,
info: CommandBufferBeginInfo,
) -> Result<CommandBufferRecordingLockOutsideRenderPass<'_>, CommandBufferError>
pub fn begin_recording( &self, info: CommandBufferBeginInfo, ) -> Result<CommandBufferRecordingLockOutsideRenderPass<'_>, CommandBufferError>
Equivalent to calling CommandBufferRecordingLock::new(self)
§Panic
This function will panic if the pool or the buffer vutex cannot be locked.
pub const fn pool(&self) -> &Vrc<CommandPool>
Methods from Deref<Target = Vutex<CommandBuffer>>§
pub fn lock(&self) -> Result<VutexGuard<'_, T>, BorrowMutError>
Trait Implementations§
Source§impl Borrow<Vutex<CommandBuffer>> for CommandBuffer
impl Borrow<Vutex<CommandBuffer>> for CommandBuffer
Source§impl Debug for CommandBuffer
impl Debug for CommandBuffer
Source§impl Deref for CommandBuffer
impl Deref for CommandBuffer
Source§impl Drop for CommandBuffer
impl Drop for CommandBuffer
Source§impl HasSynchronizedHandle<CommandBuffer> for CommandBuffer
impl HasSynchronizedHandle<CommandBuffer> for CommandBuffer
fn lock_handle(&self) -> VutexGuard<'_, T>
fn lock_safe_handle(&self) -> VutexGuardSafeHandleBorrow<'_, T>
Source§impl Hash for CommandBuffer
impl Hash for CommandBuffer
Source§impl Ord for CommandBuffer
impl Ord for CommandBuffer
Source§impl PartialEq for CommandBuffer
impl PartialEq for CommandBuffer
Source§impl PartialOrd for CommandBuffer
impl PartialOrd for CommandBuffer
impl Eq for CommandBuffer
Auto Trait Implementations§
impl !Freeze for CommandBuffer
impl !RefUnwindSafe for CommandBuffer
impl !Send for CommandBuffer
impl !Sync for CommandBuffer
impl Unpin for CommandBuffer
impl !UnwindSafe for CommandBuffer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more