Skip to content

Commit ff0ebd3

Browse files
committed
fix barrel benchmark row/column
1 parent 0bca9be commit ff0ebd3

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

src/Box2D.NET.Samples/Samples/Benchmarks/BenchmarkBarrel.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public enum ShapeType
3131
e_humanShape,
3232
}
3333

34-
private const int e_maxColumns = 26;
35-
private const int e_maxRows = 150;
34+
private const int e_maxColumns = 30;
35+
private const int e_maxRows = 300;
3636

3737

3838
private B2BodyId[] m_bodies = new B2BodyId[e_maxRows * e_maxColumns];
@@ -109,9 +109,9 @@ public BenchmarkBarrel(SampleAppContext ctx, Settings settings) : base(ctx, sett
109109
}
110110

111111
m_shapeType = ShapeType.e_compoundShape;
112-
113-
m_columnCount = m_context.sampleDebug ? 10 : e_maxColumns;
114-
m_rowCount = m_context.sampleDebug ? 40 : e_maxRows;
112+
113+
m_columnCount = e_maxColumns / (m_context.sampleDebug ? 3 : 2);
114+
m_rowCount = e_maxRows / (m_context.sampleDebug ? 3 : 2);
115115

116116
CreateScene();
117117
}
@@ -135,25 +135,25 @@ void CreateScene()
135135
}
136136

137137

138-
if (m_shapeType == ShapeType.e_compoundShape)
139-
{
140-
if (m_context.sampleDebug == false)
141-
{
142-
m_columnCount = 20;
143-
}
144-
}
145-
else if (m_shapeType == ShapeType.e_humanShape)
146-
{
147-
if (m_context.sampleDebug)
148-
{
149-
m_rowCount = 5;
150-
m_columnCount = 10;
151-
}
152-
else
153-
{
154-
m_rowCount = 30;
155-
}
156-
}
138+
// if (m_shapeType == ShapeType.e_compoundShape)
139+
// {
140+
// if (m_context.sampleDebug == false)
141+
// {
142+
// m_columnCount = e_maxColumns;
143+
// }
144+
// }
145+
// else if (m_shapeType == ShapeType.e_humanShape)
146+
// {
147+
// if (m_context.sampleDebug)
148+
// {
149+
// m_rowCount = 5;
150+
// m_columnCount = 10;
151+
// }
152+
// else
153+
// {
154+
// m_rowCount = 30;
155+
// }
156+
// }
157157

158158
float rad = 0.5f;
159159

0 commit comments

Comments
 (0)