Support 4 npot tx, inlined some btlncks

This commit is contained in:
Ondřej Hruška
2014-04-21 16:17:16 +02:00
parent 0619f83bfb
commit e773a5307a
9 changed files with 137 additions and 217 deletions
+2 -3
View File
@@ -11,8 +11,6 @@ import mightypork.gamecore.render.fonts.Glyphs;
import mightypork.gamecore.render.fonts.impl.DeferredFont;
import mightypork.gamecore.render.textures.*;
import org.newdawn.slick.opengl.Texture;
/**
* Static resource repository
@@ -65,6 +63,7 @@ public final class Res {
GLTexture texture;
texture = textures.loadTexture("test.kitten", "/res/img/kitten.png", FilterMode.LINEAR, WrapMode.CLAMP);
texture = textures.loadTexture("test.kitten2", "/res/img/kitten_npot.png", FilterMode.LINEAR, WrapMode.CLAMP);
texture = textures.loadTexture("gui1", "/res/img/gui1.png", FilterMode.NEAREST, WrapMode.CLAMP);
final QuadGrid gui = texture.grid(4, 4);
@@ -107,7 +106,7 @@ public final class Res {
}
public static Texture getTexture(String key)
public static GLTexture getTexture(String key)
{
return textures.getTexture(key);
}
@@ -42,7 +42,7 @@ public class LayerFlyingCat extends ScreenLayer implements MouseButtonEvent.List
cat_position.setTo(getDisplay().getCenter());
cat_position.setDefaultDuration(3);
final ImagePainter cat = new ImagePainter(Res.getTxQuad("test.kitten"));
final ImagePainter cat = new ImagePainter(Res.getTxQuad("test.kitten2"));
cat.setRect(Rect.make(size).centerTo(cat_position));
cat.enableCaching(false);