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;

@ -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;