sim_engine/renderer/
mesh3d_texture_options.rs1use super::*;
2
3#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
5pub struct Texture3dOptions {
6 mipmaps: TextureMipmaps3d,
7 preserve_alpha: bool,
8}
9impl Texture3dOptions {
10 pub const fn new() -> Self {
12 Self {
13 mipmaps: TextureMipmaps3d::None,
14 preserve_alpha: false,
15 }
16 }
17 pub const fn with_mipmaps(mut self, mipmaps: TextureMipmaps3d) -> Self {
19 self.mipmaps = mipmaps;
20 self
21 }
22 pub const fn with_alpha_preservation(mut self, preserve: bool) -> Self {
24 self.preserve_alpha = preserve;
25 self
26 }
27 pub const fn mipmaps(self) -> TextureMipmaps3d {
29 self.mipmaps
30 }
31 pub const fn preserves_alpha(self) -> bool {
33 self.preserve_alpha
34 }
35}