Files
XCEngine/docs/api/rhi/opengl/sampler/unbind.md

27 lines
424 B
Markdown
Raw Normal View History

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