I make live wallpaper and I have one issue. I want to set image as background and Eclipse show error:
01-10 10:37:18.206: E/AndroidRuntime(1045): FATAL EXCEPTION: GLThread 99
01-10 10:37:18.206: E/AndroidRuntime(1045): com.badlogic.gdx.utils.GdxRuntimeException: Texture width and height must be powers of two: 480x800
My code looks like:
public class Tapeta implements ApplicationListener {
private SpriteBatch batch;
private Texture texture;
private TextureRegion region;
@Override
public void create() {
texture = new Texture(Gdx.files.internal("data/cat.jpg"));
Texture.setEnforcePotImages(false);
}
@Override
public void dispose() {
texture.dispose();
}
@Override
public void render() {
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
batch.begin();
batch.draw(texture, 0, 0);
batch.end();
}
@Override
public void resize(int width, int height) {
}
@Override
public void pause() {
}
@Override
public void resume() {
}
}
I'm looking for solution of my issue and I didn't find.