Changed the culling algorithm to use the frustum and not the

camera box. This results in better culling of items, which
can give a good performance benefit.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5494 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2010-06-10 06:19:22 +00:00
parent 7c0ff2772a
commit 8eab00d6d7

View File

@ -42,6 +42,7 @@ Item::Item(ItemType type, const Vec3& xyz, const Vec3& normal,
: -1 ;
m_original_mesh = mesh;
m_node = irr_driver->addMesh(mesh);
m_node->setAutomaticCulling(scene::EAC_FRUSTUM_BOX);
m_node->setPosition(xyz.toIrrVector());
m_node->setRotation(hpr.toIrrHPR());
m_node->grab();