GLRenderer, add function to set clear color
This commit is contained in:
parent
9043188f94
commit
1481f4b508
@ -27,7 +27,6 @@ import org.oscim.core.MapPosition;
|
|||||||
import org.oscim.core.Tile;
|
import org.oscim.core.Tile;
|
||||||
import org.oscim.layers.tile.MapTile;
|
import org.oscim.layers.tile.MapTile;
|
||||||
import org.oscim.renderer.sublayers.Layers;
|
import org.oscim.renderer.sublayers.Layers;
|
||||||
import org.oscim.theme.IRenderTheme;
|
|
||||||
import org.oscim.utils.GlUtils;
|
import org.oscim.utils.GlUtils;
|
||||||
import org.oscim.utils.Matrix4;
|
import org.oscim.utils.Matrix4;
|
||||||
import org.oscim.utils.pool.Inlist;
|
import org.oscim.utils.pool.Inlist;
|
||||||
@ -56,13 +55,17 @@ public class GLRenderer {
|
|||||||
private static short[] mFillCoords;
|
private static short[] mFillCoords;
|
||||||
|
|
||||||
public class Matrices {
|
public class Matrices {
|
||||||
// do not modify any of these
|
|
||||||
|
/** do not modify! */
|
||||||
public final Matrix4 viewproj = new Matrix4();
|
public final Matrix4 viewproj = new Matrix4();
|
||||||
|
/** do not modify! */
|
||||||
public final Matrix4 proj = new Matrix4();
|
public final Matrix4 proj = new Matrix4();
|
||||||
|
/** do not modify! */
|
||||||
public final Matrix4 view = new Matrix4();
|
public final Matrix4 view = new Matrix4();
|
||||||
|
/** do not modify! */
|
||||||
public final float[] mapPlane = new float[8];
|
public final float[] mapPlane = new float[8];
|
||||||
|
|
||||||
// for temporary use by callee
|
/** for temporary use by callee */
|
||||||
public final Matrix4 mvp = new Matrix4();
|
public final Matrix4 mvp = new Matrix4();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -124,8 +127,8 @@ public class GLRenderer {
|
|||||||
mFillCoords[7] = min;
|
mFillCoords[7] = min;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setRenderTheme(IRenderTheme t) {
|
public static void setBackgroundColor(int color){
|
||||||
mClearColor = GlUtils.colorToFloat(t.getMapBackground());
|
mClearColor = GlUtils.colorToFloat(color);
|
||||||
mUpdateColor = true;
|
mUpdateColor = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ import org.oscim.theme.IRenderTheme;
|
|||||||
import org.oscim.theme.InternalRenderTheme;
|
import org.oscim.theme.InternalRenderTheme;
|
||||||
import org.oscim.theme.ThemeLoader;
|
import org.oscim.theme.ThemeLoader;
|
||||||
import org.oscim.tilesource.TileSource;
|
import org.oscim.tilesource.TileSource;
|
||||||
|
import org.oscim.utils.GlUtils;
|
||||||
|
|
||||||
public class MapView {
|
public class MapView {
|
||||||
|
|
||||||
@ -96,7 +97,7 @@ public class MapView {
|
|||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
mBaseLayer.setRenderTheme(t);
|
mBaseLayer.setRenderTheme(t);
|
||||||
GLRenderer.setRenderTheme(t);
|
GLRenderer.setBackgroundColor(t.getMapBackground());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user