Struct bgfx_rs::static_lib::IndexBuffer
source · pub struct IndexBuffer { /* private fields */ }
Implementations§
source§impl IndexBuffer
impl IndexBuffer
sourcepub fn create_index_buffer(mem: &Memory, flags: u16) -> IndexBuffer
pub fn create_index_buffer(mem: &Memory, flags: u16) -> IndexBuffer
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 set_name(&self, name: &str)
pub fn set_name(&self, name: &str)
handle
: Static index buffer handle.name
: Static index buffer name.len
: Static index buffer name length (if length is INT32_MAX, it’s expected that _name is zero terminated string.
sourcepub fn set_index_buffer(&self, first_index: u32, num_indices: u32)
pub fn set_index_buffer(&self, first_index: u32, num_indices: u32)
handle
: Index buffer.first_index
: First index to render.num_indices
: Number of indices to render.
Trait Implementations§
source§impl Clone for IndexBuffer
impl Clone for IndexBuffer
source§fn clone(&self) -> IndexBuffer
fn clone(&self) -> IndexBuffer
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 IndexBuffer
impl Debug for IndexBuffer
Auto Trait Implementations§
impl Freeze for IndexBuffer
impl RefUnwindSafe for IndexBuffer
impl Send for IndexBuffer
impl Sync for IndexBuffer
impl Unpin for IndexBuffer
impl UnwindSafe for IndexBuffer
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