Hello,
i’m trying to implement a basic geometry-shader in my own c++ program. The compilation works but i only get a black screen.
Is there anyone who has an idea why?
Here is the Code:
Vertex-shader:
void main () {
gl_Position = ftransform();
}
Geometry-shader:
layout(triangles) in;
layout(triangle_strip, max_vertices=3) out;
void main() {
for(int i=0; i<3; i++) {
gl_Position = gl_in[i].gl_Position;
EmitVertex();
}
EndPrimitive();
}
Fragment-shader:
out vec4 outColor;
void main() { outColor = vec4(1.0, 0.0, 0.0, 1.0); }
Kind regards,
Frank