PDA

View Full Version : Linking Program Problem



glfreak
11-06-2008, 02:13 PM
Then what could be wrong with this crashing at program link with no specific error from log info???



uniform sampler2D baseTexSamp;
uniform sampler2D bumpTexSamp;

//varying vec3 fragNormal;
//varying vec3 lightDir;

void main()
{
//float f = dot(normalize(lightDir), normalize(fragNormal));

//gl_FragData[0] = vec4(clamp(f, 0.0, 1.0) * texture2D(baseTexSamp, vec2(gl_TexCoord[0])));

gl_FragColor = vect4(texture2D(baseTexSamp, gl_TexCoord[0].st));
}



No vertex shader assigned, only this fragment.

Korval
11-06-2008, 02:39 PM
Don't double post. You already made a thread for this.

glfreak
11-06-2008, 02:42 PM
Till I get the answer :)

IneQuation.pl
11-06-2008, 03:05 PM
How about an unspecific error? Does it put anything in the info log? Are you sure you're querying the log properly? What exactly happens, does the application crash or nothing is drawn or what?

glfreak
11-06-2008, 03:12 PM
Nothing in the log, and it worked fine for other problem, so it's not in the debug log.

While debugging the program, when it reaches to the link point it jumps to another place and crashes...

Another problem says at compile time of shader, EOF unexpected...but the syntax is 100% accurate.

gybe
11-06-2008, 03:28 PM
vect4 -> vec4

glfreak
11-06-2008, 03:48 PM
Still with this code a problem but with compilation error:
pre-mature EOF




uniform sampler2D baseTexSamp;
uniform sampler2D bumpTexSamp;

varying vec3 fragNormal;
varying vec3 lightDir;

void main()
{
float f = dot(normalize(lightDir), normalize(fragNormal));

//vec4(
//clamp(f, 0.0, 1.0) *
//texture2D(baseTexSamp,
//vec2(gl_TexCoord[0])
//)
//);

//gl_FragColor = texture2D(baseTexSamp, gl_TexCoord[0].st);
gl_FragColor = texture2D(baseTexSamp, gl_TexCoord[0].st);

}

gybe
11-06-2008, 06:48 PM
Did you compute the shader string length properly?

glfreak
11-07-2008, 08:11 AM
Yup. BTW I'm using C# Tao.OpenGL framework if that might be buggy and unreliable...I dunno all I can say damn .NET

glfreak
11-07-2008, 08:33 AM
Ok the problem sounds when I comment out the second sampler, bumpTexSamp, then it compiles. What a buggy ATI? or .NET?

IneQuation.pl
11-07-2008, 09:24 AM
Lol. I personally dislike both, but here I bet $10 on ATI's fault. :) They just suck sooo badly when it comes to drivers.

glfreak
11-07-2008, 09:39 AM
ok then switch to D3D!

glfreak
11-07-2008, 12:45 PM
Unfortunately it's to be an implementation by some XYZ hardware vendor, so we don't really care at least the casual users, gamers or CAD designers...if it makes their life better switching to D3D view in 3DS Max or in some games that support both then it's not the card really. For OGL to be successful it should leverage itself from being an implementation to a driver. for graphics programming sake, it's a damn robust API that needs a lot of dedication to get it out bug-free.

gybe
11-07-2008, 02:19 PM
This bug seems to big to be a driver bug. Im sure they do some testing for such trivial case. Maybe you should try on a NVIDIA card to see if you can also reproduce the problem there.

IneQuation.pl
11-08-2008, 08:48 AM
When I wrote "both", I meant .NET and ATI.

glfreak
11-10-2008, 08:31 AM
Now I tried it in pure "C" language, and I got the same eerroorr :D