This commit is contained in:
Hannes Janetzek
2013-01-30 04:09:11 +01:00
parent 8bcc3b6b3f
commit 3d8f62ec4a
5 changed files with 20 additions and 58 deletions

View File

@@ -32,7 +32,7 @@ import android.util.Log;
/**
* @author Hannes Janetzek
* FIXME check if polygon has self intersections or 0/180 degree
* angles!
* angles! or bad things might happen in Triangle
*/
public class ExtrusionLayer extends Layer {
private final static String TAG = ExtrusionLayer.class.getName();
@@ -350,12 +350,6 @@ public class ExtrusionLayer extends Layer {
if (mNumVertices == 0 || compiled)
return;
// mVboIds = new int[2];
// GLES20.glGenBuffers(2, mVboIds, 0);
// mIndicesBufferID = mVboIds[0];
// mVertexBufferID = mVboIds[1];
// FIXME add in_gl_thread param to make sure we get something here
mVertexBO = BufferObject.get(0);
mIndiceBO = BufferObject.get(0);
mIndicesBufferID = mIndiceBO.id;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012 Hannes Janetzek
* Copyright 2013 OpenScienceMap
*
* This program is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General License as published by the Free Software
@@ -21,6 +21,9 @@ import org.oscim.view.MapView;
import android.graphics.Paint.Cap;
/**
* @author Hannes Janetzek
*/
public final class LineLayer extends Layer {
private static final float COORD_SCALE = GLRenderer.COORD_MULTIPLIER;
@@ -77,9 +80,8 @@ public final class LineLayer extends Layer {
else if (line.cap == Cap.SQUARE)
squared = true;
if (pool == null) {
pool = curItem = VertexPool.get();
}
if (pool == null)
curItem = pool = VertexPool.get();
VertexPoolItem si = curItem;
short v[] = si.vertices;

View File

@@ -83,20 +83,9 @@ public final class SymbolLayer extends TextureLayer {
symbols = item;
}
// @Override
// void compile(ShortBuffer sbuf) {
// if (TextureRenderer.debug)
// Log.d("...", "compile");
//
// for (TextureObject to = textures; to != null; to = to.next)
// TextureObject.uploadTexture(to);
//
// Layers.addPoolItems(this, sbuf);
// }
private final static int LBIT_MASK = 0xfffffffe;
// TODO ... reuse texture when only symbol position changed
// TODO reuse texture when only symbol position changed
@Override
public boolean prepare() {