Files
XCEngine/docs/api/XCEngine/RHI/OpenGL/OpenGLTextureUnitAllocator/Free.md

21 lines
383 B
Markdown
Raw Normal View History

2026-03-26 16:45:24 +08:00
# OpenGLTextureUnitAllocator::Free
```cpp
void Free(int32_t unit);
```
## 作用
2026-03-26 16:45:24 +08:00
释放一个先前分配的纹理单元。
2026-03-26 16:45:24 +08:00
## 当前实现行为
2026-03-26 16:45:24 +08:00
- 非法 `unit` 直接返回。
- 调用 [UnbindTexture](UnbindTexture.md) 清空该单元上的纹理绑定缓存。
-`m_allocated[unit]` 设为 `false`
2026-03-26 16:45:24 +08:00
## 相关文档
- [Allocate](Allocate.md)
- [Shutdown](Shutdown.md)