class Material
{
+private:
+ class Loader: public DataFile::CollectionObjectLoader<Material>
+ {
+ protected:
+ Loader(Material &);
+ Loader(Material &, Collection &);
+
+ virtual void init_actions();
+
+ private:
+ void sampler(const std::string &);
+ };
+
protected:
template<typename T>
struct Property
};
template<typename C>
- class PropertyLoader: public DataFile::CollectionObjectLoader<Material>
+ class PropertyLoader: public DataFile::DerivedObjectLoader<Material, Loader>
{
protected:
- PropertyLoader(C &m): CollectionObjectLoader<Material, Loader>(m, 0) { }
- PropertyLoader(C &m, Collection &c): CollectionObjectLoader<Material, Loader>(m, c) { }
+ PropertyLoader(C &m): DerivedObjectLoader<Material, Loader>(m) { }
+ PropertyLoader(C &m, Collection &c): DerivedObjectLoader<Material, Loader>(m, c) { }
void add_property(const std::string &, void (C::*)(float), void (C::*)(const Texture *));
void add_property(const std::string &, void (C::*)(const Color &), void (C::*)(const Texture *), bool);
typedef DataFile::LoadableTypeRegistry<GenericLoader, GenericLoader::AddType> MaterialRegistry;
protected:
+ const Sampler *sampler;
ProgramData shdata;
- Material() { }
+ Material(): sampler(0) { }
public:
virtual ~Material() { }