Browse files

improve efficientcy on tile rendering

  • Loading branch information...
1 parent 42eda61 commit 54534fb28ef982a682d826276a28bb8ddcf214c0 kevin committed Nov 3, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 examples/org/newdawn/slick/examples/lights/LightTest.java
View
4 examples/org/newdawn/slick/examples/lights/LightTest.java
@@ -200,6 +200,7 @@ public void render(GameContainer container, Graphics g)
// move the display to nicely position the tilemap
g.translate(64,50);
+ tiles.startUse();
// cycle round every tile in the map
for (int y=0;y<HEIGHT;y++) {
for (int x=0;x<WIDTH;x++) {
@@ -227,9 +228,10 @@ public void render(GameContainer container, Graphics g)
// draw the image with it's newly declared vertex colours
// to the display
- image.draw(x*32,y*32);
+ image.drawEmbedded(x*32,y*32,32,32);
}
}
+ tiles.endUse();
}
/**

0 comments on commit 54534fb

Please sign in to comment.