Skip to main content

pebble/wgpu/
textures.rs

1pub struct TextureSpec {
2    pub file: Option<&'static str>,
3    pub width: u32,
4    pub height: u32,
5    pub format: wgpu::TextureFormat,
6    pub data: Option<Vec<u8>>,
7    pub generate_mips: bool,
8}
9
10impl TextureSpec {
11    pub fn with_format(mut self, format: wgpu::TextureFormat) -> Self {
12        self.format = format;
13        self
14    }
15}