docs: update resources API docs
This commit is contained in:
26
docs/api/resources/material/release.md
Normal file
26
docs/api/resources/material/release.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Material::Release
|
||||
|
||||
**方法签名**:
|
||||
```cpp
|
||||
void Release() override
|
||||
```
|
||||
|
||||
**详细描述**: 释放材质的所有引用和资源。调用后着色器引用、属性映射、纹理绑定和常量缓冲区数据都将被清空,材质变为无效状态。
|
||||
|
||||
**参数**: 无
|
||||
|
||||
**返回值**: 无
|
||||
|
||||
**复杂度**: O(n),n 为属性和纹理绑定数量
|
||||
|
||||
**示例**:
|
||||
|
||||
```cpp
|
||||
mat->Release();
|
||||
// 调用后 mat->IsValid() 返回 false
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Material 总览](material.md) - 返回类总览
|
||||
- [IResource::Release](../iresource/iresource.md) - 资源基类接口
|
||||
Reference in New Issue
Block a user