View Full Version : GLSL geometry shaders and attributes

06-30-2011, 07:16 AM
So I've spent the last couple of hours trying to get my geometry shader to recognize a vertex attribute.

This single line in the geometry shader makes a compilation error:

attribute float nodesizes;

And I get the error "OpenGL requires geometry inputs to be arrays"

What is then, the proper way to put attributes into geometry shaders?

06-30-2011, 07:36 AM
It has to be an array declaration because geometry shader inputs are not vertices but primitives, which comprise of one or more vertices.

Maybe you should try this:

attribute float nodesizes[];