X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Ftexturing.cpp;fp=source%2Ftexturing.cpp;h=dff3757fdb6d9b8985234e87241153d94b41a80b;hp=77bb15435c7391a62a0298ea653f6699417eb55f;hb=a40fc85277dba5c34402a0e703d038efd30cc57b;hpb=2fa1bb084e54af7134b44d3ee7512056e28de67e diff --git a/source/texturing.cpp b/source/texturing.cpp index 77bb1543..dff3757f 100644 --- a/source/texturing.cpp +++ b/source/texturing.cpp @@ -7,8 +7,6 @@ using namespace std; namespace Msp { namespace GL { -bool Texturing::legacy_used = true; - Texturing::~Texturing() { if(current()==this) @@ -36,7 +34,7 @@ void Texturing::set_attachment(unsigned attch, const Texture *tex) attachments[attch] = tex; if(current()==this) - bind_attachment(attch, legacy_used); + bind_attachment(attch); } const Texture *Texturing::get_attached_texture(unsigned i) const @@ -44,10 +42,10 @@ const Texture *Texturing::get_attached_texture(unsigned i) const return ibind_to(i, legacy); + tex->bind_to(i); else Texture::unbind_from(i); } @@ -57,14 +55,13 @@ void Texturing::unbind_attachment(unsigned i) Texture::unbind_from(i); } -void Texturing::bind(bool legacy) const +void Texturing::bind() const { const Texturing *old = current(); - if(set_current(this) || legacy!=legacy_used) + if(set_current(this)) { - legacy_used = legacy; for(unsigned i=0; iattachments.size(); ++i)