#ifndef IMaterialProxy_h__ #define IMaterialProxy_h__ #include "render/IMaterial.h" #include #include namespace LifeGraphics { class IObjectMesh; class IMaterialProxy; class IMaterialTechnique { friend class IMaterial; public: bool SelectPass(MaterialPass pass); IMaterialPass* GetPass(); MaterialTechnique GetTechniqueType(); private: IMaterialTechnique(MaterialTechnique tech, IMaterialProxy* _parent); bool AddPass(IMaterialPass* pass); typedef std::map PassCollection; typedef std::map::iterator PassCollectionItr; PassCollection passes; IMaterialPass* active_pass; MaterialTechnique tech_type; IMaterialProxy* parent; }; class IMaterialProxy { friend class IMaterial; public: bool SelectTechnique(MaterialTechnique tech); IMaterialTechnique* GetTechnique(); IMaterial* GetBaseMaterial(); private: bool AddTechnique(IMaterialTechnique* tech); typedef std::map TechniqueCollection; typedef std::map::iterator TechniqueCollectionItr; TechniqueCollection technics; IMaterialTechnique* active_technique; IMaterialProxy(IMaterial* source, IObjectMesh* _geom); IObjectMesh* geom; IMaterial* base; }; } #endif // IMaterialProxy_h__