fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling - Improve link styling with underline decoration - Hide leaf nodes from tree, only show directories - Fix log file path for packaged app
This commit is contained in:
34
docs/api/rhi/device/create-sampler.md
Normal file
34
docs/api/rhi/device/create-sampler.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# RHIDevice::CreateSampler
|
||||
|
||||
```cpp
|
||||
virtual RHISampler* CreateSampler(const SamplerDesc& desc) = 0;
|
||||
```
|
||||
|
||||
创建纹理采样器。
|
||||
|
||||
**参数:**
|
||||
- `desc` - 采样器描述符,包含过滤模式、寻址模式等
|
||||
|
||||
**返回:** 新创建的采样器指针,失败返回 `nullptr`
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
SamplerDesc samplerDesc;
|
||||
samplerDesc.filter = (uint32_t)FilterMode::Anisotropic;
|
||||
samplerDesc.addressU = (uint32_t)TextureAddressMode::Wrap;
|
||||
samplerDesc.addressV = (uint32_t)TextureAddressMode::Wrap;
|
||||
samplerDesc.addressW = (uint32_t)TextureAddressMode::Wrap;
|
||||
samplerDesc.maxAnisotropy = 16;
|
||||
samplerDesc.minLod = 0;
|
||||
samplerDesc.maxLod = FLT_MAX;
|
||||
|
||||
RHISampler* sampler = device->CreateSampler(samplerDesc);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [RHIDevice 总览](device.md) - 返回类总览
|
||||
- [RHISampler](../sampler/sampler.md) - 采样器类
|
||||
Reference in New Issue
Block a user