X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Frenderpass.h;h=3b3b54b8569e12936cf6f8ffb04dbe0d8378ed95;hb=refs%2Fheads%2Fmaster;hp=94c6bc02b085885a4e7dea3bdad21447b33922f7;hpb=745b3030d7fa32c1f6be29548f978af640eb4021;p=libs%2Fgl.git diff --git a/source/renderpass.h b/source/renderpass.h deleted file mode 100644 index 94c6bc02..00000000 --- a/source/renderpass.h +++ /dev/null @@ -1,84 +0,0 @@ -/* $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 - -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: - class Loader: public DataFile::CollectionObjectLoader - { - public: - Loader(RenderPass &); - Loader(RenderPass &, Collection &); - - private: - void init(); - virtual void finish(); - void material(); - void shader(const std::string &); - void texture(const std::string &); - void uniforms(); - }; - -private: - struct TextureSlot - { - class Loader: public DataFile::ObjectLoader - { - public: - Loader(TextureSlot &); - }; - - const Texture *texture; - std::string name; - - TextureSlot(const Texture *); - }; - - Program *shprog; - ProgramData *shdata; - bool own_material; - const Material *material; - std::vector textures; - - static const RenderPass *current; - - RenderPass &operator=(const RenderPass &); -public: - RenderPass(); - RenderPass(const RenderPass &); - ~RenderPass(); - - void set_material(const Material *); - unsigned get_texture_index(const std::string &) const; - void set_texture(const std::string &, const Texture *); - - void bind() const; - - static void unbind(); -}; - -} // namespace GL -} // namespace Msp - -#endif