Changed various names, changed the memory calculator
This commit is contained in:
@@ -884,17 +884,26 @@ public class LodDimension
|
||||
break;
|
||||
case BY_REGION_FAST:
|
||||
}*/
|
||||
|
||||
/*return regions[x][z].getMinMemoryNeeded(template);*/
|
||||
|
||||
/*TODO add memory use calculated with the following cases
|
||||
switch (LodConfig.CLIENT.graphics.detailDropOff.get())
|
||||
{
|
||||
default:
|
||||
case BY_BLOCK:
|
||||
break;
|
||||
case BY_REGION_FANCY:
|
||||
break;
|
||||
case BY_REGION_FAST:
|
||||
}*/
|
||||
int minDistance = LevelPosUtil.minDistance(LodUtil.REGION_DETAIL_LEVEL, x, z, halfWidth, halfWidth);
|
||||
int detail = DetailDistanceUtil.getTreeCutDetailFromDistance(minDistance);
|
||||
int levelToGen = DetailDistanceUtil.getLodDrawDetail(detail);
|
||||
|
||||
int size = 1 << (LodUtil.REGION_DETAIL_LEVEL - levelToGen);
|
||||
int maxVerticalData = DetailDistanceUtil.getMaxVerticalData(detail);
|
||||
|
||||
int numberOfLods = size * size * maxVerticalData;
|
||||
int memoryUse = numberOfLods * template.getBufferMemoryForSingleLod(maxVerticalData);
|
||||
|
||||
int memoryUse = LodUtil.regionRenderingMemoryUse(x,z,template);
|
||||
System.out.println(detail + " " + memoryUse + " " + template.getBufferMemoryForSingleLod(maxVerticalData));
|
||||
return memoryUse;
|
||||
//return memoryUse;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user