Yes the shader is active, all the other uniforms were working correctly. Is it possible that if I had several unused uniforms declared and was trying to glUniform* them, that it could have bad side effects?
uniform int x;
uniform int indices[4];
uniform float y;
void main()
{
vec4 outColor = vec4(1,1,1,1);
if (indices[0] == 0)
{
outColor.r = 0;
}
if (indices[1] == 0)
{
outColor.g = 0;
}
if (indices[2] == 0)
{
outColor.b = 0;
}
if (indices[3] == 0)
{
outColor.a = 0;
}
displayColor = outColor;
}
because I never used “x” or “y” they get optimized out, but how could that effect “indices”? Oh well, I got around the problem by just not using an array for now. I’ll revisit this later when I’ve developed a bit more.
*note this was just typing off the top of my head not actually the code I had implemented.
Doesn’t CodeXL have some OpenGL logging functionality, like glIntercept? Either way, could you generate a file that the relevant section of OpenGL calls (after all your context creation stuff)?