2

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?

Manlio
  • 10,768
  • 9
  • 50
  • 79
  • There seems to be nothing wrong, I would look for the problem elsewhere (linking shader program etc). – Jaa-c Apr 07 '13 at 10:53

0 Answers0