void main(void)
{
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}
As far as I know, the above code should just render the vertex like usual, correct?
Here is my drawing code in the application itself:
glUseProgram(programObject); glBegin(GL_QUADS); glColor3f(0.0f, 1.0f, 0.0f); glVertex3f(0.0f, -1.0f, -1.0f); glVertex3f(0.0f, -1.0f, 1.0f); glVertex3f(0.0f, 1.0f, 1.0f); glVertex3f(0.0f, 1.0f, -1.0f); glEnd(); glUseProgram(0);
If I comment out 'glUseProgram(programObject)' the quad renders just fine. Otherwise, nothing is rendered at all from what I can see anyways.
I know this is simple but I swear I've Googled the hell out of it and can't figure out what I'm doing wrong. Any help would be much appreciated. Thanks.
EDIT: Figured it out. Apparently if you don't specify a color in the shader source, it draws the vertex black. So I wasn't seeing it on my black background. D'oh!

Find content
Not Telling