But I think it would be better from encapsulation perspective if the line in hw_drawinfo.cpp would be
Code: Select all
applySSAO = mCurrentPortal->AllowSSAO();
Code: Select all
bool HWSkyboxPortal::AllowSSAO() { return !!(Level->flags3 & LEVEL3_SKYBOXAO); } // [MK] sector skyboxes don't allow SSAO by default
It would "feel more right" if the skybox subclass specifically returned true/false in response to the flag, and the main render code let each subclass decide for itself.
Would be future-proof for hypothetical other portal subclass which might want to control SSAO in response to a different flag or whatever other reason.
That said I'm not sure if Level is accessible in the latter file (or can be made accessible without problems)?