|
@@ -158,14 +158,11 @@ public class LODGeomap extends GeoMap {
|
|
|
* @return the LOD-ified index buffer
|
|
|
*/
|
|
|
public IndexBuffer writeIndexArrayLodDiff(int lod, boolean rightLod, boolean topLod, boolean leftLod, boolean bottomLod, int totalSize) {
|
|
|
-
|
|
|
-
|
|
|
+ int numVertices = getWidth() * getHeight();
|
|
|
int numIndexes = calculateNumIndexesLodDiff(lod);
|
|
|
-
|
|
|
- IndexBuffer ib = IndexBuffer.createIndexBuffer(numIndexes, numIndexes);
|
|
|
+ IndexBuffer ib = IndexBuffer.createIndexBuffer(numVertices, numIndexes);
|
|
|
VerboseBuffer buffer = new VerboseBuffer(ib);
|
|
|
|
|
|
-
|
|
|
// generate center squares minus the edges
|
|
|
//System.out.println("for (x="+lod+"; x<"+(getWidth()-(2*lod))+"; x+="+lod+")");
|
|
|
//System.out.println(" for (z="+lod+"; z<"+(getWidth()-(1*lod))+"; z+="+lod+")");
|
|
@@ -360,13 +357,11 @@ public class LODGeomap extends GeoMap {
|
|
|
}
|
|
|
|
|
|
public IndexBuffer writeIndexArrayLodVariable(int lod, int rightLod, int topLod, int leftLod, int bottomLod, int totalSize) {
|
|
|
-
|
|
|
+ int numVertices = getWidth() * getHeight();
|
|
|
int numIndexes = calculateNumIndexesLodDiff(lod);
|
|
|
-
|
|
|
- IndexBuffer ib = IndexBuffer.createIndexBuffer(numIndexes, numIndexes);
|
|
|
+ IndexBuffer ib = IndexBuffer.createIndexBuffer(numVertices, numIndexes);
|
|
|
VerboseBuffer buffer = new VerboseBuffer(ib);
|
|
|
|
|
|
-
|
|
|
// generate center squares minus the edges
|
|
|
//System.out.println("for (x="+lod+"; x<"+(getWidth()-(2*lod))+"; x+="+lod+")");
|
|
|
//System.out.println(" for (z="+lod+"; z<"+(getWidth()-(1*lod))+"; z+="+lod+")");
|