refactor backend Adapter classes
This commit is contained in:
@@ -35,6 +35,10 @@ import android.graphics.drawable.Drawable;
|
||||
public final class AndroidGraphics extends CanvasAdapter {
|
||||
public static final AndroidGraphics INSTANCE = new AndroidGraphics();
|
||||
|
||||
public static void init() {
|
||||
g = INSTANCE;
|
||||
}
|
||||
|
||||
// public static android.graphics.Bitmap getAndroidBitmap(Bitmap bitmap) {
|
||||
// return ((AndroidBitmap) bitmap).bitmap;
|
||||
// }
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package org.oscim.gdx;
|
||||
|
||||
import org.oscim.android.canvas.AndroidGraphics;
|
||||
import org.oscim.backend.CanvasAdapter;
|
||||
import org.oscim.backend.GL20;
|
||||
import org.oscim.backend.GLAdapter;
|
||||
import org.oscim.core.Tile;
|
||||
@@ -40,8 +39,8 @@ public class MainActivity extends AndroidApplication {
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
CanvasAdapter.g = AndroidGraphics.INSTANCE;
|
||||
GLAdapter.g = new AndroidGLAdapter();
|
||||
AndroidGraphics.init();
|
||||
GLAdapter.init(new AndroidGLAdapter());
|
||||
|
||||
// TODO make this dpi dependent
|
||||
Tile.SIZE = 400;
|
||||
|
||||
Reference in New Issue
Block a user