+++ /dev/null
-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2007-2008, 2010 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
-#ifndef MSP_GL_RENDERPASS_H_
-#define MSP_GL_RENDERPASS_H_
-
-#include <msp/core/refptr.h>
-#include <msp/datafile/objectloader.h>
-#include "bindable.h"
-
-namespace Msp {
-namespace GL {
-
-class Material;
-class Program;
-class ProgramData;
-class Texture;
-
-/**
-Encapsulates the data that determines the appearance of a rendered surface.
-This includes shader and data for it, material and textures.
-*/
-class RenderPass: public Bindable<RenderPass>
-{
-public:
- class Loader: public DataFile::CollectionObjectLoader<RenderPass>
- {
- public:
- Loader(RenderPass &);
- Loader(RenderPass &, Collection &);
-
- private:
- void init();
- virtual void finish();
- void material();
- void material(const std::string &);
- void texunit(unsigned);
- void uniforms();
- };
-
-private:
- struct TextureSlot
- {
- class Loader: public DataFile::CollectionObjectLoader<TextureSlot>
- {
- public:
- Loader(TextureSlot &);
- Loader(TextureSlot &, Collection &);
-
- private:
- void init();
- void texture(const std::string &);
- void texture2d();
- };
-
- unsigned index;
- RefPtr<const Texture> texture;
-
- TextureSlot(unsigned);
- };
-
- Program *shprog;
- ProgramData *shdata;
- RefPtr<const Material> material;
- std::vector<TextureSlot> textures;
-
- RenderPass &operator=(const RenderPass &);
-public:
- RenderPass();
- RenderPass(const RenderPass &);
- ~RenderPass();
-
- void set_material(const Material *);
- void set_texture(unsigned, const Texture *);
-
- void bind() const;
-
- static void unbind();
-};
-
-} // namespace GL
-} // namespace Msp
-
-#endif