Code: Select all
ERROR: 0:22: Regular non-array variable 'FragColor' may not be redeclared
Code: Select all
#version 130
precision highp int;
precision highp float;
uniform sampler2D sampleTexture;
in vec4 outUV0;
in vec4 outColor;
out vec4 FragColor;
// Texturing fragment program for GLSL
void main()
{
FragColor = outColor * texture(sampleTexture, outUV0.xy);
}
Code: Select all
if(shouldUpgradeToVersion150)
{
if(belowVersionPos != 0)
mSource = mSource.erase(0, belowVersionPos); // drop old definition
// automatically upgrade to glsl150. thank you apple.
const char* prefixFp =
"#version 150\n"
"#define varying in\n"
"#define texture1D texture\n"
"#define texture2D texture\n"
"#define texture3D texture\n"
"#define textureCube texture\n"
"#define texture2DLod textureLod\n"
"#define texture2DProj textureProj\n"
"#define textureCubeLod textureLod\n"
"#define shadow2DProj textureProj\n"
"#define gl_FragColor FragColor\n"
"out vec4 FragColor;\n";
I can create pull request if suggested change is ok.