Hi,
Newbie here so please be gentle
I’m trying to build a hex-mapped turn-based game. I started out with processing and ran into performance problems, rendering the map taking 800ms each time. I built a stand-along program that uses JOGL 2 that only draws the hex-map and as soon as there are many hexes, it takes a very long time to draw, i.e. 1200ms to draw 1200 hexes (30 rows, 40 columns).
The JOGL display function is really simple, it clears the background, and then draws the hexes in a loop. Each hex is drawn by using a glBegin(GL_LINE_LOOP) call, followed by 6 glVertex2d for each vertex, and finished off with a glEnd. I push the matrix at the beginning of each render and at the beginning of each row, and then pop them out respectively.
My machine is a brand new Macbook PRO and I simply don’t understand how this is taking so long. I ran the JOGL Gears demo from JNLP, and maximised the window, and it runs very smoothly. So, on the assumption that a whole lot more lines and quads are being rendered in the Gears demo, I must be doing something wrong.
Any advice?
Thanks in advance!