Tuesday 4 December 2007

Mini map

Today the plan was to make a working mini map, and so it does here is a screen dump of it.(will be up tomorrow dial-up doesn't allow me to upload images.)
My first notion was to just redraw the whole map in wire frame and draw it into a new view port. This didn't work of course because I tessellate my planes in the map quite heavily. It look really bad.
Second try was to redraw only the outline of each face, this is the good approach only I tried it in the wrong class. This effectively took me back to the problems I had when I first drew the map. Then I remembered that I had already transformed all the vertices in the map, so I just had to take the first and the last vertex of a tessellated face.
The first and again wring approach in this version was that i copied the whole array over to the class were i needed it. This dramatically dropped my frame rate, which was around 5-7 fps on my new laptop. As you can imagine it was copying a lot of unnecessary data, but at least the mini map was drawn.
The final approach was to just copy the first and last element of the array and this speeded the rendering back up to acceptable frame rates.
I'll put the screen dumps of it up tomorrow it's now bedtime here so I say goodnight to you all.

No comments: