3 This file is part of libmspgl
4 Copyright © 2007-2008, 2010 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GL_RENDERPASS_H_
9 #define MSP_GL_RENDERPASS_H_
11 #include <msp/datafile/objectloader.h>
22 Encapsulates the data that determines the appearance of a rendered surface.
23 This includes shader and data for it, material and textures.
28 class Loader: public DataFile::CollectionObjectLoader<RenderPass>
32 Loader(RenderPass &, Collection &);
36 virtual void finish();
38 void shader(const std::string &);
39 void texture(const std::string &);
46 class Loader: public DataFile::ObjectLoader<TextureSlot>
49 Loader(TextureSlot &);
52 const Texture *texture;
55 TextureSlot(const Texture *);
61 const Material *material;
62 std::vector<TextureSlot> textures;
64 static const RenderPass *current;
66 RenderPass &operator=(const RenderPass &);
69 RenderPass(const RenderPass &);
72 void set_material(const Material *);
73 unsigned get_texture_index(const std::string &) const;
74 void set_texture(const std::string &, const Texture *);