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/core/refptr.h>
12 #include <msp/datafile/objectloader.h>
24 Encapsulates the data that determines the appearance of a rendered surface.
25 This includes shader and data for it, material and textures.
27 class RenderPass: public Bindable<RenderPass>
30 class Loader: public DataFile::CollectionObjectLoader<RenderPass>
34 Loader(RenderPass &, Collection &);
38 virtual void finish();
40 void material(const std::string &);
41 void texunit(unsigned);
48 class Loader: public DataFile::CollectionObjectLoader<TextureSlot>
51 Loader(TextureSlot &);
52 Loader(TextureSlot &, Collection &);
56 void texture(const std::string &);
61 RefPtr<const Texture> texture;
63 TextureSlot(unsigned);
68 RefPtr<const Material> material;
69 std::vector<TextureSlot> textures;
71 RenderPass &operator=(const RenderPass &);
74 RenderPass(const RenderPass &);
77 void set_material(const Material *);
78 void set_texture(unsigned, const Texture *);