PDA

View Full Version : link error on 3Dlabs Realizm 100



valoh
12-23-2004, 03:19 AM
Hi,

testing my program on a 3dlabs Wildcat Realizm 100, I get this not very helpful link error:

ERROR: 0:? : LINK ERROR: Not all functions defined in the shader source

Why are there not the names given of the functions which are not defined? What I'm supposed to do with such an error message?

The strange thing is, that I get this error with an absolute trivial shader which work on ATI and nvidia hw. Any ideas what could going wrong resulting in such an error message?


//vertex shader
void main(void) {
gl_Position = gl_ModelViewProjectionMatrix*gl_Vertex;
}
//fragment shader
void main(void) {
gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
}

Cab
12-23-2004, 08:21 AM
Try:

void main()

Hope this helps.

valoh
12-23-2004, 10:19 AM
Originally posted by Cab:
Try:

void main()

Hope this helps.thanks, unfortunately I will have to wait till next week to get access to the 3dlabs card again. I will then try it out and report back...
It would be really funny if this would be the reason for the error, because I don't exactly see a difference between no argument and void argument and all the RenderMonkey example (wasn't 3dlabs involved in the GL2 port?) use it too :rolleyes:

I thought I already checked it, but it could be that I didn't removed the void arguments both in the vertex and fragment shader, will check that next week. It's really sad, the standardization seem to be extremely relative if you look at the 3dlabs, nvidia and ati driver implementation, plus very bug prone. I would have really expected something better than such a crappy error message from the glsl inventor :(

My OpenGL high level shading experience altogether have been very discouraging so far, well, part of my good intentions for next year is to try the next project with direct3d...

Cab
12-23-2004, 10:42 AM
I have checked 3DLabs GLSL Demo shaders and they use
void main(void) in both vertex and fragment shaders so probably this is not the problem.

Sorry.

barthold
01-03-2005, 12:13 PM
Valoh,

Please send me some application code I can compile that shows this error, and I'll take a look at it. Obviously these two simple shaders should just compile and link. In fact, I just tested it. Something weird is going on here.

Barthold
3Dlabs

eyebex
01-11-2005, 06:56 AM
Maybe it's something really stupid like a missing trailing line-break in the source code, which makes the parser miss the last closing "}" and thus thinks "main()" is undefined? If I recall corretly I experienced a problem like this with some of 3DLabs' GLSL test applications.

valoh
01-11-2005, 07:13 AM
no, it is a confirmed driver bug (btw: thanks to barthold/3dlabs for the good support!). The driver don't like ShaderSourceARB with empty strings which I used. Yeah, I'm really lucky finding all these driver bugs from various vendors :eek:

eyebex
01-11-2005, 07:30 AM
ja, such' vasco, such'! guter junge! ;-)

valoh
01-11-2005, 08:11 AM
*wuff* wo bleibt mein Leckerli *knurr*