I’m having problems getting the locations of the transform-feedback-varyings.

No problem with gl_Position and faceNormal but no chance to get the location of gl_FrontColor (loc[1] == -1).

```
GLint loc[3];
loc[0] = glGetVaryingLocationNV(program,"gl_Position");
loc[1] = glGetVaryingLocationNV(program,"gl_FrontColor");
loc[2] = glGetVaryingLocationNV(program,"faceNormal");
glTransformFeedbackVaryingsNV(program, 3, loc,GL_INTERLEAVED_ATTRIBS_NV);
```

I tried to activate it with

```
glActiveVaryingNV(program,"gl_FrontColor");
```

before linking the program.

My VS- and GS-code looks like this

Vertex-Shader:

```
#version 120
#extension GL_ARB_texture_rectangle : enable
varying vec3 normal;
varying vec4 pos;
varying vec4 diffuse;
varying vec4 ambientGlobal;
varying vec4 ambient;
varying vec3 lightDir;
varying vec3 halfVector;
varying float lightDist;
void setupLight(vec4 pos_)
{
vec4 ecPos;
vec3 aux;
/* these are the new lines of code to compute the light's direction */
ecPos = gl_ModelViewMatrix * pos_;
aux = vec3(gl_LightSource[0].position-ecPos);
lightDir = normalize(aux);
lightDist = length(aux);
halfVector = normalize(gl_LightSource[0].halfVector.xyz);
/* Compute the diffuse, ambient and globalAmbient terms */
diffuse = gl_FrontMaterial.diffuse * gl_LightSource[0].diffuse;
/* The ambient terms have been separated since one of them */
/* suffers attenuation */
ambient = gl_FrontMaterial.ambient * gl_LightSource[0].ambient;
ambientGlobal = gl_LightModel.ambient * gl_FrontMaterial.ambient;
}
void main(void)
{
gl_FrontColor = gl_Color;
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
normal = normalize(gl_NormalMatrix * gl_Normal);
pos = gl_Vertex;
setupLight(pos);
}
```

Geometry-Shader:

```
#version 120
#extension GL_EXT_geometry_shader4 : enable
#extension GL_EXT_gpu_shader4 : enable
varying in vec3 normal[3];
varying in vec4 pos[3];
varying out vec3 faceNormal;
varying in vec4 diffuse[3];
varying in vec4 ambientGlobal[3];
varying in vec4 ambient[3];
varying in vec3 lightDir[3];
varying in vec3 halfVector[3];
varying in float lightDist[3];
varying out vec4 odiffuse;
varying out vec4 oambientGlobal;
varying out vec4 oambient;
varying out vec3 olightDir;
varying out vec3 ohalfVector;
varying out float olightDist;
varying out vec3 onormal;
void main()
{
onormal = vec3(0.0);
gl_FrontColor = vec4(0.0);
gl_Position = vec4(0.0);
faceNormal = normalize(gl_NormalMatrix*cross(pos[1].xyz-pos[0].xyz,pos[2].xyz-pos[0].xyz));
for(int i = 0; i < gl_VerticesIn; ++i)
{
gl_Position = gl_PositionIn[i];
gl_FrontColor = gl_FrontColorIn[i];
onormal = faceNormal;
odiffuse = diffuse[i];
oambientGlobal = ambientGlobal[i];
oambient = ambient[i];
olightDir = lightDir[i];
ohalfVector = halfVector[i];
olightDist = lightDist[i];
EmitVertex();
}
EndPrimitive();
}
```

glGetError() returns no errors…

Any ideas?