I am trying to determine the maximum number of vertices a geometry shader is able to output. I am trying to use the below code but the value printed out via an exception (128) works and my code gives me half that (64). I am using Java/JOGL and #version 150 for my shader. I am dividing by two because my geometry shader is outputting glPosition and a vec4 for color to my fragment shader.

Code :Math.min(gl.glGetInteger(GL3.GL_MAX_GEOMETRY_OUTPUT_VERTICES), gl.glGetInteger(GL3.GL_MAX_GEOMETRY_OUTPUT_COMPONENTS) / 2);

The output is

Code :MAX_GEOMETRY_OUTPUT_VERTICES = 1024 GEOMETRY_OUTPUT_COMPONENTS = 128

The spec says the max number of vertices shouldn't exceed the MAX_GEOMETRY_OUTPUT_VERTICES and the product of the number of compunents and the value of MAX_GEOMETRY_OUTPUT_COMPONENTS. What exactly is a component? Why does the math say the value SHOULD be 64 when 128 works? How are you supposed to compute the max number of vertices allowed to be outputted by a geometry shader?

Any help would be appreciated; thanks!

- Stephen