Fix: CMeshSceneNode and CAnimatedMeshSceneNode still used wrong material in OnRegisterSceneNode.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6035 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien 2020-01-03 16:22:55 +00:00
parent 0b71328102
commit 34d09f7c63
2 changed files with 3 additions and 3 deletions

@ -168,7 +168,7 @@ void CAnimatedMeshSceneNode::OnRegisterSceneNode()
{ {
const video::SMaterial& material = ReadOnlyMaterials ? Mesh->getMeshBuffer(i)->getMaterial() : Materials[i]; const video::SMaterial& material = ReadOnlyMaterials ? Mesh->getMeshBuffer(i)->getMaterial() : Materials[i];
if ( driver->needsTransparentRenderPass(Materials[i]) ) if ( driver->needsTransparentRenderPass(material) )
++transparentCount; ++transparentCount;
else else
++solidCount; ++solidCount;
@ -532,7 +532,7 @@ const core::aabbox3d<f32>& CAnimatedMeshSceneNode::getBoundingBox() const
} }
//! returns the material based on the zero based index i. //! returns the material based on the zero based index i.
video::SMaterial& CAnimatedMeshSceneNode::getMaterial(u32 i) video::SMaterial& CAnimatedMeshSceneNode::getMaterial(u32 i)
{ {
if (i >= Materials.size()) if (i >= Materials.size())

@ -71,7 +71,7 @@ void CMeshSceneNode::OnRegisterSceneNode()
{ {
const video::SMaterial& material = ReadOnlyMaterials ? Mesh->getMeshBuffer(i)->getMaterial() : Materials[i]; const video::SMaterial& material = ReadOnlyMaterials ? Mesh->getMeshBuffer(i)->getMaterial() : Materials[i];
if ( driver->needsTransparentRenderPass(Materials[i]) ) if ( driver->needsTransparentRenderPass(material) )
++transparentCount; ++transparentCount;
else else
++solidCount; ++solidCount;