From 662001566b4044c72d6db157b80f32041940e5ad Mon Sep 17 00:00:00 2001 From: cutealien Date: Fri, 26 Aug 2022 10:38:14 +0000 Subject: [PATCH] ILightManager now uses empty instead of pure virtual functions Making it a bit more comfortable for users to implement the class. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6418 dfc29bdd-3216-0410-991c-e03cc46cb475 --- include/ILightManager.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/include/ILightManager.h b/include/ILightManager.h index ad8988c..b156e70 100644 --- a/include/ILightManager.h +++ b/include/ILightManager.h @@ -22,7 +22,10 @@ namespace scene before or after each scene node is rendered. It is assumed that the ILightManager implementation will store any data that it wishes to retain, i.e. the ISceneManager to which it is assigned, the lightList, - the current render pass, and the current scene node. */ + the current render pass, and the current scene node. + + It can also be useful for shaders as it allows finding out the currently rendered SceneNode. + */ class ILightManager : public IReferenceCounted { public: @@ -35,27 +38,27 @@ namespace scene the light manager may modify. This reference will remain valid until OnPostRender(). */ - virtual void OnPreRender(core::array & lightList) = 0; + virtual void OnPreRender(core::array & lightList) {}; //! Called after the last scene node is rendered. /** After this call returns, the lightList passed to OnPreRender() becomes invalid. */ - virtual void OnPostRender(void) = 0; + virtual void OnPostRender(void) {}; //! Called before a render pass begins /** \param renderPass: the render pass that's about to begin */ - virtual void OnRenderPassPreRender(E_SCENE_NODE_RENDER_PASS renderPass) = 0; + virtual void OnRenderPassPreRender(E_SCENE_NODE_RENDER_PASS renderPass) {}; //! Called after the render pass specified in OnRenderPassPreRender() ends /** \param[in] renderPass: the render pass that has finished */ - virtual void OnRenderPassPostRender(E_SCENE_NODE_RENDER_PASS renderPass) = 0; + virtual void OnRenderPassPostRender(E_SCENE_NODE_RENDER_PASS renderPass) {}; //! Called before the given scene node is rendered /** \param[in] node: the scene node that's about to be rendered */ - virtual void OnNodePreRender(ISceneNode* node) = 0; + virtual void OnNodePreRender(ISceneNode* node) {}; //! Called after the the node specified in OnNodePreRender() has been rendered /** \param[in] node: the scene node that has just been rendered */ - virtual void OnNodePostRender(ISceneNode* node) = 0; + virtual void OnNodePostRender(ISceneNode* node) {}; }; } // end namespace scene } // end namespace irr