3 This file is part of libmspgl
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
11 #include "objectpass.h"
21 Stores a complete multipass rendering technique for an Object. This includes
22 shaders, textures and a material. A Technique can also specify empty texture
23 slots which Objects must override.
28 class Loader: public Msp::DataFile::Loader
31 typedef DataFile::Collection Collection;
38 Loader(Technique &, Collection &);
40 Technique &get_object() const { return tech; }
41 Collection &get_collection() const { return coll; }
43 virtual void finish();
44 void material_inline();
45 void pass(const std::string &);
46 void shader(const std::string &);
47 void shader_texture(const std::string &);
48 void texture(const std::string &);
49 void texture_slot(const std::string &);
53 std::vector<std::string> tex_names;
54 std::vector<const Texture *> textures;
55 const Texture *main_texture;
56 std::map<unsigned, ObjectPass> passes;
57 ObjectPass *normal_pass;
58 const Material *material;
64 bool has_pass(const GL::Tag &) const;
65 const ObjectPass &get_pass(const GL::Tag &) const;
66 unsigned get_n_textures() const { return tex_names.size(); }
67 unsigned get_texture_index(const std::string &) const;
68 const Texture *get_texture(unsigned) const;
69 const Material *get_material() const { return material; }