X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Frenderpass.h;h=3b3b54b8569e12936cf6f8ffb04dbe0d8378ed95;hp=e2ea4c97175eb6a62e14bfa6ec636a4c63b12b1d;hb=HEAD;hpb=42ace9ac1350d3ae009bdd2fb335ac1e57d1b36b diff --git a/source/renderpass.h b/source/renderpass.h deleted file mode 100644 index e2ea4c97..00000000 --- a/source/renderpass.h +++ /dev/null @@ -1,83 +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 -#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 -{ -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; - - 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