docs: 重构 API 文档结构并修正源码准确性
- 重组文档目录结构: 每个模块的概述页移动到模块子目录
- 重命名 index.md 为 main.md
- 修正所有模块文档中的错误:
- math: FromEuler→FromEulerAngles, TransformDirection 包含缩放, Box 是 OBB, Color::ToRGBA 格式
- containers: 新增 operator==/!= 文档, 补充 std::hash DJB 算法细节
- core: 修复 types 链接错误
- debug: LogLevelToString 返回大写, timestamp 是秒, Profiler 空实现标注, Windows API vs ANSI
- memory: 修复头文件路径, malloc vs operator new, 新增方法文档
- resources: 修复 Shader/Texture 链接错误
- threading: TaskSystem::Wait 空实现标注, ReadWriteLock 重入描述, LambdaTask 链接
- 验证: fix_links.py 确认 0 个断裂引用
2026-03-19 00:22:30 +08:00
|
|
|
# OpenGLShader
|
|
|
|
|
|
|
|
|
|
**命名空间**: `XCEngine::RHI`
|
|
|
|
|
|
|
|
|
|
**描述**: OpenGL 着色器实现,继承自 `RHIShader`。
|
|
|
|
|
|
2026-03-19 02:01:18 +08:00
|
|
|
## 公共方法
|
docs: 重构 API 文档结构并修正源码准确性
- 重组文档目录结构: 每个模块的概述页移动到模块子目录
- 重命名 index.md 为 main.md
- 修正所有模块文档中的错误:
- math: FromEuler→FromEulerAngles, TransformDirection 包含缩放, Box 是 OBB, Color::ToRGBA 格式
- containers: 新增 operator==/!= 文档, 补充 std::hash DJB 算法细节
- core: 修复 types 链接错误
- debug: LogLevelToString 返回大写, timestamp 是秒, Profiler 空实现标注, Windows API vs ANSI
- memory: 修复头文件路径, malloc vs operator new, 新增方法文档
- resources: 修复 Shader/Texture 链接错误
- threading: TaskSystem::Wait 空实现标注, ReadWriteLock 重入描述, LambdaTask 链接
- 验证: fix_links.py 确认 0 个断裂引用
2026-03-19 00:22:30 +08:00
|
|
|
|
2026-03-19 02:01:18 +08:00
|
|
|
| 方法 | 描述 |
|
docs: 重构 API 文档结构并修正源码准确性
- 重组文档目录结构: 每个模块的概述页移动到模块子目录
- 重命名 index.md 为 main.md
- 修正所有模块文档中的错误:
- math: FromEuler→FromEulerAngles, TransformDirection 包含缩放, Box 是 OBB, Color::ToRGBA 格式
- containers: 新增 operator==/!= 文档, 补充 std::hash DJB 算法细节
- core: 修复 types 链接错误
- debug: LogLevelToString 返回大写, timestamp 是秒, Profiler 空实现标注, Windows API vs ANSI
- memory: 修复头文件路径, malloc vs operator new, 新增方法文档
- resources: 修复 Shader/Texture 链接错误
- threading: TaskSystem::Wait 空实现标注, ReadWriteLock 重入描述, LambdaTask 链接
- 验证: fix_links.py 确认 0 个断裂引用
2026-03-19 00:22:30 +08:00
|
|
|
|------|------|
|
2026-03-20 02:35:45 +08:00
|
|
|
| [`CompileFromFile`](compile-from-file-vs-fs.md) | 从文件编译顶点+片段着色器 |
|
|
|
|
|
| [`Compile`](compile-vs-fs.md) | 从源码编译顶点+片段着色器 |
|
|
|
|
|
| [`Compile`](compile-type.md) | 从源码编译单着色器 |
|
|
|
|
|
| [`CompileCompute`](compile-compute.md) | 编译计算着色器 |
|
|
|
|
|
| [`Shutdown`](../../shader/shutdown.md) | 关闭着色器 |
|
2026-03-19 02:01:18 +08:00
|
|
|
| [`Use`](use.md) | 使用着色器 |
|
|
|
|
|
| [`Bind`](../../shader/bind.md) | 绑定着色器 |
|
|
|
|
|
| [`Unbind`](../../shader/unbind.md) | 解绑着色器 |
|
|
|
|
|
| [`SetInt`](../../shader/set-int.md) | 设置整数 uniform |
|
|
|
|
|
| [`SetIntArray`](set-int-array.md) | 设置整数数组 uniform |
|
|
|
|
|
| [`SetFloat`](../../shader/set-float.md) | 设置浮点数 uniform |
|
|
|
|
|
| [`SetFloatArray`](set-float-array.md) | 设置浮点数数组 uniform |
|
|
|
|
|
| [`SetVec3`](../../shader/set-vec3.md) | 设置 vec3 uniform |
|
|
|
|
|
| [`SetVec4`](../../shader/set-vec4.md) | 设置 vec4 uniform |
|
|
|
|
|
| [`SetMat4`](../../shader/set-mat4.md) | 设置 mat4 uniform |
|
|
|
|
|
| [`GetUniformLocation`](get-uniform-location.md) | 获取 uniform 位置 |
|
|
|
|
|
| [`GetID`](get-id.md) | 获取着色器 ID |
|
|
|
|
|
| [`GetNativeHandle`](../../buffer/get-native-handle.md) | 获取原生句柄 |
|
|
|
|
|
| [`IsValid`](../../shader/is-valid.md) | 检查是否有效 |
|
2026-03-20 02:35:45 +08:00
|
|
|
| [`GetType`](../../shader/get-type.md) | 获取着色器类型 |
|
docs: 重构 API 文档结构并修正源码准确性
- 重组文档目录结构: 每个模块的概述页移动到模块子目录
- 重命名 index.md 为 main.md
- 修正所有模块文档中的错误:
- math: FromEuler→FromEulerAngles, TransformDirection 包含缩放, Box 是 OBB, Color::ToRGBA 格式
- containers: 新增 operator==/!= 文档, 补充 std::hash DJB 算法细节
- core: 修复 types 链接错误
- debug: LogLevelToString 返回大写, timestamp 是秒, Profiler 空实现标注, Windows API vs ANSI
- memory: 修复头文件路径, malloc vs operator new, 新增方法文档
- resources: 修复 Shader/Texture 链接错误
- threading: TaskSystem::Wait 空实现标注, ReadWriteLock 重入描述, LambdaTask 链接
- 验证: fix_links.py 确认 0 个断裂引用
2026-03-19 00:22:30 +08:00
|
|
|
|
|
|
|
|
## 相关文档
|
|
|
|
|
|
|
|
|
|
- [OpenGL 后端总览](../overview.md)
|
|
|
|
|
- [RHIShader](../../shader/shader.md) - 抽象着色器接口
|