allow larger amount of rigid bodies, dynamically increase b3Config limits

avoid crashes in instancing renderer if instance maximum is exceeded.
This commit is contained in:
erwincoumans
2013-06-17 17:05:01 -07:00
parent 561a44e5d8
commit 9a92eecf10
6 changed files with 57 additions and 25 deletions

View File

@@ -606,8 +606,10 @@ int main(int argc, char* argv[])
// demo->myinit();
bool useGpu = false;
int maxObjectCapacity=128*1024;
maxObjectCapacity = b3Max(maxObjectCapacity,ci.arraySizeX*ci.arraySizeX*ci.arraySizeX+10);
ci.m_instancingRenderer = new GLInstancingRenderer(maxObjectCapacity);//render.getInstancingRenderer();
ci.m_window = window;