How do I send data to uniform array with sf::Shader ? I've tried using this:
float v3Colours[30];
for( int i = 0; i < 10; i++ ){
v3Colours[ i * 3 ] = i*0.1;
v3Colours[ i * 3 + 1] = 1.0-i*0.1;
v3Colours[ i * 3 + 2] = 1.0-i*0.1;
}
glUniform3fv(glGetUniformLocation(id, "v3Colours"), 10, v3Colours);
but I don't know program id. Is it even possible ?