The current scheme is, a primitive shape (a triangle list) for each tile on screen.
My first attempt deleted the previous primitive and created a new one each frame. Very poor performance.
Second attempt kept the tiles in place, but changed the vertices. If the new tile has a different number of vertices from the first though, a resize operation has to be done.
It turns out that resize() is very expensive. If I don't do it, and just make sure all the tiles have the same number of vertices, screen updates are much faster.
I'll have to design tiles around this, but the speed difference is encouraging. I'm still looking into ways to improve performance.
No comments:
Post a Comment