The most Simple shader, can't get it to link

g_program = glCreateProgramObjectARB( );
AttachMyShaders( );

Link( true );
glUseProgramObjectARB( g_program );
ValidateMyShaders( );

I compile my shaders without any warnings. Then I attach my shaders, link and when I link I get this error

“Not all shaders have valid object code.” Here is my shader code.

void main( )
{
	// Mltiply object-space position by MVP matrix
	gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
	
	// Copy the primary color
	gl_FrontColor = vec4( 1.0, 1.0, 1.0, 1.0);
}
void main( )
{
	gl_FragColor = vec4( 1.0, 1.0, 1.0, 1.0 );
}

Got it to work, wasn’t loading in the file correctly.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.