At the moment I have simple fragment shader which returns one color (red). If I want to change it a different RGBA color from C code, how should I be doing that?
Is it possible to change an attribute within the fragment shader from C directly or should I be changing a solid color attribute in my vertex shader and then passing that color to the fragment shader? I'm drawing single solid colour rectangles - nothing special.
void main()
{
gl_FragColor = vec4( 1.0, 0, 0, 1 );"
}