static Require _req(MSP_legacy_features);
const Clipping *old = current();
- if(!set_current(this))
+ if(!set_current(this) && !(legacy && !bound_with_legacy))
return;
bound_with_legacy = legacy;
}
}
- if(changed&CLIPPING)
+ if(state->clipping)
{
- if(state->clipping)
+ if(legacy_bindings)
{
- if(legacy_bindings)
+ if(changed&CLIPPING)
{
MatrixStack::modelview() = state->clipping_matrix;
state->clipping->bind(true);
changed = (changed&~CLIPPING)|LEGACY_MATRIX;
}
- else
- state->clipping->bind(false);
}
else
- Clipping::unbind();
+ state->clipping->bind(false);
}
+ else
+ Clipping::unbind();
if(state->shprog)
{