meirtsvi/WazeWP7 — Issue #38: Create proper draw chain that will draw the objects in the same order as they called
Author: meirtsvi
Created: 2011-12-31 18:21:45+00:00
State: open

In the XNA implementation I wanted to get results fast. This came on the account of drawing objects in hard-coded order rather than the order which they have been called from C code.
I first draw all the polygons, then the bitmaps and then the text. This can cause to weird effects if the intention was to draw the text and only then the polygon.
I'm using 3 arrays to hold the polygons, bitmaps and texts. I suggest keeping one array and inside the OnDraw function add 'switch' clause that check the object type and draws it accordingly.