use half the textures, take from non-visible tiles when needed
This commit is contained in:
parent
2fccf0f214
commit
14fe4a6892
@ -345,8 +345,6 @@ public class MapRenderer implements org.mapsforge.android.IMapRenderer {
|
|||||||
// Log.d(TAG, "--------------------------------<<");
|
// Log.d(TAG, "--------------------------------<<");
|
||||||
}
|
}
|
||||||
|
|
||||||
private Object lock = new Object();
|
|
||||||
|
|
||||||
private boolean updateVisibleList(double x, double y, int zdir) {
|
private boolean updateVisibleList(double x, double y, int zdir) {
|
||||||
byte zoomLevel = mLastZoom;
|
byte zoomLevel = mLastZoom;
|
||||||
float scale = mLastScale;
|
float scale = mLastScale;
|
||||||
@ -1144,7 +1142,7 @@ public class MapRenderer implements org.mapsforge.android.IMapRenderer {
|
|||||||
mVBOs.add(new VertexBufferObject(mVboIds[i]));
|
mVBOs.add(new VertexBufferObject(mVboIds[i]));
|
||||||
|
|
||||||
// Set up textures
|
// Set up textures
|
||||||
TextRenderer.init(numTiles * 2);
|
TextRenderer.init(numTiles);
|
||||||
|
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
glDisable(GLES20.GL_DEPTH_TEST);
|
glDisable(GLES20.GL_DEPTH_TEST);
|
||||||
|
|||||||
@ -188,6 +188,16 @@ public class TextRenderer {
|
|||||||
tex = null;
|
tex = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tex == null) {
|
||||||
|
for (int i = 0; i < mTextures.length; i++) {
|
||||||
|
tex = mTextures[i];
|
||||||
|
if (!tex.tile.isVisible)
|
||||||
|
break;
|
||||||
|
|
||||||
|
tex = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (tex == null) {
|
if (tex == null) {
|
||||||
Log.d(TAG, "no textures left");
|
Log.d(TAG, "no textures left");
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user