clear ItemizedOverlay
This commit is contained in:
parent
019c39d8b8
commit
be67647bdd
@ -112,6 +112,13 @@ public abstract class ItemizedOverlay<Item extends OverlayItem> extends Overlay
|
||||
int numVisible = 0;
|
||||
|
||||
synchronized (lock) {
|
||||
if (mItems == null) {
|
||||
if (layers.textureLayers != null) {
|
||||
layers.clear();
|
||||
newData = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// check changes
|
||||
for (InternalItem it = mItems; it != null; it = it.next) {
|
||||
|
@ -71,13 +71,21 @@ public abstract class BasicOverlay extends RenderOverlay {
|
||||
|
||||
@Override
|
||||
public void compile() {
|
||||
int newSize = layers.getSize();
|
||||
if (newSize == 0) {
|
||||
BufferObject.release(vbo);
|
||||
vbo = null;
|
||||
isReady = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (vbo == null) {
|
||||
vbo = BufferObject.get(0);
|
||||
|
||||
if (vbo == null)
|
||||
return;
|
||||
}
|
||||
int newSize = layers.getSize();
|
||||
|
||||
if (newSize > 0) {
|
||||
if (GLRenderer.uploadLayers(layers, vbo, newSize, true))
|
||||
isReady = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user