How do I recursively draw a hex map in opengl?

I am new to GL and wanted to create a tiled map as an independent tour operator. I want to create a small (maybe 7 hex width / height) sixth map. My first thought was to simply create a method for drawing a single hexagon, and then just translate the corresponding offset and place the new hex. But this does not seem spectacular. Any ideas? Alos as a side question, how to determine if there is a MotionEvent in each of these hexes?

+3
source share
2 answers

, MotionEvent , , , OpenGL World. , , 0 WIDTH, GL -1 1.

(xCoord/( - 0)) * (1 - (-1)) = xCoordWorld

xCoord 0 2, 1, -1 1.

, "art". , , .

+2

All Articles