Description:
Remove cull() check. This speeds up drawing tiles by a factor of roughly 2, lol. When drawing a 200x200 map, drawing tiles goes from taking 24ms to 12ms.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r515:7b5c9fe565b8 -

@@ -565,8 +565,8
565 int screenx = (x - y) * Tile.TileSpriteWidth / 2;
565 int screenx = (x - y) * Tile.TileSpriteWidth / 2;
566 int screeny = (x + y) * Tile.TileSpriteHeight / 2;
566 int screeny = (x + y) * Tile.TileSpriteHeight / 2;
567
567
568 if (this.cull(x, y))
568 // if (this.cull(x, y))
569 {
569 // {
570 batch.Draw(
570 batch.Draw(
571 Tile.TileSetTexture,
571 Tile.TileSetTexture,
572 new Rectangle(
572 new Rectangle(
@@ -581,7 +581,7
581 0.9f);
581 0.9f);
582
582
583 this.tilesDrawn++;
583 this.tilesDrawn++;
584 }
584 // }
585 }
585 }
586 }
586 }
587 stopWatch2.Stop();
587 stopWatch2.Stop();
You need to be logged in to leave comments. Login now