Struct draw2d::graphics::vulkan::buffer::StaticBuffer [−][src]
pub struct StaticBuffer { /* fields omitted */ }
Expand description
A static chunk of real GPU memory. Each instance is backed by a GPU allocation.
Implementations
pub fn empty(
device: Arc<Device>,
usage: BufferUsageFlags,
properties: MemoryPropertyFlags
) -> Result<Self>
pub fn empty(
device: Arc<Device>,
usage: BufferUsageFlags,
properties: MemoryPropertyFlags
) -> Result<Self>
Create a new buffer with no memory allocated.
Allocates another buffer with the same properties as the current buffer.
pub fn create(
device: Arc<Device>,
usage: BufferUsageFlags,
properties: MemoryPropertyFlags,
size: u64
) -> Result<Self>
pub fn create(
device: Arc<Device>,
usage: BufferUsageFlags,
properties: MemoryPropertyFlags,
size: u64
) -> Result<Self>
Create a new buffer with the specified size.
Trait Implementations
The device memory handle. Valid for the lifetime of this buffer.
The size, in bytes, of the allocated device memory.
Auto Trait Implementations
impl RefUnwindSafe for StaticBuffer
impl !Send for StaticBuffer
impl !Sync for StaticBuffer
impl Unpin for StaticBuffer
impl UnwindSafe for StaticBuffer
Blanket Implementations
Mutably borrows from an owned value. Read more
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
Checks if self
is actually part of its subset T
(and can be converted to it).
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
The inclusion map: converts self
to the equivalent element of its superset.