pub struct BufferIndexAccessor<'a, R: Renderable + ?Sized> {
pub data: &'a BufferData<'a, R>,
pub number_indices: u32,
pub ele_type: BufferElementType,
pub byte_offset: u32,
/* private fields */
}
Expand description
A subset of a BufferData
, used for vertex attributes;
hence for use in a vertex attribute pointer.
A BufferIndexAccessor
is used for a single attribute of a set of data, such as
Position or Normal.
Fields§
§data: &'a BufferData<'a, R>
The BufferData
that contains the actual index data
number_indices: u32
Number of indices in the buffer
ele_type: BufferElementType
The type of each element
For indices this must be UInt8, UInt16 or UInt32
byte_offset: u32
Offset from start of buffer to first byte of data
Implementations§
Source§impl<'a, R: Renderable> BufferIndexAccessor<'a, R>
impl<'a, R: Renderable> BufferIndexAccessor<'a, R>
Sourcepub fn new(
data: &'a BufferData<'a, R>,
number_indices: u32,
ele_type: BufferElementType,
byte_offset: u32,
) -> Self
pub fn new( data: &'a BufferData<'a, R>, number_indices: u32, ele_type: BufferElementType, byte_offset: u32, ) -> Self
Create a new index accessor of a BufferData
Sourcepub fn create_client(&self, renderable: &mut R)
pub fn create_client(&self, renderable: &mut R)
Create the render buffer required by the BufferIndexAccessor
Sourcepub fn borrow_client(&self) -> Ref<'_, R::IndexAccessor>
pub fn borrow_client(&self) -> Ref<'_, R::IndexAccessor>
Borrow the client
Trait Implementations§
Source§impl<'a, R> Debug for BufferIndexAccessor<'a, R>where
R: Renderable,
impl<'a, R> Debug for BufferIndexAccessor<'a, R>where
R: Renderable,
Source§impl<'a, R: Renderable> Display for BufferIndexAccessor<'a, R>
impl<'a, R: Renderable> Display for BufferIndexAccessor<'a, R>
impl<'a, R: Renderable> DefaultIndentedDisplay for BufferIndexAccessor<'a, R>
Auto Trait Implementations§
impl<'a, R> !Freeze for BufferIndexAccessor<'a, R>
impl<'a, R> !RefUnwindSafe for BufferIndexAccessor<'a, R>
impl<'a, R> !Send for BufferIndexAccessor<'a, R>
impl<'a, R> !Sync for BufferIndexAccessor<'a, R>
impl<'a, R> Unpin for BufferIndexAccessor<'a, R>
impl<'a, R> !UnwindSafe for BufferIndexAccessor<'a, R>
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