Struct voodoo::DeviceMemory [] [src]

pub struct DeviceMemory { /* fields omitted */ }

Methods

impl DeviceMemory
[src]

[src]

Returns a new DeviceMemoryBuilder.

[src]

[src]

Maps a region of this memory object to a pointer.

Use ::unmap_ptr to unmap this memory.

The flags argument is reserved for future use and is ignored.

[src]

Unmaps memory.

Do not use this unless memory was mapped using ::map_to_ptr.

Use ::unmap to unmap memory mapped by ::map.

[src]

Maps a region of memory and returns a mutable reference to it.

Use ::unmap to unmap.

Use ::copy_from_slice on the returned slice to easily copy data into the mapped memory.

Example

let mut mem = self.uniform_buffer_memory.map(0, ubo_bytes, 0)?;
mem.copy_from_slice(&[ubo]);
self.uniform_buffer_memory.unmap(mem);

Note/Reminder: The above example uses a dedicated buffer and memory allocation for demonstration purposes. It is best practice to allocate all memory from one large buffer and use offsets to specify particular parts.

The flags argument is reserved for future use and is ignored.

[src]

Unmaps memory.

[src]

Returns this object's handle.

[src]

Returns a reference to the associated device.

Trait Implementations

impl Debug for DeviceMemory
[src]

[src]

Formats the value using the given formatter.

impl Clone for DeviceMemory
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'h> Handle for &'h DeviceMemory
[src]

[src]