Layout qualifier with ivec4

I am having a little trouble with my shader:

This doesn’t work, I get a linker error


#version 420 core
layout(location = 0)    in vec4 inVertex;
layout(location = 1)    in vec4 inColour;
layout(location = 2)    in vec3 inNormal;
layout(location = 3)    in vec4 inJointWeight;
layout(location = 4)    in ivec4 inJointIdx;
//...rest of the shader omitted, but i don't even use inJointIdx

these two both work:
changing the ivec4 to a vec4:

#version 420 core
//..same at above...
layout(location = 4)    in vec4 inJointIdx;


and removing the layout qualifier but keep it an ivec4:

#version 420 core
//..same at above...
in ivec4 inJointIdx;


Any ideas what the cause could be? I am using Windows 7, GTX 460 with 306.23 drivers.

Thanks for any help :slight_smile:

some extra information:
using : in ivec4 inJointIdx;
if I use inJointIdx for something trivial in the shader, and query it’s location it gives me “4”, but still won’t let me manually set it using location to 4

I get a linker error

What linker error?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.