X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Frenderpass.cpp;h=8281b2151f3c6c9b54d7ba2c83cc6bbbfad05880;hb=42293e1bd6f3d6297a1d0207ca69e7864a7d76e8;hp=b6eb1d954a958990716a730fd90702ee5341f092;hpb=fd62e55d37716787fe909883a1b18e5b8128ec80;p=libs%2Fgl.git diff --git a/source/renderpass.cpp b/source/renderpass.cpp index b6eb1d95..8281b215 100644 --- a/source/renderpass.cpp +++ b/source/renderpass.cpp @@ -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(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