X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fscene%2Fmaterial%2FTechnique.hxx;h=b2ce020f07166d26f0d536fbff6c6f66c352f2f4;hb=0d419aba8a1ea9c67b1982f4d68fe1fe7bd79033;hp=9ada783c1192fa7cdcec6c5aa3a6fe4c33a41ae7;hpb=a5a6600e745d763fc2b933141ebf090879c700bb;p=simgear.git diff --git a/simgear/scene/material/Technique.hxx b/simgear/scene/material/Technique.hxx index 9ada783c..b2ce020f 100644 --- a/simgear/scene/material/Technique.hxx +++ b/simgear/scene/material/Technique.hxx @@ -97,6 +97,7 @@ public: const simgear::expression::BindingLayout&); void setGLExtensionsPred(float glVersion, const std::vector& extensions); + void refreshValidity(); protected: // Validity of technique in a graphics context. struct ContextInfo : public osg::Referenced @@ -105,7 +106,8 @@ protected: ContextInfo(const ContextInfo& rhs) : valid(rhs.valid()) {} ContextInfo& operator=(const ContextInfo& rhs) { - valid = rhs.valid(); + valid = rhs.valid; + return *this; } Swappable valid; }; @@ -116,5 +118,17 @@ protected: SGSharedPtr _validExpression; int _contextIdLocation; }; + +class TechniquePredParser : public expression::ExpressionParser +{ +public: + void setTechnique(Technique* tniq) { _tniq = tniq; } + Technique* getTechnique() { return _tniq.get(); } +// void setEffect(Effect* effect) { _effect = effect; } +// Effect* getEffect() { return _effect.get(); } +protected: + osg::ref_ptr _tniq; + // osg::ref_ptr _effect; +}; } #endif