I'm having lots of slowdowns when trying to render around 10 meshes of 800 polys, animated, no lights, no other objects. There's also another mesh, which we move using the keyboard, that's around 1600 polys, also animated.
Probable causes for slowdowns? We've tried using no textures, stopping the animations, etcetera, but we can't seem to find a way to optimize it. We use the basic culling that comes with the engine.
This is what we have on our main loop.
Code: Select all
while(pManager.getDevice()->run())
{
eventReceiver.endEventProcess();
camera.set(player.getNode()->getPosition().X + cameraOffset,cNode->getPosition().Y,player.getNode()->getPosition().Z);
cNode->setPosition(camera);
cNode->setTarget(player.getNode()->getPosition());
pManager.getVideo()->beginScene(true,true, SColor(255, 100, 101, 140));
pManager.getSceneMngr()->drawAll();
pManager.getGUIEnv()->drawAll();
pManager.getVideo()->endScene();
if(eventReceiver.keyDown(irr::KEY_ESCAPE))
pManager.getDevice()->closeDevice();
if(eventReceiver.keyDown(irr::KEY_KEY_W))
player.movement(irr::KEY_KEY_W);
if(eventReceiver.keyDown(irr::KEY_KEY_S))
player.movement(irr::KEY_KEY_S);
if(eventReceiver.keyDown(irr::KEY_KEY_D))
player.movement(irr::KEY_KEY_D);
if(eventReceiver.keyDown(irr::KEY_KEY_A))
player.movement(irr::KEY_KEY_A);
player.rotate(pManager.getDevice()->getCursorControl()->getRelativePosition());
if (pManager.getDevice()->getTimer()->getTime() > lastTick + spawnTime && enemyAmount < maxEnemyAmount) {
lastTick = pManager.getDevice()->getTimer()->getTime();
Zombie z(pManager);
listZombies.push_back(z);
enemyAmount++;
}
eventReceiver.startEventProcess();
}