Add debug methods to ColRender Buffer/Source

This commit is contained in:
James Seibel
2023-08-30 07:43:19 -05:00
parent 5c03d7446b
commit d3a7bb7b9d
2 changed files with 42 additions and 0 deletions
@@ -346,6 +346,34 @@ public class ColumnRenderSource
public boolean isEmpty() { return this.isEmpty; }
public void markNotEmpty() { this.isEmpty = false; }
/** can be used when debugging */
public boolean hasNonVoidDataPoints()
{
if (this.isEmpty)
{
return false;
}
for (int x = 0; x < SECTION_SIZE; x++)
{
for (int z = 0; z < SECTION_SIZE; z++)
{
ColumnArrayView columnArrayView = this.getVerticalDataPointView(x,z);
for (int i = 0; i < columnArrayView.size; i++)
{
long dataPoint = columnArrayView.get(i);
if (!RenderDataPointUtil.isVoid(dataPoint))
{
return true;
}
}
}
}
return false;
}
//=======//
@@ -260,6 +260,20 @@ public class ColumnRenderBuffer extends AbstractRenderBuffer implements IDebugRe
// misc methods //
//==============//
/** can be used when debugging */
public boolean hasNonEmptyBuffers()
{
for (GLVertexBuffer vertexBuffer : this.vbos)
{
if (vertexBuffer != null && vertexBuffer.getSize() != 0)
{
return true;
}
}
return false;
}
@Override
public void debugDumpStats(StatsMap statsMap)
{