Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

improve efficientcy on tile rendering

  • Loading branch information...
commit 54534fb28ef982a682d826276a28bb8ddcf214c0 1 parent 42eda61
kevin authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 examples/org/newdawn/slick/examples/lights/LightTest.java
4 examples/org/newdawn/slick/examples/lights/LightTest.java
View
@@ -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();
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.