From 34d09f7c6352e98e42bfbf263fc966758ee740e9 Mon Sep 17 00:00:00 2001 From: cutealien Date: Fri, 3 Jan 2020 16:22:55 +0000 Subject: [PATCH] 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 --- source/Irrlicht/CAnimatedMeshSceneNode.cpp | 4 ++-- source/Irrlicht/CMeshSceneNode.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Irrlicht/CAnimatedMeshSceneNode.cpp b/source/Irrlicht/CAnimatedMeshSceneNode.cpp index fb992b49..593496a4 100644 --- a/source/Irrlicht/CAnimatedMeshSceneNode.cpp +++ b/source/Irrlicht/CAnimatedMeshSceneNode.cpp @@ -168,7 +168,7 @@ void CAnimatedMeshSceneNode::OnRegisterSceneNode() { const video::SMaterial& material = ReadOnlyMaterials ? Mesh->getMeshBuffer(i)->getMaterial() : Materials[i]; - if ( driver->needsTransparentRenderPass(Materials[i]) ) + if ( driver->needsTransparentRenderPass(material) ) ++transparentCount; else ++solidCount; @@ -532,7 +532,7 @@ const core::aabbox3d& 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) { if (i >= Materials.size()) diff --git a/source/Irrlicht/CMeshSceneNode.cpp b/source/Irrlicht/CMeshSceneNode.cpp index 108711a4..59d1c1cd 100644 --- a/source/Irrlicht/CMeshSceneNode.cpp +++ b/source/Irrlicht/CMeshSceneNode.cpp @@ -71,7 +71,7 @@ void CMeshSceneNode::OnRegisterSceneNode() { const video::SMaterial& material = ReadOnlyMaterials ? Mesh->getMeshBuffer(i)->getMaterial() : Materials[i]; - if ( driver->needsTransparentRenderPass(Materials[i]) ) + if ( driver->needsTransparentRenderPass(material) ) ++transparentCount; else ++solidCount;