Update API documentation and remove obsolete plan files

This commit is contained in:
2026-03-21 15:55:04 +08:00
parent 7a6cd412c8
commit 629455df07
75 changed files with 1075 additions and 1816 deletions

View File

@@ -0,0 +1,35 @@
# OpenGLShader::SetVec3
设置三维向量 uniform 变量(数组重载版本)。
```cpp
void SetVec3(const char* name, const float* values);
```
通过名称查找并设置着色器中的三维向量 uniform 变量,使用浮点数数组作为输入。
**参数:**
- `name` - uniform 变量名称
- `values` - 指向 3 个 float 元素的数组指针
**返回:**
**线程安全:** ❌(需要在渲染线程调用)
**示例:**
```cpp
// 设置光照方向
float lightDir[3] = { 0.5f, 1.0f, 0.3f };
shader->SetVec3("u_lightDir", lightDir);
// 设置法线
float normal[3] = { 0.0f, 1.0f, 0.0f };
shader->SetVec3("u_normal", normal);
```
## 相关文档
- [OpenGLShader 总览](shader.md) - 返回类总览
- [SetVec3 (xyz)](../../shader/set-vec3.md) - xyz分量版本
- [SetVec4 (float*)](set-vec4-array.md) - 四维向量数组版本