X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Frenderpass.cpp;h=97a0970b6f627e55d958f2860e7d16155807f3bd;hp=b6eb1d954a958990716a730fd90702ee5341f092;hb=b4b7ee4b3b767b8cc097ffe8205c71f3afbe5d39;hpb=1b117d0b797375738fc95df5908dfe969dd2d64e diff --git a/source/renderpass.cpp b/source/renderpass.cpp index b6eb1d95..97a0970b 100644 --- a/source/renderpass.cpp +++ b/source/renderpass.cpp @@ -248,31 +248,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(name); - tex.keep(); -} - -void RenderPass::TextureLoader::texture2d() -{ - tex = new Texture2D; - if(coll) - load_sub(static_cast(*tex), get_collection()); - else - load_sub(static_cast(*tex)); + obj.attach(index, get_collection().get(name)); } } // namespace GL