GLSL linking problem (C9999)

Started by
4 comments, last by dbzprogrammer 18 years, 4 months ago
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
Advertisement
Put LightSource[0].position.xyz instead of LightSource[0].position.
We should do this the Microsoft way: "WAHOOOO!!! IT COMPILES! SHIP IT!"
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]
The shader looks fine (well, it compiles and links with a default fragment program in RenderMonkey), so the error might be in your attach/link code?
well... i was using forceware 77.77... and i upload it to 81.something :) and now it's linking without errors...

but thank everyone that tryed to help :D
You're GLSL probably didn't support ftransform() or gl_Frontcolor. I don't know, but good thing it's working now. =D
We should do this the Microsoft way: "WAHOOOO!!! IT COMPILES! SHIP IT!"

This topic is closed to new replies.

Advertisement