horschi / OpenTeufel

GNU General Public License v2.0
1 stars 1 forks source link

too many draw calls #1

Open luxifr opened 9 years ago

luxifr commented 9 years ago

Making progress with the OpenGL renderer. However, it is not any faster because of the way the level renderer renders the scene. It just makes far too many draw calls. More than 20.000 per frame(!).

I suggest combining as much as possible, i.e., create sprites for distinct scene objects. For example: Combine the scene background into a single sprite, with a single texture; combine each building into a single sprite, with a single texture, etc.

horschi commented 9 years ago

I think we can prepare the "pillars" which would massively reduce the number of draw calls. Right now the game passes the 32x32 tiles individually to the Renderer (as they come from the data files).

This will not change the renderer interface, as we would simply pass fewer, but larger images.