Files
XCEngine/docs/api/rhi/opengl/sampler/unbind.md
2026-03-20 02:35:45 +08:00

27 lines
424 B
Markdown

# OpenGLSampler::Unbind
```cpp
void Unbind(unsigned int unit);
```
解绑采样器。将指定纹理单元的采样器绑定解除,实际调用 `glBindSampler(unit, 0)`
**参数:**
- `unit` - 纹理单元编号,通常为 0-15
**返回:**
**线程安全:**
**复杂度:** O(1)
**示例:**
```cpp
sampler.Unbind(0);
```
## 相关文档
- [OpenGLSampler 总览](sampler.md) - 返回类总览