Skip to main content

source_vtf/
flags.rs

1use bitflags::bitflags;
2
3bitflags! {
4    /// Flags stored in the VTF header.
5    ///
6    /// Several bits were reassigned by later Source branches. Version-qualified
7    /// aliases make those collisions explicit instead of pretending that one
8    /// interpretation is universally correct.
9    #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
10    #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
11    pub struct TextureFlags: u32 {
12        const POINT_SAMPLE = 1 << 0;
13        const TRILINEAR = 1 << 1;
14        const CLAMP_S = 1 << 2;
15        const CLAMP_T = 1 << 3;
16        const ANISOTROPIC = 1 << 4;
17        const VTEX_HINT_DXT5 = 1 << 5;
18        const VTEX_NO_COMPRESS_V7_0 = 1 << 6;
19        const SRGB_V7_4 = 1 << 6;
20        const PWL_CORRECTED_V7_5 = 1 << 6;
21        const NORMAL = 1 << 7;
22        const NO_MIP = 1 << 8;
23        const NO_LOD = 1 << 9;
24        const LOAD_SMALL_MIPS_V7_0 = 1 << 10;
25        const LOAD_ALL_MIPS_V7_3 = 1 << 10;
26        const PROCEDURAL = 1 << 11;
27        const ONE_BIT_ALPHA = 1 << 12;
28        const MULTI_BIT_ALPHA = 1 << 13;
29        const ENVMAP = 1 << 14;
30        const RENDER_TARGET = 1 << 15;
31        const DEPTH_RENDER_TARGET = 1 << 16;
32        const NO_DEBUG_OVERRIDE = 1 << 17;
33        const SINGLE_COPY = 1 << 18;
34        const VTEX_ONE_OVER_MIP_LEVEL_IN_ALPHA = 1 << 19;
35        const TF2_STAGING_MEMORY_V7_4 = 1 << 19;
36        const SRGB_V7_5 = 1 << 19;
37        const VTEX_PREMULTIPLY_COLOR_BY_ONE_OVER_MIP_LEVEL = 1 << 20;
38        const TF2_IMMEDIATE_CLEANUP_V7_4 = 1 << 20;
39        const DEFAULT_POOL_V7_5 = 1 << 20;
40        const VTEX_CONVERT_NORMAL_TO_DUDV = 1 << 21;
41        const TF2_IGNORE_PICMIP_V7_4 = 1 << 21;
42        const CSGO_COMBINED_V7_5 = 1 << 21;
43        const VTEX_ALPHA_TEST_MIP_GENERATION = 1 << 22;
44        const CSGO_ASYNC_DOWNLOAD_V7_5 = 1 << 22;
45        const NO_DEPTH_BUFFER = 1 << 23;
46        const VTEX_NICE_FILTERED = 1 << 24;
47        const CSGO_SKIP_INITIAL_DOWNLOAD_V7_5 = 1 << 24;
48        const CLAMP_U = 1 << 25;
49        const VERTEX_TEXTURE_V7_3 = 1 << 26;
50        const SSBUMP_V7_3 = 1 << 27;
51        const LOAD_MOST_MIPS_V7_5 = 1 << 28;
52        const BORDER = 1 << 29;
53        const TF2_STREAMABLE_COARSE_V7_4 = 1 << 30;
54        const CSGO_YCOCG_V7_5 = 1 << 30;
55        const TF2_STREAMABLE_FINE_V7_4 = 1 << 31;
56        const CSGO_ASYNC_SKIP_INITIAL_LOW_RES_V7_5 = 1 << 31;
57    }
58}