Answer the question
In order to leave comments, you need to log in
Why is the geometry shader not working?
I'm trying to write a simple geometry shader.
Vertex shader:
in vec4 vert;
void main(void) {
gl_Position = gl_ModelViewProjectionMatrix * (vert + vec4(-1,0,0,0));
}
out vec4 vert;
void main(void) { int i;
for( i = 0; i < gl_in.length(); i++ )
{
vert = gl_in[i].gl_Position;
EmitVertex();
}
EndPrimitive();
}
glProgramParameteriEXT( shader_prog, GL_GEOMETRY_INPUT_TYPE_EXT, GL_LINES);
glProgramParameteriEXT( shader_prog, GL_GEOMETRY_OUTPUT_TYPE_EXT, GL_LINES);
glProgramParameteriEXT( shader_prog, GL_GEOMETRY_VERTICES_OUT_EXT, 2);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question