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,35 @@
# Shader::SetSourceCode
```cpp
void SetSourceCode(const Containers::String& source)
```
设置着色器源码。
**参数:**
- `source` - 着色器源码字符串
**返回:**
**线程安全:** ❌ 非线程安全
**复杂度:** O(n) - 复制源码字符串
**示例:**
```cpp
Shader vs;
vs.SetShaderType(ShaderType::Vertex);
vs.SetShaderLanguage(ShaderLanguage::GLSL);
vs.SetSourceCode(R"(
#version 450
layout(location = 0) in vec3 aPosition;
void main() {
gl_Position = vec4(aPosition, 1.0);
}
)");
```
## 相关文档
- [Shader 总览](shader.md) - 返回类总览