]> git.tdb.fi Git - libs/gl.git/blobdiff - source/renderpass.cpp
Add datafile statement which was apparently forgotten
[libs/gl.git] / source / renderpass.cpp
index b6eb1d954a958990716a730fd90702ee5341f092..8281b2151f3c6c9b54d7ba2c83cc6bbbfad05880 100644 (file)
@@ -172,6 +172,7 @@ void RenderPass::Loader::init()
        add("texunit",  &Loader::texunit_named);
        add("uniforms", &Loader::uniforms);
        add("uniform_slot", &Loader::uniform_slot);
+       add("uniform_slot", &Loader::uniform_slot2);
 }
 
 void RenderPass::Loader::material_inline()
@@ -248,31 +249,11 @@ RenderPass::TextureLoader::TextureLoader(Texturing &t, unsigned i, Collection *c
        index(i)
 {
        add("texture",   &TextureLoader::texture);
-       add("texture2d", &TextureLoader::texture2d);
-}
-
-void RenderPass::TextureLoader::finish()
-{
-       if(tex)
-       {
-               obj.attach(index, *tex);
-               tex.release();
-       }
 }
 
 void RenderPass::TextureLoader::texture(const string &name)
 {
-       tex = &get_collection().get<Texture>(name);
-       tex.keep();
-}
-
-void RenderPass::TextureLoader::texture2d()
-{
-       tex = new Texture2D;
-       if(coll)
-               load_sub(static_cast<Texture2D &>(*tex), get_collection());
-       else
-               load_sub(static_cast<Texture2D &>(*tex));
+       obj.attach(index, get_collection().get<Texture>(name));
 }
 
 } // namespace GL