#ifndef CFADEMATERIAL__H_INCLUDED
#define CFADEMATERIAL__H_INCLUDED

#include <irrlicht.h>

using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;


class CFadeMaterial : public video::IShaderConstantSetCallBack
{
private:
   f32   m_fadeFactor; // Fade factor 0..1
   s32 m_fadeMaterial; // Handle/id of fade material
public:
   CFadeMaterial() {m_fadeFactor = 1.0f; m_fadeMaterial = video::EMT_SOLID;};
   bool init(ISceneManager* smgr, IVideoDriver* driver);
   virtual void OnSetConstants(video::IMaterialRendererServices* services, s32 userData);
public:
   s32 getFadeMaterial(void) {return m_fadeMaterial;};
   f32 getFadeFactor(void) {return m_fadeFactor;};
   void setFadeFactor(f32 fadeFactor) {m_fadeFactor = fadeFactor;};
};




#endif // CFADEMATERIAL__H_INCLUDED
