Files
XCSDD/docs/api/rhi/opengl/shader/compile-from-file-vs-fs.md
ssdfasd 58a83f445a fix: improve doc link navigation and tree display
- 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
2026-03-19 12:44:08 +08:00

617 B

OpenGLShader::CompileFromFile (VS+FS)

bool CompileFromFile(const char* vertexPath, const char* fragmentPath);

从文件编译顶点着色器和片段着色器。

参数:

  • vertexPath - 顶点着色器文件路径
  • fragmentPath - 片段着色器文件路径

返回: 成功返回 true,失败返回 false

示例:

shader->CompileFromFile("shaders/vertex.glsl", "shaders/fragment.glsl");
shader->Use();

相关文档