diff --git a/source/Irrlicht/CBufferRenderNode.h b/source/Irrlicht/CBufferRenderNode.h index 923434f..a309275 100644 --- a/source/Irrlicht/CBufferRenderNode.h +++ b/source/Irrlicht/CBufferRenderNode.h @@ -76,6 +76,11 @@ public: driver->setMaterial(material); driver->drawMeshBuffer(mb); } + + // Resetting after each rendering so direct calls to render() for parent node continue to work + // Assuming each pass only runs once + RenderPass = ESNRP_NONE; + ParentDoesRender = true; } //! Renders the node. @@ -84,10 +89,6 @@ public: video::IVideoDriver* driver = SceneManager->getVideoDriver(); driver->setTransform(video::ETS_WORLD, MeshNodeParent.getAbsoluteTransformation()); renderBuffer(driver); - - // resetting each time so direct calls to render() for parent node continue to work - RenderPass = ESNRP_NONE; - ParentDoesRender = true; } virtual const core::aabbox3d& getBoundingBox() const IRR_OVERRIDE diff --git a/source/Irrlicht/CMeshSceneNode.cpp b/source/Irrlicht/CMeshSceneNode.cpp index 7e3a6b9..c317604 100644 --- a/source/Irrlicht/CMeshSceneNode.cpp +++ b/source/Irrlicht/CMeshSceneNode.cpp @@ -219,7 +219,7 @@ void CMeshSceneNode::render() } } - if ( bufRenderNode->getRenderPass() == renderPass ) + if ( bufRenderNode->getRenderPass() == renderPass || renderPass == ESNRP_NONE) bufRenderNode->renderBuffer(driver); } } diff --git a/tests/tests-last-passed-at.txt b/tests/tests-last-passed-at.txt index ebc23e5..2fc244f 100644 --- a/tests/tests-last-passed-at.txt +++ b/tests/tests-last-passed-at.txt @@ -1,4 +1,4 @@ Tests finished. 72 tests of 72 passed. Compiled as DEBUG -Test suite pass at GMT Mon May 08 14:14:47 2023 +Test suite pass at GMT Tue May 09 10:09:52 2023