X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fbuilders%2Fpipelinetemplate.h;h=515ebfaf4cc7fff9a44609c21fa2df106c4cd4bc;hp=fb24ea29df547f468ff05ba142631c7bd215107d;hb=da85eb77172dbd62f764a63b45c79fc059af563b;hpb=7aaec9a70b8d7733429bec043f8e33e02956f266 diff --git a/source/builders/pipelinetemplate.h b/source/builders/pipelinetemplate.h index fb24ea29..515ebfaf 100644 --- a/source/builders/pipelinetemplate.h +++ b/source/builders/pipelinetemplate.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include "blend.h" #include "postprocessor.h" @@ -24,7 +24,7 @@ private: template struct AddPostProc { - static void add(PostProcLoader &ldr, const std::string &kw) { ldr.add(kw, &PostProcLoader::postprocessor); } + void operator()(const std::string &kw, PostProcLoader &ldr) const { ldr.add(kw, &PostProcLoader::postprocessor); } }; protected: @@ -46,13 +46,10 @@ private: }; public: - class Loader: public DataFile::CollectionObjectLoader, public PostProcLoader + class Loader: public DataFile::CollectionObjectLoader, public PostProcLoader { public: - Loader(PipelineTemplate &); Loader(PipelineTemplate &, Collection &); - private: - void init(); virtual void postprocessor_loaded(); void multisample(unsigned); @@ -103,8 +100,9 @@ public: typedef std::vector PostProcessorArray; private: - typedef DataFile::LoadableTypeRegistry PostProcessorRegistry; + typedef TypeRegistry PostProcessorRegistry; + Resources *resources; bool hdr; bool alpha; unsigned required_multisample; @@ -116,6 +114,7 @@ public: PipelineTemplate(); ~PipelineTemplate(); + Resources &get_resources() const; bool get_hdr() const { return hdr; } bool get_alpha() const { return alpha; } unsigned get_required_multisample() const { return required_multisample; }