Files
LifeProject/LifeGraphics/render/IMaterialProxy.h
T
2025-05-13 02:46:21 +03:00

50 lines
1.3 KiB
C++

#ifndef IMaterialProxy_h__
#define IMaterialProxy_h__
#include "render/IMaterial.h"
#include <map>
#include <Types.h>
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<MaterialPass, IMaterialPass*> PassCollection;
typedef std::map<MaterialPass, IMaterialPass*>::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<MaterialTechnique, IMaterialTechnique*> TechniqueCollection;
typedef std::map<MaterialTechnique, IMaterialTechnique*>::iterator TechniqueCollectionItr;
TechniqueCollection technics;
IMaterialTechnique* active_technique;
IMaterialProxy(IMaterial* source, IObjectMesh* _geom);
IObjectMesh* geom;
IMaterial* base;
};
}
#endif // IMaterialProxy_h__