]> git.tdb.fi Git - libs/gl.git/blobdiff - source/clipping.cpp
Fully unbind Clipping when legacy mode changes
[libs/gl.git] / source / clipping.cpp
index 487eeca638cbcfd7a33e1c04e086b124c47b7cbd..430a7b6fd05918b43c62204b18859bdd47a828f0 100644 (file)
@@ -57,9 +57,12 @@ void Clipping::bind(bool legacy) const
 {
        if(legacy)
                static Require _req(MSP_legacy_features);
+       
+       if(legacy!=bound_with_legacy)
+               unbind();
 
        const Clipping *old = current();
-       if(!set_current(this) && !(legacy && !bound_with_legacy))
+       if(!set_current(this))
                return;
 
        bound_with_legacy = legacy;