PDA

View Full Version : The most Simple shader, can't get it to link.



coderdave
02-23-2005, 07:38 PM
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 );
}

coderdave
02-23-2005, 08:58 PM
Got it to work, wasn't loading in the file correctly.