class Material;
class Program;
class ProgramData;
+class TexEnv;
class Texture;
+class Texturing;
/**
Encapsulates the data that determines the appearance of a rendered surface.
-This includes shader and data for it, material and textures.
+This includes shader and data for it, material and texturing.
+
+XXX Does not delete inline texture from datafiles properly
*/
class RenderPass: public Bindable<RenderPass>
{
};
private:
- struct TextureSlot
+ struct TextureLoader: public DataFile::CollectionObjectLoader<Texturing>
{
- class Loader: public DataFile::CollectionObjectLoader<TextureSlot>
- {
- public:
- Loader(TextureSlot &);
- Loader(TextureSlot &, Collection &);
-
- private:
- void init();
- void texture(const std::string &);
- void texture2d();
- };
-
+ private:
unsigned index;
- RefPtr<const Texture> texture;
+ RefPtr<Texture> tex;
+ RefPtr<TexEnv> env;
+
+ public:
+ TextureLoader(Texturing &, unsigned, Collection *);
+ private:
+ virtual void finish();
- TextureSlot(unsigned);
+ void texenv();
+ void texture(const std::string &);
+ void texture2d();
};
Program *shprog;
ProgramData *shdata;
RefPtr<const Material> material;
- std::vector<TextureSlot> textures;
+ Texturing *texturing;
RenderPass &operator=(const RenderPass &);
public: