- Fix link resolution with proper relative/absolute path handling - Improve link styling with underline decoration - Hide leaf nodes from tree, only show directories - Fix log file path for packaged app
27 lines
733 B
Markdown
27 lines
733 B
Markdown
# OpenGLShader::CompileFromFile (VS+GS+FS)
|
|
|
|
```cpp
|
|
bool CompileFromFile(const char* vertexPath, const char* fragmentPath, const char* geometryPath);
|
|
```
|
|
|
|
从文件编译顶点着色器、几何着色器和片段着色器。
|
|
|
|
**参数:**
|
|
- `vertexPath` - 顶点着色器文件路径
|
|
- `fragmentPath` - 片段着色器文件路径
|
|
- `geometryPath` - 几何着色器文件路径
|
|
|
|
**返回:** 成功返回 `true`,失败返回 `false`
|
|
|
|
**示例:**
|
|
|
|
```cpp
|
|
shader->CompileFromFile("shaders/vertex.glsl", "shaders/fragment.glsl", "shaders/geometry.glsl");
|
|
shader->Use();
|
|
```
|
|
|
|
## 相关文档
|
|
|
|
- [OpenGLShader 总览](shader.md) - 返回类总览
|
|
- [CompileFromFile (VS+FS)](compile-from-file-vs-fs.md) - 不带几何着色器版本
|