mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
Use OpenGL2 for Android so images don't need dimensions that are powers of 2
This commit is contained in:
@@ -9,7 +9,6 @@ import android.os.Environment;
|
|||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.backends.android.AndroidApplication;
|
import com.badlogic.gdx.backends.android.AndroidApplication;
|
||||||
|
|
||||||
import forge.Forge;
|
import forge.Forge;
|
||||||
|
|
||||||
public class Main extends AndroidApplication {
|
public class Main extends AndroidApplication {
|
||||||
@@ -36,6 +35,6 @@ public class Main extends AndroidApplication {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
initialize(new Forge(getClipboard(), assetsDir.getAbsolutePath() + "/"), false);
|
initialize(new Forge(getClipboard(), assetsDir.getAbsolutePath() + "/"), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ public class Forge implements ApplicationListener {
|
|||||||
//install our error handler
|
//install our error handler
|
||||||
ExceptionHandler.registerErrorHandling();
|
ExceptionHandler.registerErrorHandling();
|
||||||
|
|
||||||
|
Texture.setEnforcePotImages(false); //ensure image dimensions don't have to be powers of 2
|
||||||
|
|
||||||
batch = new SpriteBatch();
|
batch = new SpriteBatch();
|
||||||
shapeRenderer = new ShapeRenderer();
|
shapeRenderer = new ShapeRenderer();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user