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>
23 Encapsulates the data that determines the appearance of a rendered surface.
24 This includes shader and data for it, material and textures.
26 class RenderPass: public Bindable<RenderPass>
29 class Loader: public DataFile::CollectionObjectLoader<RenderPass>
33 Loader(RenderPass &, Collection &);
37 virtual void finish();
39 void shader(const std::string &);
40 void texture(const std::string &);
47 class Loader: public DataFile::ObjectLoader<TextureSlot>
50 Loader(TextureSlot &);
53 const Texture *texture;
56 TextureSlot(const Texture *);
62 const Material *material;
63 std::vector<TextureSlot> textures;
65 RenderPass &operator=(const RenderPass &);
68 RenderPass(const RenderPass &);
71 void set_material(const Material *);
72 unsigned get_texture_index(const std::string &) const;
73 void set_texture(const std::string &, const Texture *);