New to OpenGL -- Transformation Help

I'm pretty new to OpenGL, and have gotten stuck on something I'm trying to work out. What I'm trying to do is create a very basic hex map--2D, all one color, just very simple for now.

I've got everything setup, but when I run my program, it appears to just have randomly scattered my hexes around. Now, I output all the coordinates that my hexes *should* be trying to build at, and those coordinates are correct. So, I'm assuming my problem is with the glTraslatef I have (line 45, link to my code is below). I think the error is within my buildHex function (starts line 41). I'm running the glTranslatef(x, y, z); before glBegin, in where I build the individual hexagon.

Now, according to most of the tutorials I've seen, it seems I need to run a glLoadIdentity() before calling that translate function, but if I do, it clears everything off the screen and nothing is dispayed. As it is now, it scatters the hexes seemingly at random across the screen.

well, I'm not an OpenGL guru, and I just briefly looked at your code, but I see a few things that might fix your problem:
Why are you drawing vertice #0? Since you're drawing a polygon, it has to be convex...what you're drawing essentially does this for the outline of the polygon:
draw a line between 0-1, 1-2, 2-3, 3-4, 4-5, 5-6, 6-7, 7-0. This means that you're going to have an unnecessary line (or two lines, since it draws once between 0 and 7, and once between 7 and 0), and this may even mean that OpenGL is interpreting your polygon as concave, instead of convex, which is seriously going to mess up things.
I could definitely be wrong here, though XD
-wyrmmage

What that does is just do your translations inside buildHex only temporarily for that hex, on top of the existing transform(s). Otherwise, every time you wanted to draw something you'd have to load the identity matrix and multiply all the transforms for everything over and over. glPush/Pop makes it easy and efficient to multiply a temporary transform and then pop it to back up to where it was without having to redo everything up to that point again.

Hey hey, thank you all! I've got my basic map working now. AnotherJake, thanks for the glPolygonModel tip--made this much easier. And thanks wyrmmage, for pointing out I didn't need that Vertex #0--I guess I left that in there because when I was calculating it out by hand at first, having that original point made things a bit easier. I didn't realize that could cause problems, though.