Remove the unused parameter in getBufferMemoryForSingleLod()

This commit is contained in:
James Seibel
2021-08-28 11:55:48 -05:00
parent 13878b7387
commit c54c2c6612
6 changed files with 11 additions and 11 deletions
@@ -49,5 +49,5 @@ public abstract class AbstractLodTemplate
* Returns in bytes how much buffer memory is required
* for one LOD object
*/
public abstract int getBufferMemoryForSingleNode(int level);
public abstract int getBufferMemoryForSingleNode();
}
@@ -318,10 +318,9 @@ public class CubicLodTemplate extends AbstractLodTemplate
}
@Override
public int getBufferMemoryForSingleNode(int detailLevel)
public int getBufferMemoryForSingleNode()
{
// (sidesOnACube * pointsInASquare * (positionPoints + colorPoints))) *
// howManyPointsPerLodChunk
// (sidesOnACube * pointsInASquare * (positionPoints + colorPoints)))
return (6 * 4 * (3 + 4));
}
@@ -42,7 +42,7 @@ public class DynamicLodTemplate extends AbstractLodTemplate
}
@Override
public int getBufferMemoryForSingleNode(int detailLevel)
public int getBufferMemoryForSingleNode()
{
return 0;
}
@@ -40,7 +40,7 @@ public class TriangularLodTemplate extends AbstractLodTemplate
}
@Override
public int getBufferMemoryForSingleNode(int detailLevel)
public int getBufferMemoryForSingleNode()
{
return 0;
}
@@ -54,8 +54,8 @@ public enum LodTemplate
}
public int getBufferMemoryForSingleLod(int detailLevel)
public int getBufferMemoryForSingleLod()
{
return template.getBufferMemoryForSingleNode(detailLevel);
return template.getBufferMemoryForSingleNode();
}
}
@@ -87,13 +87,14 @@ public class RenderUtil
/**
* Get how much buffer memory would be required for the given radius multiplier
*
* TODO check if this is actually returning the correct memory needed
*/
public static int getBufferMemoryForRegion()
{
// calculate the max amount of buffer memory needed (in bytes)
return LodUtil.REGION_WIDTH_IN_CHUNKS * LodUtil.REGION_WIDTH_IN_CHUNKS *
LodConfig.CLIENT.lodTemplate.get().
getBufferMemoryForSingleLod(LodUtil.CHUNK_DETAIL_LEVEL);
LodConfig.CLIENT.lodTemplate.get().getBufferMemoryForSingleLod();
}
/**
@@ -102,7 +103,7 @@ public class RenderUtil
*/
public static int getMaxRadiusMultiplierWithAvaliableMemory(LodTemplate lodTemplate, int detailLevel)
{
int maxNumberOfLods = LodRenderer.MAX_ALOCATEABLE_DIRECT_MEMORY / lodTemplate.getBufferMemoryForSingleLod(detailLevel);
int maxNumberOfLods = LodRenderer.MAX_ALOCATEABLE_DIRECT_MEMORY / lodTemplate.getBufferMemoryForSingleLod();
int numbLodsWide = (int) Math.sqrt(maxNumberOfLods);
return numbLodsWide / (2 * mc.options.renderDistance);