Skip to main content
gamedev.net
🔒 Locked 🎯 Unreal

Wierd GLSL compilation errors

Started by dimensionX Feb 22, 2005 at 5:20 PM 4 replies 900+ views
Original Post
dimensionX
dimensionX
I want to create two shader programs 'sp1' & 'sp2'. sp1:- Contains a vertex shader 'c.vert' --> "void main(void) { gl_Position = ftransform(); }" and a fragment shader 'fs1.frag' --> It compiles and links clean. sp2:- Contains a vertex shader 'c.vert' --> Same as the first and a fragment shader 'fs2.frag'. --> Gives me errors in vertex shader 'c.vert'. (4) : error C0000: syntax error, unexpected $undefined at token "" (4) : error C0501: type name expected at token "" I am using NVIDIA QuadroFX 3000 + 71.24 drivers. I even tried with 67.22 driver but getting the same error.
_the_phantom_
_the_phantom_
the content of the shaders would be usefull.. (as well as the correct line numbers ofcourse)
dimensionX
dimensionX
c.vert:-
------
void main(void)
{
gl_Position = ftransform();
}

That's it! There is nothing else in the vertex shader. I don't think the contents of the fragment shader matter.
dimensionX
dimensionX
If I am parsing it incorrectly then the first shader program object 'sp1' should not be created because it uses the same 'c.vert' vertex shader.

When I comment the code for creating the first shader program object 'sp1', I get an error in the second fragment shader 'fs2.frag'.

I think it is the stupid GLSL compiler in the drivers.
_the_phantom_
_the_phantom_
As much as I dislike NV's glsl compiler for being a Cg front end, I'd be more inclinded to think its a problem in your code.

How do you load said shaders?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.