[−][src]Function amethyst_rendy::util::ensure_buffer
pub fn ensure_buffer<B: Backend>(
factory: &Factory<B>,
buffer: &mut Option<Escape<Buffer<B>>>,
usage: Usage,
memory_usage: impl MemoryUsage,
min_size: u64
) -> Result<bool, Error>
This function is used extensively to ensure buffers are allocated and sized appropriately to their use. This function will either allocate a new buffer, resize the current buffer, or perform no action depending on the needs of the function call. This can be used for dynamic buffer allocation or single static buffer allocation.