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>
31 Loader(RenderPass &, Collection &);
34 virtual void finish();
36 void shader(const std::string &);
37 void texture(const std::string &);
44 class Loader: public DataFile::ObjectLoader<TextureSlot>
47 Loader(TextureSlot &);
50 const Texture *texture;
53 TextureSlot(const Texture *);
59 const Material *material;
60 std::vector<TextureSlot> textures;
62 static const RenderPass *current;
64 RenderPass &operator=(const RenderPass &);
67 RenderPass(const RenderPass &);
70 void set_material(const Material *);
71 unsigned get_texture_index(const std::string &) const;
72 void set_texture(const std::string &, const Texture *);