Changeset 3266
- Timestamp:
- 08/13/04 12:46:04 (9 years ago)
- Location:
- OpenSceneGraph/trunk
- Files:
-
- 3 modified
-
include/osgFX/Registry (modified) (4 diffs)
-
include/osgGL2/Extensions (modified) (1 diff)
-
src/osgFX/Registry.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osgFX/Registry
r2185 r3266 27 27 { 28 28 29 class OSGFX_EXPORT Registry {29 class OSGFX_EXPORT Registry : public osg::Referenced{ 30 30 public: 31 31 … … 39 39 typedef std::map<std::string, osg::ref_ptr<const Effect> > Effect_map; 40 40 41 inlinestatic Registry *instance();41 static Registry *instance(); 42 42 43 43 inline void registerEffect(const Effect *effect); … … 52 52 53 53 private: 54 static Registry *instance_;55 54 Effect_map effects_; 56 55 }; … … 58 57 // INLINE METHODS 59 58 60 inline Registry *Registry::instance() 61 { 62 if (!instance_) { 63 instance_ = new Registry; 64 } 65 return instance_; 66 } 59 67 60 68 61 inline const Registry::Effect_map &Registry::getEffectMap() const -
OpenSceneGraph/trunk/include/osgGL2/Extensions
r3128 r3266 140 140 bool isGlslSupported() const { return ( _isShaderObjectsSupported && 141 141 _isVertexShaderSupported && 142 _isFragmentShaderSupported && 143 _isLanguage100Supported ); } 142 _isFragmentShaderSupported ); } 144 143 145 144 void setShaderObjectsSupported(bool flag) { _isShaderObjectsSupported = flag; } -
OpenSceneGraph/trunk/src/osgFX/Registry.cpp
r2184 r3266 3 3 using namespace osgFX; 4 4 5 Registry *Registry::instance_ = 0;6 5 6 Registry *Registry::instance() 7 { 8 static osg::ref_ptr<Registry> s_instance = new Registry; 9 return s_instance.get(); 10 } 11 7 12 Registry::Registry() 8 13 {
