Jump to content
  • Advertisement
Sign in to follow this  
Xunil_RJ

GLSL linking problem (C9999)

This topic is 4621 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!