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