-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtextures.mbt
More file actions
127 lines (96 loc) · 3.73 KB
/
textures.mbt
File metadata and controls
127 lines (96 loc) · 3.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
// Texture-related constants and non-method utilities
// ============================================================================
// Texture filter constants
// ============================================================================
///|
/// Texture filter: no filter, just pixel approximation.
pub const TextureFilterPoint : Int = 0
///|
/// Texture filter: linear filtering.
pub const TextureFilterBilinear : Int = 1
///|
/// Texture filter: trilinear filtering (linear with mipmaps).
pub const TextureFilterTrilinear : Int = 2
///|
/// Texture filter: anisotropic filtering 4x.
pub const TextureFilterAnisotropic4x : Int = 3
///|
/// Texture filter: anisotropic filtering 8x.
pub const TextureFilterAnisotropic8x : Int = 4
///|
/// Texture filter: anisotropic filtering 16x.
pub const TextureFilterAnisotropic16x : Int = 5
// ============================================================================
// Texture wrap constants
// ============================================================================
///|
/// Texture wrap: repeats texture in tiled mode.
pub const TextureWrapRepeat : Int = 0
///|
/// Texture wrap: clamps texture to edge pixel in tiled mode.
pub const TextureWrapClamp : Int = 1
///|
/// Texture wrap: mirrors and repeats the texture in tiled mode.
pub const TextureWrapMirrorRepeat : Int = 2
///|
/// Texture wrap: mirrors and clamps to border the texture in tiled mode.
pub const TextureWrapMirrorClamp : Int = 3
// ============================================================================
// Pixel format constants
// ============================================================================
///|
/// Pixel format: 8 bit per pixel (no alpha).
pub const PixelformatUncompressedGrayscale : Int = 1
///|
/// Pixel format: 8*2 bpp (2 channels).
pub const PixelformatUncompressedGrayAlpha : Int = 2
///|
/// Pixel format: 16 bpp.
pub const PixelformatUncompressedR5g6b5 : Int = 3
///|
/// Pixel format: 24 bpp.
pub const PixelformatUncompressedR8g8b8 : Int = 4
///|
/// Pixel format: 16 bpp (1 bit alpha).
pub const PixelformatUncompressedR5g5b5a1 : Int = 5
///|
/// Pixel format: 16 bpp (4 bit alpha).
pub const PixelformatUncompressedR4g4b4a4 : Int = 6
///|
/// Pixel format: 32 bpp.
pub const PixelformatUncompressedR8g8b8a8 : Int = 7
///|
/// Pixel format: 32 bpp (1 channel - float).
pub const PixelformatUncompressedR32 : Int = 8
///|
/// Pixel format: 32*3 bpp (3 channels - float).
pub const PixelformatUncompressedR32g32b32 : Int = 9
///|
/// Pixel format: 32*4 bpp (4 channels - float).
pub const PixelformatUncompressedR32g32b32a32 : Int = 10
// ============================================================================
// Texture management extras (non-method utilities)
// ============================================================================
///|
/// Get texture source rectangle that is used for shapes drawing.
pub fn get_shapes_texture_rectangle() -> Rectangle {
Rectangle::from_bytes(@ffi.get_shapes_texture_rectangle())
}
// ============================================================================
// Cubemap layout constants
// ============================================================================
///|
/// Cubemap layout: automatically detect layout type.
pub const CubemapLayoutAutoDetect : Int = 0
///|
/// Cubemap layout: layout is defined by a vertical line with faces.
pub const CubemapLayoutLineVertical : Int = 1
///|
/// Cubemap layout: layout is defined by a horizontal line with faces.
pub const CubemapLayoutLineHorizontal : Int = 2
///|
/// Cubemap layout: layout is defined by a 3x4 cross with cubemap faces.
pub const CubemapLayoutCrossThreeByFour : Int = 3
///|
/// Cubemap layout: layout is defined by a 4x3 cross with cubemap faces.
pub const CubemapLayoutCrossFourByThree : Int = 4