Mercurial > hg > ristipolku
comparison game/Engine.java @ 87:6afbf88c8bda
Change background image type from RGBA to RGB only, improves rendering speed.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 03 Mar 2011 16:33:27 +0200 |
parents | 454a9fcd13ca |
children | 753156d64493 |
comparison
equal
deleted
inserted
replaced
86:454a9fcd13ca | 87:6afbf88c8bda |
---|---|
557 // Rescale IDM GUI widgets | 557 // Rescale IDM GUI widgets |
558 widgets.setScale(dim.width / 1024.0f, dim.height / 768.0f); | 558 widgets.setScale(dim.width / 1024.0f, dim.height / 768.0f); |
559 G.screenDim = dim; | 559 G.screenDim = dim; |
560 | 560 |
561 // Rescale background image | 561 // Rescale background image |
562 G.lautaBGScaled = new BufferedImage(dim.width, dim.height, BufferedImage.TYPE_INT_ARGB); | 562 G.lautaBGScaled = new BufferedImage(dim.width, dim.height, BufferedImage.TYPE_INT_RGB); |
563 Graphics2D gimg = G.lautaBGScaled.createGraphics(); | 563 Graphics2D gimg = G.lautaBGScaled.createGraphics(); |
564 gimg.setRenderingHint(RenderingHints.KEY_INTERPOLATION, | 564 gimg.setRenderingHint(RenderingHints.KEY_INTERPOLATION, |
565 RenderingHints.VALUE_INTERPOLATION_BICUBIC); | 565 RenderingHints.VALUE_INTERPOLATION_BICUBIC); |
566 | 566 |
567 gimg.drawImage(G.lautaBG, 0, 0, dim.width, dim.height, null); | 567 gimg.drawImage(G.lautaBG, 0, 0, dim.width, dim.height, null); |