easygpu 0.0.9

Simple wrapper around wgpu aiming to make some common operations easier
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#[derive(Debug)]
pub struct IndexBuffer {
    pub wgpu: wgpu::Buffer,
    pub elements: u32,
}

impl IndexBuffer {
    pub fn slice(&self) -> wgpu::BufferSlice {
        self.wgpu
            .slice(0..(self.elements as usize * std::mem::size_of::<u16>()) as u64)
    }
}