Reputation: 2894
I am going to draw a regular hexagon with one fill color. I can do it with a sequence of glVertex2*() calls. However, the glBegin() call is what I am asking about. Is there any benefit to using GL_POLYGON or GL_TRIANGLE_FAN? If it matters, drawing hexes will be the main work of the program. If you have another idea, I am all ears.
Upvotes: 6
Views: 3033
Reputation: 283614
GL_POLYGON
is deprecated in OpenGL 3.x. I think most drivers convert GL_POLYGON
to a bunch of triangles, you can save the conversion by providing triangles in the first place.
Upvotes: 9
Reputation: 53496
Usually that are very very close but at that point it's going to be down to the hardware. Don't worry about such minor details and only revisit it once you are sure that you indeed have a bottleneck in that area.
Upvotes: 4