title: 'gl_VerticesIn' : undeclared identifier
body: <p>Why do I get this error compiling a GLSL geometry shader?</p>
  
  <blockquote>
    <p>ERROR: 0:15: 'gl_VerticesIn' : undeclared identifier</p>
  </blockquote>
  
  <p>Here's the shader:</p>
  
  <pre><code>// makes wireframe triangles.
  
  
  #version 330
  #extension GL_ARB_geometry_shader4 : enable
  
  
  layout(triangles) in;
  layout(line_strip, max_vertices = 4) out;
  
  
  void main(void)
  {
      for (int i = 0; i &lt; gl_VerticesIn; i++)
      {
          gl_Position = gl_in[i].gl_Position;
          EmitVertex();
      }
  
      gl_Position = gl_in[0].gl_Position;
      EmitVertex();
  
      EndPrimitive();
  }
  </code></pre>
  
  <p>Seems straightforward to me, but I can't find much information on "gl_VerticesIn", which I thought was supposed to be a built-in. If I just replace "gl_VerticesIn" with "3", everything works.</p>
  
  <p>I'm using a GeForce GTX 765M and OpenGL 3.3 core profile. I don't have this error using any other GPU. My drivers are up to date.</p>