Struct Recording
pub struct Recording {
pub commands: Vec<Command>,
}Expand description
List of Commands for an engine to execute in order.
Fields§
§commands: Vec<Command>Implementations§
§impl Recording
impl Recording
pub fn upload(
&mut self,
name: &'static str,
data: impl Into<Vec<u8>>,
) -> BufferProxy
pub fn upload( &mut self, name: &'static str, data: impl Into<Vec<u8>>, ) -> BufferProxy
Commands to upload the given data to a new buffer with the given name.
Returns a BufferProxy to the buffer.
pub fn upload_uniform(
&mut self,
name: &'static str,
data: impl Into<Vec<u8>>,
) -> BufferProxy
pub fn upload_uniform( &mut self, name: &'static str, data: impl Into<Vec<u8>>, ) -> BufferProxy
Commands to upload the given data to a new buffer as a uniform with the given name.
Returns a BufferProxy to the buffer.
pub fn upload_image(
&mut self,
width: u32,
height: u32,
format: ImageFormat,
data: impl Into<Vec<u8>>,
) -> ImageProxy
pub fn upload_image( &mut self, width: u32, height: u32, format: ImageFormat, data: impl Into<Vec<u8>>, ) -> ImageProxy
Commands to upload the given data to a new image with the given dimensions and format.
Returns an ImageProxy to the buffer.
pub fn write_image( &mut self, proxy: ImageProxy, x: u32, y: u32, image: ImageData, )
pub fn dispatch<R>( &mut self, shader: ShaderId, wg_size: (u32, u32, u32), resources: R, )
pub fn dispatch_indirect<R>(
&mut self,
shader: ShaderId,
buf: BufferProxy,
offset: u64,
resources: R,
)
pub fn dispatch_indirect<R>( &mut self, shader: ShaderId, buf: BufferProxy, offset: u64, resources: R, )
Do an indirect dispatch.
Dispatch a compute shader where the size is determined dynamically.
The buf argument contains the dispatch size, 3 u32 values beginning
at the given byte offset.
pub fn download(&mut self, buf: BufferProxy)
pub fn download(&mut self, buf: BufferProxy)
Prepare a buffer for downloading.
Currently this copies to a download buffer. The original buffer can be freed immediately after.
pub fn clear_all(&mut self, buf: BufferProxy)
pub fn clear_all(&mut self, buf: BufferProxy)
Commands to clear the whole buffer.
pub fn free_buffer(&mut self, buf: BufferProxy)
pub fn free_buffer(&mut self, buf: BufferProxy)
Commands to free the given buffer.
pub fn free_image(&mut self, image: ImageProxy)
pub fn free_image(&mut self, image: ImageProxy)
Commands to free the given image.
pub fn free_resource(&mut self, resource: ResourceProxy)
pub fn free_resource(&mut self, resource: ResourceProxy)
Commands to free the given resource.
pub fn into_commands(self) -> Vec<Command>
pub fn into_commands(self) -> Vec<Command>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Recording
impl !RefUnwindSafe for Recording
impl Send for Recording
impl Sync for Recording
impl Unpin for Recording
impl UnsafeUnpin for Recording
impl !UnwindSafe for Recording
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more