allocate larger buffers for triangulation...

This commit is contained in:
Hannes Janetzek 2013-01-05 18:10:26 +01:00
parent 2e7a827117
commit cb9cd645af

View File

@ -163,8 +163,9 @@ public class ExtrusionLayer extends Layer {
len = index[ipos] - 2; len = index[ipos] - 2;
} }
// triangulate up to 200 points (limited only by prepared buffers) // triangulate up to 600 points (limited only by prepared buffers)
if (len > 400) { // some buildings in paris have even more...
if (len > 1200) {
Log.d(TAG, ">>> skip building : " + len + " <<<"); Log.d(TAG, ">>> skip building : " + len + " <<<");
return; return;
} }
@ -415,10 +416,10 @@ public class ExtrusionLayer extends Layer {
if (!initialized) { if (!initialized) {
// FIXME also cleanup on shutdown! // FIXME also cleanup on shutdown!
fBuf = ByteBuffer.allocateDirect(360 * 4).order(ByteOrder.nativeOrder()) fBuf = ByteBuffer.allocateDirect(1200 * 4).order(ByteOrder.nativeOrder())
.asFloatBuffer(); .asFloatBuffer();
sBuf = ByteBuffer.allocateDirect(720 * 2).order(ByteOrder.nativeOrder()) sBuf = ByteBuffer.allocateDirect(1800 * 2).order(ByteOrder.nativeOrder())
.asShortBuffer(); .asShortBuffer();
initialized = true; initialized = true;