I have been trying to learn how to write a shader for my game. I have got the fragment shader working mostly. I am having trouble with the vertex shader.
I have been following this tutorial:
https://www.opengl.org/sdk/docs/tutorials/ClockworkCoders/loading.phpIt gives an example that just scales all the vertices.
void main(void)
{
vec4 a = gl_Vertex;
a.x = a.x * 0.9;
a.y = a.y * 0.9;
gl_Position = gl_ModelViewProjectionMatrix * a;
}
I have it rendering my vertex array with this shader and nothing shows up, it is just black.
There is no simple tutorials and it is frustrating, this one is simple but it's not working xD