1.5 KiB
1.5 KiB
OpenGLShader::CompileFromFile
公开方法,详见头文件声明。
该方法在 XCEngine/RHI/OpenGL/OpenGLShader.h 中提供了 3 个重载,当前页面统一汇总这些公开声明。
重载 1: 声明
bool CompileFromFile(const wchar_t* filePath, const char* entryPoint, const char* target) override;
参数:
filePath- 参数语义详见头文件声明。entryPoint- 参数语义详见头文件声明。target- 参数语义详见头文件声明。
返回: bool - 返回值语义详见头文件声明。
重载 2: 声明
bool CompileFromFile(const char* vertexPath, const char* fragmentPath);
参数:
vertexPath- 参数语义详见头文件声明。fragmentPath- 参数语义详见头文件声明。
返回: bool - 返回值语义详见头文件声明。
重载 3: 声明
bool CompileFromFile(const char* vertexPath, const char* fragmentPath, const char* geometryPath);
参数:
vertexPath- 参数语义详见头文件声明。fragmentPath- 参数语义详见头文件声明。geometryPath- 参数语义详见头文件声明。
返回: bool - 返回值语义详见头文件声明。
示例:
#include <XCEngine/RHI/OpenGL/OpenGLShader.h>
void Example() {
XCEngine::RHI::OpenGLShader object;
// 根据上下文补齐参数后调用 OpenGLShader::CompileFromFile(...)。
(void)object;
}