I'm trying to write a simple pass-through geometry shader, but it's not working and I don't really get why. Here's my gs:
#version 120
#extension GL_EXT_geometry_shader4 : enable
void main(void) {
for(int i=0; i< gl_VerticesIn; i++) {
gl_Position = gl_PositionIn[i];
EmitVertex();
}
EndPrimitive();
}
I'm using MacOS 10.8 and OpenGL Shader Builder 2.2 (to test). Looks like version 120 is the latest I can use.
The problem is that compilation and linking are successful, but nothing is rendered.
I've set
GL_GEOMETRY_INPUT_TYPE_EXT = GL_TRIANGLES
GL_GEOMETRY_OUTPUT_TYPE_EXT = GL_TRIANGLES_STRIP
GL_GEOMETRY_VERTICES_OUT_EXT = 3
What am I missing?