Struct bgfx_rs::static_lib::DynamicIndexBuffer
source · pub struct DynamicIndexBuffer { /* private fields */ }
Implementations§
source§impl DynamicIndexBuffer
impl DynamicIndexBuffer
sourcepub fn create_dynamic_index_buffer(num: u32, flags: u16) -> DynamicIndexBuffer
pub fn create_dynamic_index_buffer(num: u32, flags: u16) -> DynamicIndexBuffer
num
: Number of indices.flags
: Buffer creation flags.- BufferFlags::NONE - No flags.
- BufferFlags::COMPUTE_READ - Buffer will be read from by compute shader.
- BufferFlags::COMPUTE_WRITE - Buffer will be written into by compute shader. When buffer is created with BufferFlags::COMPUTE_WRITE flag it cannot be updated from CPU.
- BufferFlags::COMPUTE_READ_WRITE - Buffer will be used for read/write by compute shader.
- BufferFlags::ALLOW_RESIZE - Buffer will resize on buffer update if a different amount of data is passed. If this flag is not specified, and more data is passed on update, the buffer will be trimmed to fit the existing buffer size. This flag has effect only on dynamic buffers.
- [BufferFlags::INDEX32] - Buffer is using 32-bit indices. This flag has effect only on index buffers.
sourcepub fn create_dynamic_index_buffer_mem(
mem: &Memory,
flags: u16
) -> DynamicIndexBuffer
pub fn create_dynamic_index_buffer_mem( mem: &Memory, flags: u16 ) -> DynamicIndexBuffer
mem
: Index buffer data.flags
: Buffer creation flags.- BufferFlags::NONE - No flags.
- BufferFlags::COMPUTE_READ - Buffer will be read from by compute shader.
- BufferFlags::COMPUTE_WRITE - Buffer will be written into by compute shader. When buffer is created with BufferFlags::COMPUTE_WRITE flag it cannot be updated from CPU.
- BufferFlags::COMPUTE_READ_WRITE - Buffer will be used for read/write by compute shader.
- BufferFlags::ALLOW_RESIZE - Buffer will resize on buffer update if a different amount of data is passed. If this flag is not specified, and more data is passed on update, the buffer will be trimmed to fit the existing buffer size. This flag has effect only on dynamic buffers.
- [BufferFlags::INDEX32] - Buffer is using 32-bit indices. This flag has effect only on index buffers.
sourcepub fn update_dynamic_index_buffer(&self, start_index: u32, mem: &Memory)
pub fn update_dynamic_index_buffer(&self, start_index: u32, mem: &Memory)
handle
: Dynamic index buffer handle.start_index
: Start index.mem
: Index buffer data.
sourcepub fn set_dynamic_index_buffer(&self, first_index: u32, num_indices: u32)
pub fn set_dynamic_index_buffer(&self, first_index: u32, num_indices: u32)
handle
: Dynamic index buffer.first_index
: First index to render.num_indices
: Number of indices to render.
Trait Implementations§
source§impl Clone for DynamicIndexBuffer
impl Clone for DynamicIndexBuffer
source§fn clone(&self) -> DynamicIndexBuffer
fn clone(&self) -> DynamicIndexBuffer
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DynamicIndexBuffer
impl Debug for DynamicIndexBuffer
Auto Trait Implementations§
impl Freeze for DynamicIndexBuffer
impl RefUnwindSafe for DynamicIndexBuffer
impl Send for DynamicIndexBuffer
impl Sync for DynamicIndexBuffer
impl Unpin for DynamicIndexBuffer
impl UnwindSafe for DynamicIndexBuffer
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
Mutably borrows from an owned value. Read more