Commit 48019a8f authored by Robert Menzel's avatar Robert Menzel

removed make_shared as it does not compile on all MacOS systems

parent 9e90c81e
......@@ -34,9 +34,10 @@ class ShaderCreator : public Resource::SingleFileBasedCreator<Shader>
public:
ShaderCreator(const std::string& _filename)
: Resource::SingleFileBasedCreator<Shader>(_filename, Base::Settings::the()->getFullShaderPath()),
mType(GL_INVALID_ENUM),
mShaderParserFactory(std::make_shared<SimpleShaderParserFactory<IncludingShaderParser> >())
{}
mType(GL_INVALID_ENUM)
{
mShaderParserFactory = SharedShaderParserFactory( new SimpleShaderParserFactory<IncludingShaderParser>() );
}
virtual ~ShaderCreator() {}
// ==================================================================================================== \/
......
......@@ -60,7 +60,8 @@ public:
/// see parent
virtual SharedShaderParser createParser(std::string const& _filename)
{
return std::make_shared<ShaderParserT>(_filename);
//return std::make_shared<ShaderParserT>(_filename);
return SharedShaderParser( new ShaderParserT(_filename) );
}
};
......
......@@ -45,9 +45,11 @@ public:
mShaderType(),
mAttributeLocations(new LocationMappings),
mFragmentDataLocations(new LocationMappings),
mUniformBufferLocations(new LocationMappings),
mShaderParserFactory(std::make_shared<SimpleShaderParserFactory<IncludingShaderParser> >())
mUniformBufferLocations(new LocationMappings) //,
//mShaderParserFactory(std::make_shared<SimpleShaderParserFactory<IncludingShaderParser> >())
{
mShaderParserFactory = SharedShaderParserFactory( new SimpleShaderParserFactory<IncludingShaderParser>() );
// the base path is only needed for updating the time stamps, as the shaders itself get loaded via ShaderCreators
// which itself will add the base path! (read: mFileNames will _NOT_ store the base path!)
mBasePath = Base::Settings::the()->getFullShaderPath();
......
......@@ -28,13 +28,15 @@ SharedTexture2D loadTexture2D(const std::string& _filename, ColorSpace _colorSpa
SharedTextureData data = loadTextureData(_filename, _colorSpace);
if (data) {
SharedTexture2D texture = std::make_shared<Texture2D>(data->getRecommendedInternalFormat());
//SharedTexture2D texture = std::make_shared<Texture2D>(data->getRecommendedInternalFormat());
SharedTexture2D texture = SharedTexture2D( new Texture2D(data->getRecommendedInternalFormat()) );
texture->setImageData( data );
texture->generateMipmaps(); // calculates all remaining mipmap levels
return texture;
} else {
ACGL::Utils::error() << "can't create Texture from file " << _filename << " creating small empty texture instead." << std::endl;
SharedTexture2D dummy = std::make_shared<Texture2D>();
//SharedTexture2D dummy = std::make_shared<Texture2D>();
SharedTexture2D dummy = SharedTexture2D();
dummy->resize( glm::uvec2(4,4) );
return dummy;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment