Sign in to follow this  
Xunil_RJ

GLSL linking problem (C9999)

Recommended Posts

Xunil_RJ    102
i'm having a little problem with glsl... when i use the gl_LightSource[0].position, for example give me a link error... (20) : fatal error C9999: not a leaf in member select (39) I look everywhere for a error table of the glsl compiler with no sucess. So i'm really stuck with this error. And the strange thing is , if i made a typo, for example: gl_LightSource[0].posiion ( without the t ) the compiler complain that there is no posiion on the glLightParameters...
void main()
{
	vec3 normal, lightDir;
	vec4 diffuse;
	float NdotL;
	
	
	normal = normalize(gl_NormalMatrix * gl_Normal);
	
	lightDir = normalize(vec3(gl_LightSource[0].position));
	
	
	NdotL = max(dot(normal, lightDir), 0.0);
	
	diffuse = gl_FrontMaterial.diffuse * gl_LightSource[0].diffuse;
	
	gl_FrontColor =  NdotL * diffuse;
	
	gl_Position = ftransform();
}
here is the code of the vertex shader... i'm not using fragment shader as my board dos not support... is a onboard geforce 2 but it's accept the ARB_glsl_100

Share this post


Link to post
Share on other sites
Xunil_RJ    102
hum... sorry... i forgot to mention... i have tryed this...

if i put, for example.. gl_LightSource[0].position.lll gives me a compile error as expected... but a gl_LightSource[0].position.xyz gives me a link error...

The mistery to me is that it's ocurring a link problem, not a compile error...

but thank you for the suggestion...

just editing to mention that the line thar the linker indicate the error.. is the last line of the file...

i'm really inclined to believe that may be a problem with my driver...

[Edited by - Xunil_RJ on November 27, 2005 8:29:06 AM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this