I am reading the OpenGL Superbible 7th edition. It is a great book and all, but when I get to the Geometry Shader part of the book, the program stops working.
Some things that happen:
Whenever I don't render with the Geometry Shader, all of the other Shader things work with the past example. And when I take out glVertexAttrib4fv();
, and I keep the geometry shader is rendered, it only renders one point. Please help. (I am using glDrawArrays(GL_POINTS,0,3);
)
#version 410 core
layout(triangles) in;
layout(points, max_vertices = 3) out;
void main(void)
{
int i;
for(i = 0; i < gl_in.length();i++)
{
gl_Position = gl_in[i].gl_Position;
EmitVertex();
}
}