Changeset 3266

Show
Ignore:
Timestamp:
08/13/04 12:46:04 (10 years ago)
Author:
robert
Message:

Fixes for OSX.

Location:
OpenSceneGraph/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osgFX/Registry

    r2185 r3266  
    2727{ 
    2828 
    29     class OSGFX_EXPORT Registry { 
     29    class OSGFX_EXPORT Registry : public osg::Referenced{ 
    3030    public: 
    3131 
     
    3939        typedef std::map<std::string, osg::ref_ptr<const Effect> > Effect_map; 
    4040 
    41         inline static Registry *instance(); 
     41        static Registry *instance(); 
    4242 
    4343        inline void registerEffect(const Effect *effect); 
     
    5252 
    5353    private: 
    54         static Registry *instance_; 
    5554        Effect_map effects_; 
    5655    }; 
     
    5857    // INLINE METHODS 
    5958 
    60     inline Registry *Registry::instance() 
    61     { 
    62         if (!instance_) { 
    63             instance_ = new Registry; 
    64         } 
    65         return instance_; 
    66     } 
     59     
    6760 
    6861    inline const Registry::Effect_map &Registry::getEffectMap() const 
  • OpenSceneGraph/trunk/include/osgGL2/Extensions

    r3128 r3266  
    140140        bool isGlslSupported() const { return ( _isShaderObjectsSupported && 
    141141                                                _isVertexShaderSupported &&  
    142                                                 _isFragmentShaderSupported &&  
    143                                                 _isLanguage100Supported ); } 
     142                                                _isFragmentShaderSupported ); } 
    144143 
    145144        void setShaderObjectsSupported(bool flag) { _isShaderObjectsSupported = flag; } 
  • OpenSceneGraph/trunk/src/osgFX/Registry.cpp

    r2184 r3266  
    33using namespace osgFX; 
    44 
    5 Registry *Registry::instance_ = 0; 
    65 
     6Registry *Registry::instance() 
     7{ 
     8    static osg::ref_ptr<Registry> s_instance = new Registry; 
     9    return s_instance.get(); 
     10} 
     11     
    712Registry::Registry() 
    813{