Fixes for OSX.
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
namespace osgFX
|
||||
{
|
||||
|
||||
class OSGFX_EXPORT Registry {
|
||||
class OSGFX_EXPORT Registry : public osg::Referenced{
|
||||
public:
|
||||
|
||||
struct Proxy {
|
||||
@@ -38,7 +38,7 @@ namespace osgFX
|
||||
|
||||
typedef std::map<std::string, osg::ref_ptr<const Effect> > Effect_map;
|
||||
|
||||
inline static Registry *instance();
|
||||
static Registry *instance();
|
||||
|
||||
inline void registerEffect(const Effect *effect);
|
||||
|
||||
@@ -51,19 +51,12 @@ namespace osgFX
|
||||
~Registry() {}
|
||||
|
||||
private:
|
||||
static Registry *instance_;
|
||||
Effect_map effects_;
|
||||
};
|
||||
|
||||
// INLINE METHODS
|
||||
|
||||
inline Registry *Registry::instance()
|
||||
{
|
||||
if (!instance_) {
|
||||
instance_ = new Registry;
|
||||
}
|
||||
return instance_;
|
||||
}
|
||||
|
||||
|
||||
inline const Registry::Effect_map &Registry::getEffectMap() const
|
||||
{
|
||||
|
||||
@@ -139,8 +139,7 @@ class OSGGL2_EXPORT Extensions : public osg::Referenced
|
||||
/** are all the extensions required for GLSL supported? */
|
||||
bool isGlslSupported() const { return ( _isShaderObjectsSupported &&
|
||||
_isVertexShaderSupported &&
|
||||
_isFragmentShaderSupported &&
|
||||
_isLanguage100Supported ); }
|
||||
_isFragmentShaderSupported ); }
|
||||
|
||||
void setShaderObjectsSupported(bool flag) { _isShaderObjectsSupported = flag; }
|
||||
bool isShaderObjectsSupported() const { return _isShaderObjectsSupported; }
|
||||
|
||||
@@ -2,8 +2,13 @@
|
||||
|
||||
using namespace osgFX;
|
||||
|
||||
Registry *Registry::instance_ = 0;
|
||||
|
||||
Registry *Registry::instance()
|
||||
{
|
||||
static osg::ref_ptr<Registry> s_instance = new Registry;
|
||||
return s_instance.get();
|
||||
}
|
||||
|
||||
Registry::Registry()
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user