Struct vulkano::command_buffer::commands_raw::CmdUpdateBuffer
[−]
[src]
pub struct CmdUpdateBuffer<B, D> { /* fields omitted */ }
Command that sets the content of a buffer to some data.
Methods
impl<B, D> CmdUpdateBuffer<B, D>
[src]
fn new<P>(
buffer: P,
data: D
) -> Result<CmdUpdateBuffer<B, D>, CmdUpdateBufferError> where
P: Buffer<Access = B> + TypedBuffer<Content = D>,
B: BufferAccess,
D: 'static,
buffer: P,
data: D
) -> Result<CmdUpdateBuffer<B, D>, CmdUpdateBufferError> where
P: Buffer<Access = B> + TypedBuffer<Content = D>,
B: BufferAccess,
D: 'static,
Builds a command that writes data to a buffer.
If the size of the data and the size of the buffer mismatch, then only the intersection of both will be written.
The size of the modification must not exceed 65536 bytes. The offset and size must be multiples of four.
fn from_access(
buffer: B,
data: D
) -> Result<CmdUpdateBuffer<B, D>, CmdUpdateBufferError> where
B: BufferAccess + TypedBufferAccess<Content = D>,
D: 'static,
buffer: B,
data: D
) -> Result<CmdUpdateBuffer<B, D>, CmdUpdateBufferError> where
B: BufferAccess + TypedBufferAccess<Content = D>,
D: 'static,
Same as new
, except that the parameter is a BufferAccess
instead of a Buffer
.
unsafe fn unchecked_type(
buffer: B,
data: D
) -> Result<CmdUpdateBuffer<B, D>, CmdUpdateBufferError> where
B: BufferAccess,
buffer: B,
data: D
) -> Result<CmdUpdateBuffer<B, D>, CmdUpdateBufferError> where
B: BufferAccess,
Same as from_access
, except that type safety is not enforced.
fn buffer(&self) -> &B
Returns the buffer that is going to be written.
Trait Implementations
impl<B, D> DeviceOwned for CmdUpdateBuffer<B, D> where
B: DeviceOwned,
[src]
B: DeviceOwned,