X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexturing.cpp;h=093c602e917c2ec7bf3ee67a626eedb4f4e43ab4;hb=c8f98daaaba04ba93d6d7170302d8b91c3410fa5;hp=db8ee65359a87993fe707fd0182bda4f210e1f51;hpb=9dc2c20e8c7ac91d932b12492591b65786e24b0f;p=libs%2Fgl.git diff --git a/source/texturing.cpp b/source/texturing.cpp index db8ee653..093c602e 100644 --- a/source/texturing.cpp +++ b/source/texturing.cpp @@ -31,7 +31,7 @@ void Texturing::set_attachment(unsigned attch, const Texture *tex) if(attachments.size()<=attch) attachments.resize(attch+1); - attachments[attch].tex = tex; + attachments[attch] = tex; if(current()==this) bind_attachment(attch); @@ -39,9 +39,8 @@ void Texturing::set_attachment(unsigned attch, const Texture *tex) void Texturing::bind_attachment(unsigned i) const { - const Attachment &attch = attachments[i]; - if(attch.tex) - attch.tex->bind_to(i); + if(const Texture *tex = attachments[i]) + tex->bind_to(i); else Texture::unbind_from(i); } @@ -76,10 +75,5 @@ void Texturing::unbind() } } - -Texturing::Attachment::Attachment(): - tex(0) -{ } - } // namespace GL } // namespace Msp;