   help with uniforms in GLSL
  Hi, I think this is a very simple problem, but I'm just starting to learn about shaders.  Basically I've written a program to load in a model, I apply a shader which turns on and off making the model change colour, very simple and works OK.  However I've tried to introduce a uniform to the shader so I can load different colours, unfortunately what happens is the model rather than changing colour just vanishes. My shader is as followsuniform vec4 colour;void main(){gl_FragColor = colour;//gl_FragColor=vec4(1.0,1.0,0.0,0.5);}I set the code with  CreateShaderProgram(&MainShader);  /*set up program*/LoadShader(&Fragprog,&MainShader); /*load link a shader*/shaderlocation=glGetUniformLocation(MainShader.program,"colour"); /*get th location of colour*/I then change the colour with GLfloat ColourArray[4]={1.0,1.0,0.0,0.5};glUniform4fv(shaderlocation,4,ColourArray);I would think what would happen is the model should turn yellow when the shader is turned on, however all that happens is the model vanishes. Can anyone advise? Thanks in advance :)   
  Sorry solved, didn't realize the second element of uniform related to the number of 4 arrays not the number of elements in the array.   