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
This commit is contained in:
cutealien 2022-08-26 10:38:14 +00:00
parent 31965fe599
commit 662001566b
1 changed files with 10 additions and 7 deletions

View File

@ -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<ISceneNode*> & lightList) = 0;
virtual void OnPreRender(core::array<ISceneNode*> & 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