docs: update resources API docs
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
# ShaderLoader::GetSupportedExtensions
|
||||
|
||||
## 方法签名
|
||||
|
||||
```cpp
|
||||
Containers::Array<Containers::String> GetSupportedExtensions() const override;
|
||||
```
|
||||
|
||||
## 详细描述
|
||||
|
||||
返回此加载器支持的文件扩展名列表。支持以下格式:
|
||||
|
||||
| 扩展名 | 描述 |
|
||||
|--------|------|
|
||||
| `.vert` | 顶点着色器 (Vertex Shader) |
|
||||
| `.frag` | 片段着色器 (Fragment/Pixel Shader) |
|
||||
| `.geom` | 几何着色器 (Geometry Shader) |
|
||||
| `.comp` | 计算着色器 (Compute Shader) |
|
||||
| `.glsl` | 通用 GLSL 着色器 |
|
||||
| `.hlsl` | HLSL 着色器 |
|
||||
| `.shader` | 通用着色器文件 |
|
||||
|
||||
## 参数
|
||||
|
||||
无
|
||||
|
||||
## 返回值
|
||||
|
||||
`Containers::Array<Containers::String>` - 支持的文件扩展名数组
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
#include "Resources/ShaderLoader.h"
|
||||
|
||||
using namespace XCEngine::Resources;
|
||||
|
||||
ShaderLoader loader;
|
||||
auto extensions = loader.GetSupportedExtensions();
|
||||
|
||||
for (const auto& ext : extensions) {
|
||||
printf("Supported extension: %s\n", ext.CStr());
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user