Enable culling for animated mesh
Use the first frame bounding box for it, don't update each frame
This commit is contained in:
parent
fcd1e2830e
commit
ceef7495d2
@ -1166,7 +1166,7 @@ void CSkinnedMesh::finalize()
|
||||
|
||||
void CSkinnedMesh::updateBoundingBox(void)
|
||||
{
|
||||
if(!SkinningBuffers)
|
||||
if(HardwareSkinning || !SkinningBuffers)
|
||||
return;
|
||||
|
||||
core::array<SSkinMeshBuffer*> & buffer = *SkinningBuffers;
|
||||
|
@ -361,11 +361,7 @@ scene::ISceneNode* KartModel::attachModel(bool animated_models, bool always_anim
|
||||
|
||||
node = irr_driver->addAnimatedMesh(m_mesh, "kartmesh",
|
||||
NULL/*parent*/, getRenderInfo());
|
||||
// as animated mesh are not cheap to render use frustum box culling
|
||||
if (CVS->isGLSL())
|
||||
node->setAutomaticCulling(scene::EAC_OFF);
|
||||
else
|
||||
node->setAutomaticCulling(scene::EAC_FRUSTUM_BOX);
|
||||
node->setAutomaticCulling(scene::EAC_FRUSTUM_BOX);
|
||||
#endif
|
||||
if (always_animated)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user