#pragma once #include "IRenderCommandNode.h" #include "IUpdatable.h" #include "IEngine.h" #include "../Commands/CommandUserBase.h" class RenderCommandNode : public IRenderCommandNode , public IRenderCommandNodeInternal , public CommandUserBase , public IUpdatable { public: RenderCommandNode(IEngine& argEngine); virtual ~RenderCommandNode(); // IRenderCommandNode virtual const std::vector get_CommandUsers() const; virtual void set_Parent(IRenderCommandNode* ar_Node_); virtual IRenderCommandNode* get_Parent() const; virtual bool IsDirty() const; virtual void MarkDirty(); virtual void AddCommandUser(ICommandUser& argCommandUser); virtual void RemoveCommandUser(ICommandUser& argCommandUser); virtual void ReplaceCommandUser(ICommandUser& argWhatCommandUser, ICommandUser& argWhithCommandUser); virtual void ProcessCommands(); // IUpdatable virtual void Update(bool argForceUpdate); virtual bool get_WantsUpdate() const; // ICommandUser virtual CommandExecuteResult::Enumeration ExecuteCommand(unsigned char argCommandType, ICommandBuffer& argCurrentBuffer, uint32 argCurrentPositon); virtual string8 get_UserName() const { return "RenderCommandNode"; } protected: // IRenderCommandNodeInternal virtual void GenerateDeviceCommands(); virtual ICommandBuffer* get_CommandBuffer() const; private: IEngine& m_Engine; bool m_Dirty; IRenderCommandNode* m_ParentNode; std::vector m_CommandUsers; ICommandBuffer* m_CommandBuffer; };