开发者

OpenGL: What is the fastest way to paint hex maps?

I want to paint a hex map with each hex a (potentially) different color. The shared border is black and the interior is a solid color. If I want to paint a 1920x1080 display, how can I do this the fastest way with OpenGL?

See the image below for a sample hex (blown up for clarity). The color of the hex won't necessaril开发者_C百科y be the same as any of the surrounding hexes.

OpenGL: What is the fastest way to paint hex maps?


A TRIANGLE_FAN would work quite well, since a hex is convex.

Fill the entire area with the border color, then render each hex as a TRIANGLE_FAN leaving a gap between adjacent hexes where the border color can show through.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜