Oh, I somehow lost track of this thread.
You should start with a trivial pair of shaders which just transform the vertex position and fill the pixels with a constant color.
vertex:
void main() {
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}
pixel:
void main() {
gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
}
Always check the shader compilation status after glCompileShader( shader ):
GLint compileStatus;
glGetObjectParameteriv(shader, GL_OBJECT_COMPILE_STATUS_ARB, &compileStatus);
if (compileStatus!=GL_TRUE)
{
GLint infoLogLength;
glGetObjectParameteriv(shader, GL_OBJECT_INFO_LOG_LENGTH_ARB, &infoLogLength);
if (infoLogLength)
{
char *infoLog = new char[ infoLogLength ];
glGetInfoLog(shader, infoLogLength, NULL, (GLcharARB*)infoLog);
printf("shader compile error: %s \n", infoLog);
delete[] infoLog;
}
}