docs: update resources API docs

This commit is contained in:
2026-03-20 02:35:35 +08:00
parent fd792b7df1
commit ea756c0177
314 changed files with 9439 additions and 1360 deletions

View File

@@ -0,0 +1,27 @@
# ShaderLoader::CanLoad
## 方法签名
```cpp
bool CanLoad(const Containers::String& path) const override;
```
## 详细描述
检查给定路径的文件是否可以被该加载器加载。通过提取文件扩展名并与支持列表进行比较来判断。
## 参数
- `path` - 资源文件的完整或相对路径
## 返回值
`bool` - 如果文件扩展名在支持列表中返回 `true`,否则返回 `false`
## 示例
```cpp
ShaderLoader loader;
bool canLoad = loader.CanLoad("shaders/pbr.vert"); // true
bool canLoad2 = loader.CanLoad("textures/wood.png"); // false
```