64,637
社区成员
发帖
与我相关
我的任务
分享
#ifndef GLSLPROGRAM_HPP_
#define GLSLPROGRAM_HPP_
static const char svShaderHightLight[]={};
#endif
const char svShaderHightLight[] =
"precision mediump float;\n"
"varying mediump vec2 texcoord; \n"
"void main() \n"
"{ \n"
" texcoord = gl_MultiTexCoord0.st;\n"
" gl_Position = ftransform(); \n"
"} \n";
// 在源文件中定义
const char svShaderHightLight[] =
"precision mediump float;\n"
"varying mediump vec2 texcoord;\n"
"void main()\n"
"{\n"
" texcoord = gl_MultiTexCoord0.st;\n"
" gl_Position = ftransform();\n"
"}\n";
// 在头文件中声明
extern const char svShaderHightLight[];
然后包含头文件,直接使用 svShaderHightLight 即可。