I use OpenGL without outdated functions, and my light counting is done on a fragment shader. So, I am doing smooth shading.
My problem is that when I draw a cube I need flat normals. By flat normals, I mean that each fragment generated in a face has the same normal.
My solution for this is to create different vertices for each face. So, instead of 8 vertices, now I have 24 (6 * 4) vertices.
But it seems wrong to me, replicating tops. Is there a better way to get flat normals?
Update: I am using OpenGL version 3.3.0, I do not have OpenGL 4 support yet.
source share