I am trying to create a 3-D hex map. Where the hexagon's match up next and below. like this hex map
A user would enter (x) rows , (X) Columns and it would create a map like that.
I need 3d Due to i would like to be able to stack the hexagons at some point and also texture them, But now to question. How do i draw a hexagon. I am still pretty new to OpenGL but i have got this to draw a hex
glBegin(GL_POLYGON);
for I := 0 to 6 do
begin
glVertex3f(sin(i/6.0*2*PI),cos(i/6.0*2*pi),-2);
end;
glEnd;
not sure thats the best way and its only one face.. But also it just makes one HUGE hexagon. and of course i will need smaller ones. Any help on how to take this project on would be great! In the project i have
prxleft = -1
prxRight = 1
prxTop = 1
prxBottom -1