cleanups
This commit is contained in:
parent
1170e4a91a
commit
5364651a94
@ -46,7 +46,7 @@ public class LwHttp {
|
||||
mInflateContent = deflate;
|
||||
|
||||
mUrlPath = url.toString();
|
||||
mUrlFileExtension = "." + extension;
|
||||
mUrlFileExtension = extension;
|
||||
|
||||
mRequestBuffer = new byte[1024];
|
||||
}
|
||||
|
||||
@ -80,11 +80,6 @@ public class GridRenderer extends ElementRenderer {
|
||||
for (int yy = -2; yy < 2; yy++) {
|
||||
for (int xx = -2; xx < 2; xx++) {
|
||||
|
||||
// String label = String.format(
|
||||
// Locale.ROOT, TILE_FORMAT,
|
||||
// Integer.valueOf(x + xx),
|
||||
// Integer.valueOf(y + yy),
|
||||
// Integer.valueOf(z));
|
||||
String label = Integer.valueOf(x + xx) + "/" +
|
||||
Integer.valueOf(y + yy) + "/" +
|
||||
Integer.valueOf(z);
|
||||
@ -120,11 +115,10 @@ public class GridRenderer extends ElementRenderer {
|
||||
mCurY = y;
|
||||
mCurZ = z;
|
||||
|
||||
MapPosition layerPos = mMapPosition;
|
||||
layerPos.copy(pos);
|
||||
layerPos.x = (double) x / z;
|
||||
layerPos.y = (double) y / z;
|
||||
layerPos.scale = z;
|
||||
mMapPosition.copy(pos);
|
||||
mMapPosition.x = (double) x / z;
|
||||
mMapPosition.y = (double) y / z;
|
||||
mMapPosition.scale = z;
|
||||
|
||||
addLabels(x, y, pos.zoomLevel);
|
||||
|
||||
|
||||
@ -41,35 +41,32 @@ public class ElementLayers {
|
||||
TextureItem.init(gl, 0);
|
||||
}
|
||||
|
||||
// FIXME use one ArrayList for these!
|
||||
|
||||
// mixed Polygon- and LineLayer
|
||||
/** mixed Polygon- and LineLayer */
|
||||
public RenderElement baseLayers;
|
||||
// Text- and SymbolLayer
|
||||
public RenderElement textureLayers;
|
||||
//
|
||||
public RenderElement extrusionLayers;
|
||||
|
||||
// VBO holds all vertex data to draw lines and polygons
|
||||
// after compilation.
|
||||
// Layout:
|
||||
// 16 bytes fill coordinates,
|
||||
// n bytes polygon vertices,
|
||||
// m bytes lines vertices
|
||||
// ...
|
||||
/** Text- and SymbolLayer */
|
||||
public RenderElement textureLayers;
|
||||
|
||||
public RenderElement extrusionLayers;
|
||||
/**
|
||||
* VBO holds all vertex data to draw lines and polygons after compilation.
|
||||
* Layout:
|
||||
* 16 bytes fill coordinates,
|
||||
* n bytes polygon vertices,
|
||||
* m bytes lines vertices
|
||||
* ...
|
||||
*/
|
||||
public BufferObject vbo;
|
||||
|
||||
// To not need to switch VertexAttribPointer positions all the time:
|
||||
// 1. polygons are packed in VBO at offset 0
|
||||
// 2. lines afterwards at lineOffset
|
||||
// 3. other layers keep their byte offset in RenderElement.offset
|
||||
/**
|
||||
* To not need to switch VertexAttribPointer positions all the time:
|
||||
* 1. polygons are packed in VBO at offset 0
|
||||
* 2. lines afterwards at lineOffset
|
||||
* 3. other layers keep their byte offset in RenderElement.offset
|
||||
*/
|
||||
public int lineOffset;
|
||||
public int texLineOffset;
|
||||
|
||||
// time when layers became first rendered (in uptime)
|
||||
// used for animations
|
||||
public long time;
|
||||
|
||||
private RenderElement mCurLayer;
|
||||
|
||||
/**
|
||||
@ -328,13 +325,12 @@ public class ElementLayers {
|
||||
l.verticesCnt = 0;
|
||||
}
|
||||
|
||||
for (RenderElement l = textureLayers; l != null; l = l.next) {
|
||||
for (RenderElement l = textureLayers; l != null; l = l.next)
|
||||
l.clear();
|
||||
}
|
||||
|
||||
for (RenderElement l = extrusionLayers; l != null; l = l.next) {
|
||||
for (RenderElement l = extrusionLayers; l != null; l = l.next)
|
||||
l.clear();
|
||||
}
|
||||
|
||||
baseLayers = null;
|
||||
textureLayers = null;
|
||||
extrusionLayers = null;
|
||||
|
||||
@ -128,8 +128,6 @@ public final class PolygonLayer extends RenderElement {
|
||||
|
||||
public static final class Renderer {
|
||||
|
||||
//private static GL20 GL;
|
||||
|
||||
private static final int POLYGON_VERTICES_DATA_POS_OFFSET = 0;
|
||||
private static final int STENCIL_BITS = 8;
|
||||
private final static int CLIP_BIT = 0x80;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user