Fluent builder for wgpu::Sampler. 更多...
#include <SamplerBuilder.h>
Public 成员函数 | |
| SamplerBuilder ()=default | |
| Defaults: clamp-to-edge, linear mag/min, no mip sampling, aniso 1. | |
| SamplerBuilder & | label (const char *l) |
| Label. | |
| SamplerBuilder & | address (wgpu::AddressMode u, wgpu::AddressMode v, wgpu::AddressMode w=wgpu::AddressMode::ClampToEdge) |
| Address. | |
| SamplerBuilder & | filter (wgpu::FilterMode mag, wgpu::FilterMode min) |
| Filter. | |
| SamplerBuilder & | mipmap (wgpu::MipmapFilterMode mip, float lodMin=0.f, float lodMax=1000.f) |
| Mipmap. | |
| SamplerBuilder & | compare (wgpu::CompareFunction cmp) |
| Compare. | |
| SamplerBuilder & | anisotropy (float maxAniso) |
| Anisotropy. | |
| wgpu::Sampler | build (const wgpu::Device &device) const |
| Create the sampler. Throws eve::graphics::Exception on null device. | |
静态 Public 成员函数 | |
| static SamplerBuilder | fromEngine (const eve::graphics::TextureSampler &s, uint32_t mipLevels, float maxDeviceAnisotropy) |
| Start from an engine TextureSampler (mirrors Graphics::makeSampler). | |
详细描述
Fluent builder for wgpu::Sampler.
The constructor already writes WebGPU-legal defaults (clamp-to-edge, linear, no mips, anisotropy 1), so a sampler is always valid without extra calls — this mirrors vk-bootstrap's "builder default is a valid value" principle and removes the hand-written WGPUSamplerDescriptor zero-init + reinterpret_cast that made default-mask bugs possible in Graphics.cpp.
在文件 SamplerBuilder.h 第 19 行定义.
构造及析构函数说明
◆ SamplerBuilder()
|
default |
Defaults: clamp-to-edge, linear mag/min, no mip sampling, aniso 1.
成员函数说明
◆ address()
|
inline |
◆ anisotropy()
|
inline |
Anisotropy.
在文件 SamplerBuilder.h 第 61 行定义.
◆ build()
| wgpu::Sampler eve::graphics::webgpu::SamplerBuilder::build | ( | const wgpu::Device & | device | ) | const |
Create the sampler. Throws eve::graphics::Exception on null device.
在文件 SamplerBuilder.cpp 第 33 行定义.
◆ compare()
|
inline |
Compare.
在文件 SamplerBuilder.h 第 55 行定义.
◆ filter()
|
inline |
◆ fromEngine()
|
static |
Start from an engine TextureSampler (mirrors Graphics::makeSampler).
在文件 SamplerBuilder.cpp 第 9 行定义.
引用了 b, eve::graphics::Disabled, eve::graphics::Nearest , 以及 s.
◆ label()
|
inline |
Label.
在文件 SamplerBuilder.h 第 29 行定义.
◆ mipmap()
|
inline |
Mipmap.
在文件 SamplerBuilder.h 第 48 行定义.
该类的文档由以下文件生成:
- src/modules/graphics/webgpu/SamplerBuilder.h
- src/modules/graphics/webgpu/SamplerBuilder.cpp