-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsampler.c3i
42 lines (32 loc) · 805 Bytes
/
sampler.c3i
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
module webgpu;
distinct Sampler = void*;
fn void Sampler.setLabel(Sampler sampler, ZString label) @extern("wgpuSamplerSetLabel");
fn void Sampler.reference(Sampler sampler) @extern("wgpuSamplerReference");
fn void Sampler.release(Sampler sampler) @extern("wgpuSamplerRelease");
struct SamplerDescriptor {
ChainedStruct* next;
ZString label;
AddressMode addressModeU;
AddressMode addressModeV;
AddressMode addressModeW;
FilterMode magFilter;
FilterMode minFilter;
MipmapFilterMode mipmapFilter;
float lodMinClamp;
float lodMaxClamp;
CompareFunction compare;
CUShort maxAnisotropy;
}
enum AddressMode {
REPEAT,
MIRROR_REPEAT,
CLAMP_TO_EDGE,
}
enum FilterMode {
NEAREST,
LINEAR
}
enum MipmapFilterMode {
NEAREST,
LINEAR
}