X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Frenderpass.cpp;h=b67be7170ae7cff929d24b115552cce009db05e6;hp=5b5f72984b3bbfdbfe293d594ba68b3c17b4bd43;hb=25c81b4953dd38993250321b9407ce8b0139cbeb;hpb=d51a234320449909eb34c802faa1f0c516ef70a0 diff --git a/source/renderpass.cpp b/source/renderpass.cpp index 5b5f7298..b67be717 100644 --- a/source/renderpass.cpp +++ b/source/renderpass.cpp @@ -1,7 +1,7 @@ /* $Id$ This file is part of libmspgl -Copyright © 2007 Mikko Rasa, Mikkosoft Productions +Copyright © 2007-2008, 2010-2011 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ @@ -30,7 +30,6 @@ RenderPass::RenderPass(): { } RenderPass::RenderPass(const RenderPass &other): - Bindable(other), shprog(other.shprog), shdata(other.shdata ? new ProgramData(*other.shdata) : 0), material(other.material), @@ -57,47 +56,6 @@ void RenderPass::set_texture(unsigned index, const Texture *tex) texturing->attach(index, *tex); } -void RenderPass::bind() const -{ - const RenderPass *old = current(); - if(!set_current(this)) - return; - - if(shprog) - { - shprog->bind(); - shdata->apply(); - } - else if(old && old->shprog) - Program::unbind(); - - if(material) - material->bind(); - else if(old && old->material) - Material::unbind(); - - if(texturing) - texturing->bind(); - else if(old && old->texturing) - Texturing::unbind(); -} - -void RenderPass::unbind() -{ - const RenderPass *old = current(); - if(!set_current(0)) - return; - - if(old->shprog) - Program::unbind(); - - if(old->material) - Material::unbind(); - - if(old->texturing) - Texturing::unbind(); -} - RenderPass::Loader::Loader(RenderPass &p): DataFile::CollectionObjectLoader(p, 0)