3 This file is part of libmspgl
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #include "objectpass.h"
10 #include "programdata.h"
17 ObjectPass::ObjectPass():
23 ObjectPass::~ObjectPass()
28 ObjectPass::Loader::Loader(ObjectPass &p, Collection &c):
32 add("shader", &Loader::shader);
33 add("use_textures", &ObjectPass::use_textures);
36 void ObjectPass::Loader::shader(const string &n)
38 Program *shprog=coll.get<Program>(n);
39 if(shprog) // Allow for unsupported shaders
41 RefPtr<ProgramData> shdata=new ProgramData;
42 load_sub(*shdata, *shprog);
47 pass.shdata=shdata.release();