In both Rendermonkey and Shaderdesigner programs used for testing glsl shading, I get a complete black model while I'm trying to learn and test different shaders. Image: http://oi46.tinypic.com/dpg6mu.jpg This image shows the black model in Shaderdesigner, with the following vertex and fragment files:
Vert:
out vec4 color; void main(void)
{
color = gl_Color;
vec4 v = vec4(gl_Vertex);
v.z = sin(5.0*v.x )*0.25;
gl_Position = gl_ModelViewProjectionMatrix * v;
}
Frag:
in vec4 color;
void main()
{
gl_FragColor = color;
}
What I think is happening, is the shaderdesigner is send the gl_Color from the opengl application to the shader with a black value, and I have no clue how to change that value. I have tried messing around with ALL the menus, options, anything relates to changing color and nothing is working. Why is my model black and how can I fix it?