Thanks for the reply!

Here is the code where shaders are compiled(typical):

```
CompileShader(m_hVertexShader,strVShader,GL_VERTEX_SHADER_ARB);
CompileShader(m_hGeometryShader,strGShader,GL_GEOMETRY_SHADER_EXT);
CompileShader(m_hFragmentShader,strFShader,GL_FRAGMENT_SHADER_ARB);
m_hProgramObject = glCreateProgramObjectARB();
glAttachObjectARB(m_hProgramObject, m_hVertexShader);
glAttachObjectARB(m_hProgramObject, m_hGeometryShader);
glAttachObjectARB(m_hProgramObject, m_hFragmentShader);
glProgramParameteriEXT( m_hProgramObject, GL_GEOMETRY_INPUT_TYPE_EXT, GL_TRIANGLES );
glProgramParameteriEXT( m_hProgramObject, GL_GEOMETRY_OUTPUT_TYPE_EXT, GL_TRIANGLE_STRIP );
glProgramParameteriEXT( m_hProgramObject, GL_GEOMETRY_VERTICES_OUT_EXT, 120 );
glLinkProgramARB(m_hProgramObject);
```

the CompileShader function

```
void CompileShader(GLhandleARB &hShader, string strSource, GLuint type)
{
const char *szShader = strSource.c_str();
hShader = glCreateShaderObjectARB(type);
glShaderSourceARB(hShader, 1, &szShader, NULL);
glCompileShaderARB(hShader);
}
```

I’m posting some basic shaders:

vertex shader:

```
varying vec2 iUV0;
void main()
{
iUV0 = gl_MultiTexCoord0.xy;
gl_Position = gl_Vertex;
}
```

geometry:

```
varying in vec2 iUV0[3];
varying out vec2 oUV0;
void main(void)
{
int i;
for(i=0; i< 3; i++){
gl_Position = gl_ModelViewProjectionMatrix * vec4(gl_PositionIn[i].xyz,1.);
oUV0 = iUV0[i];
//oNormal = gl_ModelViewMatrix * vec4(normal[i],0);
EmitVertex();
}
EndPrimitive();
}
```

and fragment:

```
varying vec2 oUV0;
uniform sampler2D ColorMap;
//varying out vec4 color;
void main()
{
vec4 color;
for(int i=0;i<2;i++)
for(int j=0;j<i;j++)
color = vec4(1,0,0,1);
gl_FragColor = color;
}
```

In fragment shader I put those two fors for testing.The color is undefined not red.If instead of i in the second for is a constant it works.

Is it a general problem with glsl compiler or there is something I’m doing that messes it up?