I've gotten back to making lwjgl games, and I'm trying to make a sort of wave type vertex shader. I call this to make it wave:
// t is a float that gets updated every frame. fac = sin(t+gl_VertexID); gl_Position = gl_ModelViewProjectionMatrix * ( gl_Vertex + vec4(0.0, fac/10, 0.0, 0.0) );
When I run the program, though, it outputs like this:
The individual vertices are moving, which is great, what I want, but they aren't connected to eachother, so each triangle is separated from one another. How do I fix this without changing the GL11.glBegin(GL11.GL_TRIANGLES) to GL11.glBegin(GL11.GL_TRIANGLE_STRIP)? Or do I have to?